Commit Graph

36873 Commits

Author SHA1 Message Date
Djordje Vlaisavljevic
b4a284fb5f Fixed recommendation preview bg color
no ref
2023-09-22 14:13:41 +01:00
Djordje Vlaisavljevic
d38e185c64 Fixed Recommending you paid subscriber logic
refs https://github.com/TryGhost/Product/issues/3891
2023-09-22 14:13:41 +01:00
Djordje Vlaisavljevic
b5f110aabf Hide attribution table sort indicator when there are no paid tiers
no ref
2023-09-22 13:29:29 +01:00
Fabien "egg" O'Carroll
9b2a94f931 Implemented "virtual" Collection for "latest"
refs https://github.com/TryGhost/Arch/issues/95

Rather than storing all of the relations between the latest collection and
posts, we know that it contains all posts. This means we don't have to keep the
collections posts in sync. Instead we can fetch them from the posts table. This
saves a lot of work during recalculation.
2023-09-22 19:05:37 +07:00
Fabien "egg" O'Carroll
45c1a82909 Forced "latest" Collection Entity to have no posts
refs https://github.com/TryGhost/Arch/issues/95

We're going to be treating the "latest" Collection as a "virtual" Collection
where we will hydrate the posts from the posts repository. This will allow for
more performant queries, and less work to keep the "latest" Collection in sync
2023-09-22 19:05:37 +07:00
Fabien "egg" O'Carroll
3a624ec3a1 Fixed return values of CollectionService
Our service layer should not expose the Entities, it should return the DTOs.
This is to allow us to make internal refactors without having to modify the
entire stack.
2023-09-22 19:05:37 +07:00
Kevin Ansfield
43b76056ca
Prevented background click closing members import modal (#18296)
no issue

- we don't want accidental background clicks closing this modal as it contains complex UI rather than a simple notification
- the members import modal is still using the old/outdated modal pattern so there was no option for disabling background click, went with a quick-fix for now rather than updating everything to our modern modal patterns
  - added passthrough of arguments to the `close` action on `<GhFullscreenModal>`
  - updated `<GhFullscreenModal>` background click handler to pass "background" as an action argument
  - updated the action used for handling members import modal closing to skip closing when it receives "background" as the first argument
2023-09-22 12:01:34 +00:00
Djordje Vlaisavljevic
267d8d05f1 Updated Recommending you table design
refs https://github.com/TryGhost/Product/issues/3891
2023-09-22 13:00:29 +01:00
Sanne de Vries
f180e8762d
Updated hover state of collection card post on frontend (#18298)
Refs https://github.com/TryGhost/Product/issues/3630
2023-09-22 11:54:06 +00:00
Sanne de Vries
4deb827625
Updated the member import table header to be sticky (#18297)
No ref
2023-09-22 11:45:16 +00:00
Fabien "egg" O'Carroll
db488b4124 Optimised the storage of collection posts relations
refs https://github.com/TryGhost/Arch/issues/95

Rather than a big nested loop to reconcile the in-memory vs. persisted
PostCollections we can instead use the events to know which rows we have to
delete and which we have to insert. This removes a tonne of work.

This implementation isn't perfect, and misses cases where the same post is
added and removed, our use-cases don't currently support that however.
2023-09-22 18:32:17 +07:00
Fabien "egg" O'Carroll
c6f2c985f1 Wired up events to CollectionsBookshelfRepository
refs https://github.com/TryGhost/Arch/issues/95

This handles actually dispatching the events
2023-09-22 18:32:17 +07:00
Fabien "egg" O'Carroll
673b06119b Wired up CollectionPost events to Collection
https://github.com/TryGhost/Arch/issues/95

Entities don't dispatch their own events, instead they add to an event array
and are dispatched once persisted.
2023-09-22 18:32:17 +07:00
Fabien "egg" O'Carroll
637724ba66 Added CollectionPost events
refs https://github.com/TryGhost/Arch/issues/95

These events can be used to know when an automatic collections posts have been
updated, as well as by the repository to optimise the storage of
CollectionPosts
2023-09-22 18:32:17 +07:00
Djordje Vlaisavljevic
22029bfd1b Updated empty state layout
refs https://github.com/TryGhost/Product/issues/3942
2023-09-22 11:53:28 +01:00
Djordje Vlaisavljevic
73e9702cf7 Improved empty states
refs https://github.com/TryGhost/Product/issues/3942
2023-09-22 11:53:28 +01:00
Djordje Vlaisavljevic
ceb22a5b0b Removed preview link from the description
refs https://github.com/TryGhost/Product/issues/3942
2023-09-22 11:53:28 +01:00
Simon Backx
d68070db9d
Added stats to 'Recommending you' table (#18292)
fixes https://github.com/TryGhost/Product/issues/3891
2023-09-22 12:31:31 +02:00
Sag
a04c691fa0
Added recommendations as suggestions to the Button, Header, Email CTA cards (#18293)
closes https://github.com/TryGhost/Product/issues/3933
2023-09-22 09:58:44 +00:00
Sanne de Vries
fd13712579
Added bookmark back to published posts in Beta editor (#18289)
No ref
- By popular request, a bookmark of the published post is now shown
after publishing
- The 'Published' status in the editor now links to the published post
2023-09-22 09:54:51 +00:00
Ronald Langeveld
f7b50456ea
Added Sentry integration to Admin X (#18288)
no issue

- Adds Sentry to Admin X settings to be able to monitor uncaught errors, etc.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 76de125</samp>

Added Sentry integration to the admin-x-settings app to improve error
monitoring and reporting. Updated the `ErrorBoundary` and `HtmlEditor`
components, the `useFetchApi` hook, and the app component to use the
`@sentry/react` module. Passed the `sentryDSN` prop from the parent
component to the app component and the services context.
2023-09-22 09:17:04 +00:00
Jono M
2bc1392bff
Updated toast testid to prevent conflicts in tests (#18290)
no issue
2023-09-22 09:05:38 +00:00
Jono M
1bf20f3e5a
Updated AdminX user dropdown logic to match current admin (#18277)
refs https://github.com/TryGhost/Product/issues/3832

Fixed bugs
- Administrators having suspend/delete options for owners
- Editors not having the menu for Authors/Contributors
2023-09-22 08:39:27 +00:00
renovate[bot]
41fd08c140 Update dependency @uiw/react-codemirror to v4.21.18 2023-09-22 07:42:37 +00:00
Sodbileg Gansukh
214532e397
Simplified login form heading (#18282)
no issues

- we already have a button that says sign in
- the form heading is simplified with just a site title
2023-09-22 12:19:43 +08:00
Sag
04ef848b15
Fixed copy when there is only 1 click / new member (#18280)
no issue
2023-09-21 19:09:47 +00:00
Sag
b10767d038
Fixed sub/click count disapparing after editing a recommendation (#18279)
closes https://github.com/TryGhost/Product/issues/3929
2023-09-21 18:46:19 +00:00
renovate[bot]
b578cd5fa0 Update dependency @uiw/react-codemirror to v4.21.17 2023-09-21 16:37:52 +00:00
Peter Zimon
b665541c34
AdminX Tiers welcome page (#18243)
refs. https://github.com/TryGhost/Product/issues/3349

- the Tier detail modal is missing the "Welcome page" field which is a
regression

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-21 16:25:01 +00:00
Jono M
0625255a17
Added generic error handling to AdminX (#18274)
refs https://github.com/TryGhost/Product/issues/3832

- Added API error classes and a generic error handling function
- Added retry logic to API requests matching the old admin
- Added the error handler to all queries and mutations
2023-09-21 16:02:26 +00:00
Simon Backx
96ecc73b17
Added show all recommendations instead of pagination (#18276)
fixes https://github.com/TryGhost/Product/issues/3923
2023-09-21 17:49:41 +02:00
Sag
65c4553467
Published Portal 2.36.1 (#18275)
no issue
2023-09-21 15:44:49 +00:00
Djordje Vlaisavljevic
006d902116 Updated recommendations portal modal design
refs https://github.com/TryGhost/Product/issues/3898
2023-09-21 16:16:01 +01:00
Kevin Ansfield
f98467611c
Added page html reset and re-render to handle dynamic collection card content (#18265)
no issue

Collection cards contain dynamic data that can change when there's any change to a published post but in Ghost all post/page content is rendered once on save and stored as a static string meaning we need a new approach for triggering a re-render of pages that plays well with caching.

- fixed typo in the relations/authors code that meant we weren't correctly calling the prototype method on the Post model inside the `onFetchedCollection` event handler
- updated Post model to clear the `html` field of all pages when saving or deleting a published post
- updated Post model to re-render `html` fields when fetching individual posts or a collection of posts
- modified `insertExtraPostsTags` fixture util to wrap it's concurrent post edits in a transaction otherwise MySQL errors because it hits a deadlock
2023-09-21 14:51:08 +00:00
Simon Backx
098f4353a7
Disabled network retries for webmentions in tests (#18269)
refs https://ghost.slack.com/archives/C02G9E68C/p1695296293667689

- We block all outgoing networking by default in tests. When editing a
post/page, Ghost tries to send a webmention. Because of my earlier
changes
(1e3232cf82)
it tries 3 times - all network requests fail instantly when networking
is disabled - but it adds a delay in between those retries. So my change
disables retries during tests.
- Adds a warning when afterEach hook tooks longer than 2s due to
awaiting jobs/events
- We reduce the amount of webmentions that are send, by only sending
webmentions for added or removed urls, no longer when a post html is
changed (unless post is published/removed).
2023-09-21 16:17:05 +02:00
renovate[bot]
16346dfc97 Update dependency @uiw/react-codemirror to v4.21.16 2023-09-21 14:13:40 +00:00
Sag
dfcff209c2
Added support for Ghost sites hosted on a subdirectory, when adding a rec (#18270)
closes https://github.com/TryGhost/Product/issues/3915
- when adding a recommendation, we now ping the pull path first to check
whether it's a Ghost site. This is the most common case and also helps
to cover Ghost sites that are hosted on a subdirectory.
- if needed, we ping the origin path to perform the same check. This
helps to cover the case where the recommended URL is a subpage or post
of a Ghost site
- we now have 4 networks calls in the worst case when adding a
recommendation: uniqueness validation, two checks to determine whether
it's a Ghost site, read metadata from oembed. Each of these have a
timeout of 5 seconds, so there's a max. waiting time of 20 sec in the
worst case
2023-09-21 14:03:51 +00:00
Sanne de Vries
0bb18d090b
Removed unnecessary padding from PSM on mobile (#18268)
No ref
2023-09-21 12:30:05 +00:00
Djordje Vlaisavljevic
f1a6e48dc6 Updated copy and removed URLs
refs https://github.com/TryGhost/Product/issues/3926
2023-09-21 12:37:00 +01:00
Djordje Vlaisavljevic
5e84232913 Bumped up recommendation favicon size
refs https://github.com/TryGhost/Product/issues/3926
2023-09-21 12:37:00 +01:00
Djordje Vlaisavljevic
40eaf95a39 Updated copy
refs https://github.com/TryGhost/Product/issues/3926
2023-09-21 12:37:00 +01:00
Djordje Vlaisavljevic
02bf794a0e Updated Table component to accept complex hints
refs https://github.com/TryGhost/Product/issues/3926
2023-09-21 12:37:00 +01:00
renovate[bot]
6e960bf477 Update sentry-javascript monorepo to v7.70.0 2023-09-21 11:51:47 +02:00
renovate[bot]
ea521242e1 Update dependency autoprefixer to v10.4.16 2023-09-21 11:50:58 +02:00
Jono M
c572f2855d
Added error boundaries to AdminX to avoid crashing the entire page (#18255)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-21 10:42:48 +01:00
renovate[bot]
ffafec9690 Update dependency react-select to v5.7.5 2023-09-21 11:30:39 +02:00
Ronald Langeveld
60de9387fb
Added Pintura integration to Twitter and Facebook meta cards (#18264)
no issue

- wired up the pintura integration to facebook and twitter meta card editors

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at e01c851</samp>

This pull request adds the ability to edit images for Facebook and
Twitter cards in the general settings component using Pintura, a
web-based image editor. It introduces a custom hook to handle the
Pintura editor logic and settings, and modifies the `ImageInput`
component to accept a prop to enable or disable the feature. It affects
the files `Facebook.tsx` and `Twitter.tsx` in the
`apps/admin-x-settings/src/components/settings/general` directory.
2023-09-21 08:35:57 +00:00
renovate[bot]
93648eecb5 Update dependency @uiw/react-codemirror to v4.21.15 2023-09-21 04:21:40 +00:00
Ronald Langeveld
9339364dce
Added Unsplash selector to AdminX (#18216)
no issue

- Copied over the Unsplash Component from Koenig to AdminX and converted
it to Typescript.
- Changed the business logic to follow a bit of dependency injection to
make it more testable and easier to maintain.
- Ideally we move this out of Admin X Settings and perhaps into it's own
library so we don't need to deal with a duplicate code between Koenig
and Admin X.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a40bf5b</samp>

This pull request adds support for selecting images from Unsplash in the
admin settings UI. It introduces a new `UnsplashService` class that
handles the Unsplash API requests and a new `MasonryService` class that
handles the masonry layout of the images. It also adds several new
custom components, such as `UnsplashButton`, `UnsplashGallery`,
`UnsplashImage`, `UnsplashSelector`, `UnsplashZoomed`, and
`UnsplashSearchModal`, that render the Unsplash modal and its elements.
It modifies the existing `ImageUpload`, `App`, `ServicesProvider`, and
`BrandSettings` components to integrate the Unsplash feature and pass
the necessary props. It also adds some new types, constants, and assets
related to the Unsplash data and UI. Finally, it adds some unit tests
for the `UnsplashService` and `MasonryService` classes.
2023-09-21 02:23:45 +00:00
Sag
62bf3e068d
Fixed disapparing Ghost icon in the Recommendation list (#18257)
no issue
2023-09-20 20:49:21 +00:00