Commit Graph

1188 Commits

Author SHA1 Message Date
Sag
b304a88a63
Hooked 'Maybe Later' button in the Recommendations modal (#18337)
closes https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:25:28 +00:00
Djordje Vlaisavljevic
9b1be9dda7 Removed unnecessary check
refs https://github.com/TryGhost/Product/issues/3941
2023-09-25 15:29:38 +01:00
Djordje Vlaisavljevic
21bdd38b37 Added "Maybe later" button to recommendations modal
refs https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:29:38 +01:00
Djordje Vlaisavljevic
c62483c95b Added recommendation favicon placeholder div
no ref
2023-09-25 15:29:38 +01:00
Jono M
aa8063d081
Slightly improved AdminX pagination behaviour (#18331)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at e1d84b3</samp>

This pull request fixes pagination bugs and improves pagination features
in various components and hooks of the admin settings app. It uses the
`meta` object from the API responses to display and fetch the correct
number of items in the lists of newsletters, tiers, users and actions.
It also simplifies and refactors some of the code to avoid repetition
and unnecessary properties.
2023-09-25 14:09:35 +00:00
Jono M
0e35baaf01
Refactored limit=all queries to be paginated in AdminX (#18324)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 0095d23</samp>

The pull request adds support for asynchronous and creatable select
inputs in various components, using the `react-select` and
`@tanstack/react-query` libraries. It also adds pagination features to
the newsletters and tiers lists, using a `Button` component and infinite
queries. It refactors and fixes the type and null handling of the select
inputs and their options, using the `SelectOption` type and the
`useFilterableApi` and `debounce` hooks. It removes some unnecessary
props from the browse queries, and adds a new custom hook
`useDefaultRecipientsOptions` for the default recipients component. It
updates the stories and modals to use the new select inputs and options.
2023-09-25 14:03:47 +01:00
Peter Zimon
c4773b946b
AdminX handling '/' in textfields vs. searchbar shortcut (#18283)
refs. https://github.com/TryGhost/Product/issues/3349

- We've added a keyboard shortcut '/' to focus in on the searchfield in
AdminX. However this didn't handle the case when the focus is already in
a textfield and when tried to enter e.g. "https://", then at the '/'
character it focused on the searchfield.

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-09-25 14:22:10 +02:00
Djordje Vlaisavljevic
fac61e4d30
Improved recommendations settings design (#18330)
refs https://github.com/TryGhost/Product/issues/3948, https://github.com/TryGhost/Product/issues/3941

- Added `counter` prop to `TabView` and updated Recommendations.tsx to use it
- Improved dark mode design for recommendation settings
2023-09-25 12:14:35 +00:00
Ronald Langeveld
da28aa5fc9
Fixed Pintura config on Admin X (#18326)
no issue

- We didn't take Pintura settings into account have the url's passed in
via configs as opposed to the database entry.
- this checks for both now.
- We also now require less configuration to wire in the editor.

---

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

This pull request removes the dependency on the `pintura` setting value
for enabling the Pintura image editor in various components in the admin
settings app. It uses a custom hook, `usePinturaEditor`, to get the
editor configuration and availability from the global config and the
settings API. It also adds error reporting and refactors the hook code
for simplicity and consistency.
2023-09-25 17:14:09 +07:00
renovate[bot]
1387c64e5a Update dependency @playwright/test to v1.38.1 2023-09-25 09:12:04 +02:00
Ronald Langeveld
0712f17546
Fixed Sentry initialising twice in Admin and AdminX (#18321)
no issue

- The second initialisation inside the React app isn't needed since it's
being initialised by Ember and the required settings is being passed
correctly to the Ember library inside React.
- The second initialisation caused Admin X to not report issues
correctly.
- To test, add `"client_sentry": { "enabled": false, "dsn": "" }` to the
`config.development.json` and write some bad code to trigger issues.

---

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

This change refactors the error handling and reporting logic in the
`admin-x-settings` app by removing the redundant Sentry initialization
from the `App` component and using the global instance instead. This
avoids potential conflicts and performance issues with multiple Sentry
instances.
2023-09-25 12:00:47 +07:00
Daniel Lockyer
fc43d181e3 Released Sodo-Search v1.1.1 2023-09-22 18:33:10 +02:00
Simon Backx
353b9c6efc
Updated recommendation notifications copy (#18308)
no issue
2023-09-22 15:51:54 +00:00
Simon Backx
b82a93beac
Added recommendation_notifications column to users table (#18304)
fixes https://github.com/TryGhost/Product/issues/3939
2023-09-22 15:35:55 +00:00
Djordje Vlaisavljevic
f50c25d63c Updated Show All button color
refs https://github.com/TryGhost/Product/issues/3926
2023-09-22 14:56:14 +01:00
Djordje Vlaisavljevic
16cb8d2599 Fixed stats labels
refs https://github.com/TryGhost/Product/issues/3891
2023-09-22 14:56:14 +01:00
Djordje Vlaisavljevic
99e455a4f5 Fixed recommendations modal heading issue
no ref
2023-09-22 14:42:16 +01:00
Sag
9c9f0ebadf
Added total count of recommendations on the tabs (#18303)
closes https://github.com/TryGhost/Product/issues/3941
2023-09-22 13:25:20 +00:00
Djordje Vlaisavljevic
23ec56bedf Fixed loading indicator dark mode issue
no ref
2023-09-22 14:13:41 +01:00
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
267d8d05f1 Updated Recommending you table design
refs https://github.com/TryGhost/Product/issues/3891
2023-09-22 13:00:29 +01: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
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
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
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
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
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
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
Sag
163263a27f
Fixed edit a recommendation on page 2 or more (#18256)
closes https://github.com/TryGhost/Product/issues/3903

- we do not update the route when opening "Edit a recommendation"
anymore. By doing so, we can pass the recommendation object to the edit
page, without having to refetch it from the database
2023-09-20 20:33:53 +00:00
Sag
8515bdf587
Updated uniqueness validation for the Recommendations URL (#18253)
closes https://github.com/TryGhost/Product/issues/3818

- instead of fetching all recommendations and matching URLs on the frontend, we now query the database directly to find an existing Recommendation by URL. When comparing URLs, we don't take into account the protocol, www, query parameters nor hash fragments
2023-09-20 16:53:10 +00:00
Simon Backx
715d658e11
Disabled one-click subscribe when Portal checkbox is required (#18252)
fixes https://github.com/TryGhost/Product/issues/3911

For now we decided that we don't want to enable one-click-subscribe in
case a site has a required checkbox (which isn't shown during the
one-click-subscribe flow)
2023-09-20 15:35:10 +00:00
Peter Zimon
02692a15e2
AdminX design updates (#18238)
refs. https://github.com/TryGhost/Product/issues/3349
2023-09-20 16:38:36 +02:00
Djordje Vlaisavljevic
7439e68628 Updated recommendations design
refs https://github.com/TryGhost/Product/issues/3898
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
8927d911cf Added Ghost favicons to recommendations with 1-click subscribe
refs https://github.com/TryGhost/Product/issues/3902
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
88c9ee8a34 Changed copy for removing recommendations
refs https://github.com/TryGhost/Product/issues/3899
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
1bfedcfd00 Moved Preview above the form
refs https://github.com/TryGhost/Product/issues/3857
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
9dea3d344a Commented out "Recommending you" stats while we're in QA
no refs
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
8f5ac0620b Added Ghost favicon to recommendations with 1-click subscribe
refs https://github.com/TryGhost/Product/issues/3902
2023-09-20 14:46:26 +01:00
Djordje Vlaisavljevic
cfea7a2822 Added Ghost favicon
refs https://github.com/TryGhost/Product/issues/3902
2023-09-20 14:46:26 +01:00
Peter Zimon
97cbd33159
Fixed footer padding bug in AdminX modals (#18249)
refs. https://github.com/TryGhost/Product/issues/3349
2023-09-20 12:49:24 +00:00
Peter Zimon
0b07c44797
AdminX searchfield keyboard shortcut (#18244)
refs. https://github.com/TryGhost/Product/issues/3349

- it's a bit cumbersome to always click in the searchfield to use it.
`/` is a standard keyboard shortcut to focus on a searchfield in
apps. Also, by auto-focusing on the searchfield it's even faster to find
settings.
2023-09-20 14:32:18 +02:00
Peter Zimon
b4bcc193a4
Updated history staff search (#18108)
refs. https://github.com/TryGhost/Product/issues/3349

- newsletter searchfield was showing a "Clear" button once it had content. It needed to be using standard React dropdown instead
- modals needed an option to make the header sticky so it's more versatile. It's now used in the History modal

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-20 12:28:29 +02:00
Daniel Lockyer
71a072ee66 Deleted Vite SVG from Admin-X-Settings
- this is no longer needed and is left over from the initial Vite setup
2023-09-20 11:01:47 +02:00
Mark Stosberg
7fa083d774
🐛 Fixed escaping search terms that contain special characters (#18151)
fixes https://github.com/TryGhost/Ghost/issues/18133

Before, Sodo Search was not escaping search input before using the search terms in a regular expression, so using special characters could result in an invalid regular expression which would crash JavaScript.

As regular expressions date back to Perl, so does a standard solution for this, which called quotemeta in Perl. It doesn't exist 1:1 in JavaScript, but StackOverflow had the answer: stackoverflow.com/questions/6318710/javascript-equivalent-of-perls-q-e-or-quotemeta

So a line of code is added to escape the special characters in the regex for passing them through. This is the same code that the quotemeta module on NPM would use.
2023-09-20 10:17:21 +02:00
Daniel Lockyer
d46aab5b43 Optimized bundle size of @tryghost/limit-service
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695149803260239
refs 290bc71d6a

- previous versions of `@tryghost/limit-service` did a full import of
  lodash, which would bloat the bundle size, especially when we only use
  a few of its functions
- I've since fixed that and this commit bumps Ghost to the smaller
  version
2023-09-20 09:54:07 +02:00
renovate[bot]
c055179765 Update dependency vite-plugin-svgr to v3.3.0 2023-09-20 08:41:57 +02:00
Jono M
3928b628ca
Update labs settings in Ember when changed in AdminX (#18231)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-19 18:48:47 +00:00
Jono M
64d7c73b00
Optimised bundle size and configuration in AdminX (#18227)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at eaad533</samp>

Refactored the code for modal components in the admin-x-settings app to
improve performance, readability, type-safety, and compatibility. Used
dynamic import, default import, `import.meta.glob`, and type aliases to
simplify the logic of importing and rendering modal components. Applied
the type alias `RoutingModalProps` to all modal components to ensure
consistent and safe props.
2023-09-19 16:54:01 +00:00
Peter Zimon
1b004af184
AdminX UI bugfixes and refinements (#18195)
refs. https://github.com/TryGhost/Product/issues/3349

- updated tiers archive/activate pattern to it less prominent
- update newsletter archive/activate pattern to it less prominent
- fixed react-select z-index bug
- fixed Stripe disconnect copy error bug
- set max-height to embeddable signup form sidebar to avoid jumping when color picker is visible

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-19 17:12:52 +02:00
Djordje Vlaisavljevic
85484c20af Updated recommendation list design in portal
refs https://github.com/TryGhost/Product/issues/3898
2023-09-19 15:39:33 +01:00
Djordje Vlaisavljevic
4e04b8c2d2 Updated "Your recommendations" list design
refs https://github.com/TryGhost/Product/issues/3786
2023-09-19 15:39:33 +01:00
renovate[bot]
66f17cc82e Update tiptap monorepo to v2.1.10 2023-09-19 15:15:21 +02:00
Djordje Vlaisavljevic
f9fbcb3376 Added a hint to try to avoid long descriptions
refs https://github.com/TryGhost/Product/issues/3888
2023-09-19 13:07:32 +01:00
Djordje Vlaisavljevic
8af7b022fd Added a badge to "Your recommendation" items that have 1-click subscribe
refs  https://github.com/TryGhost/Product/issues/3888
2023-09-19 13:07:32 +01:00
Peter Zimon
09a36a81d1
AdminX mobile updates (#18137)
refs. https://github.com/TryGhost/Product/issues/3349
2023-09-19 12:09:38 +02:00
Daniel Lockyer
f705dda314 Updated Admin-X bundling process
refs https://github.com/TryGhost/DevOps/issues/80

- as part of moving Admin-X-Setting towards GA, we want to change it from
  loading the settings externally via a CDN, to bundling it in with
  Admin
- the bulk of the changes here are removing the config in Ghost, setting
  up the copy to the Admin assets dir, and loading the new path in Admin
- several other changes have come along the way as I've cleaned up
  unneeded code
2023-09-19 11:31:55 +02:00
Jono M
bd013ed18c
Fixed minor AdminX logic issues (#18209)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at fd2a023</samp>

This pull request improves the UI and UX of the admin settings app by
fixing some bugs, enhancing some components, and adding some logic to
handle different feature states. It affects the `ColorPickerField`,
`Toggle`, `EnableNewsletters`, `TierDetailModal`, `Modal`, and
`DefaultRecipients` components, as well as the files
`ColorPickerField.tsx`, `Toggle.tsx`, `EnableNewsletters.tsx`,
`TierDetailModal.tsx`, `Modal.tsx`, and `DefaultRecipients.tsx`.
2023-09-19 08:56:11 +01:00
renovate[bot]
530492635f Update dependency @types/react to v18.2.22 2023-09-19 08:30:58 +02:00
renovate[bot]
8cfff3743b Update dependency postcss to v8.4.30 2023-09-19 08:09:20 +02:00
Sag
3b1fcb6c16
Added fixed height to avoid jumps in the Recommendations settings (#18184)
closes https://github.com/TryGhost/Product/issues/3881

We observe the height of the recommendation table, and keep it fixed between pages — so that the UX is smoother when navigating between pages.
2023-09-18 17:43:57 +02:00
Jono M
343535116c
Updated select to use react-select (#18164)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at adffb67</samp>

This file updates the global form select component to use a custom
`ReactSelect` component with better performance and style.
2023-09-18 14:51:59 +01:00
Djordje Vlaisavljevic
308a76faf3 Removed "Remove" button from recommendation list
refs https://github.com/TryGhost/Product/issues/3899
2023-09-18 14:49:04 +01:00
Djordje Vlaisavljevic
a66d811236 Added "Remove" button to "Edit recommendation" modal
refs https://github.com/TryGhost/Product/issues/3899
2023-09-18 14:49:04 +01:00
Djordje Vlaisavljevic
6822c6db24 Added "Subscribe" button to Ghost-site previews
refs https://github.com/TryGhost/Product/issues/3857
2023-09-18 14:49:04 +01:00
Sag
7c2316de59
Added a timeout when adding a recommendation (#18204)
closes https://github.com/TryGhost/Product/issues/3896

- added a timeout option to the useFetchApi() helper, to abort a fetch request after x seconds
- when adding a recommendation, we make two network calls: 1) check whether it's a Ghost site or not, 2) if not, fetch site metadata via embed. Now both of these calls have a timeout of 5 sec, which means a total waiting time of 5 seconds max. for a Ghost site, 10 seconds max. for a non-Ghost site
2023-09-18 15:12:54 +02:00
Jono M
79cd49c01b
Improved AdminX design settings experience (#18180)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 60bbe0a</samp>

This pull request improves the performance and readability of the site
design and theme settings UI. It refactors the modal navigation logic,
the color picker field component, and the theme preview component. It
also removes unnecessary dependencies and props from the modal
components, and adds a new `DesignAndThemeModal` component to handle the
modal switching.
2023-09-18 12:09:26 +01:00
Djordje Vlaisavljevic
cce7152d72 Fixed spacing issue
refs https://github.com/TryGhost/Product/issues/3857
2023-09-18 11:55:02 +01:00
Djordje Vlaisavljevic
d443befd16 Added recommendation URL to "Edit recommendation" modal
refs https://github.com/TryGhost/Product/issues/3857
2023-09-18 11:55:02 +01:00
Peter Zimon
3043c27d5a
AdminX UI fixes (#18167)
refs. https://github.com/TryGhost/Product/issues/3349
2023-09-15 18:35:16 +02:00
Simon Backx
d26c0c7995 Released Portal v2.36.0 2023-09-15 16:47:12 +02:00
Simon Backx
05b3f66132 Released @tryghost/admin-x-settings v0.0.20 2023-09-15 16:46:13 +02:00
Djordje Vlaisavljevic
3884c1c36d Added a hint when adding a recommendation for a Ghost site
refs https://github.com/TryGhost/Product/issues/3888
2023-09-15 15:37:19 +01:00
Simon Backx
ff61b33049 Grouped recommendations in Portal
fixes https://github.com/TryGhost/Product/issues/3893
2023-09-15 16:23:36 +02:00
Simon Backx
9a4c0ba33b Fixed counting subscribe after click on RecommendationsPage
fixes https://github.com/TryGhost/Product/issues/3892

After a user visited a site, we should still a subscribe that happens later.
2023-09-15 16:23:36 +02:00
renovate[bot]
ccf508e8f7 Update tiptap monorepo to v2.1.10 2023-09-15 14:12:47 +00:00
Simon Backx
4e2710ada2 Added stats to recommendations endpoints
fixes https://github.com/TryGhost/Product/issues/3854
fixes https://github.com/TryGhost/Product/issues/3864
2023-09-15 15:57:27 +02:00
Sag
6e68c43f78
Added uniqueness validation for the recommendation URL (#18163)
closes https://github.com/TryGhost/Product/issues/3818

- in Admin, when adding a recommendation, the URL is compared against all existing ones. If the URL is already recommended, the publisher is shown an error: "A recommendation with this URL already exists.". Protocol, www, query parameters and hash fragments are ignored during the URL comparison.
- on the backend, there is another uniqueness validation for the recommendation URL. This check is redundant when adding a recommendation from Admin, but helps to keep data integrity when recommendations are added through other paths (e.g. via the API)
2023-09-15 13:14:47 +00:00
Daniel Lockyer
caab89ff4d Reverted flexsearch to v0.7.21
refs https://github.com/TryGhost/Ghost/pull/18151
refs 1cbbe91a63

- something has broken within 0.7.31 and it's causing an error on the
  frontend
- this commit reverts the dependency back to the previous version
- also cleans up the dependency from announcement-bar, where it is not
  used
2023-09-15 15:07:57 +02:00
Djordje Vlaisavljevic
4fc03e5f25
Improved Table component and its storybook (#18169)
refs https://github.com/TryGhost/Product/issues/3890

- Made Table and its children semantic
- Updated Table and TableRow storybooks with new examples
- Fixed smaller visual bugs
2023-09-15 12:09:19 +00:00
renovate[bot]
d5bcd42496 Update dependency @storybook/testing-library to v0.2.1 2023-09-15 11:15:56 +02:00
Jono M
3bf24cd4a2
Fixed Lexical editors being marked as dirty on load (#18159)
refs https://github.com/TryGhost/Product/issues/3832

---

This pull request improves the user experience and the data quality of
the newsletter settings form. It adds a feature to disable the save
button when there are no changes, and to show feedback on the save
status. It also fixes a bug in the `HtmlEditor` component that causes
unwanted style attributes to be added to the newsletter content.
2023-09-15 10:07:14 +01:00
Ronald Langeveld
851504030c
Added Support Email verification modals to Admin X (#18152)
refs
https://www.notion.so/ghost/df5bdea8f7ea4aca9d25eceb6a1bf34c?v=be2f15b6b58b4c27a0e11374282bead0&p=163762d9513a4e6dbd60c28e19228fdc&pm=s

- Added a modal to confirm that the new support email has been verified.
- to achieve that a couple of adjustments had to be made
- Updated the RoutingProvider to handle routes with query params.
- Added a new useQueryParams hook to grab query params where needed.
- wired up the email verification api.
- added feature flags / labs logic to the core package with the new URL and updated test.

---

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

This pull request adds email verification functionality for the support
email address in the portal settings. It fixes a bug in the routing
provider, adds a new API function, a new custom hook, and a new modal
component to handle the verification process. It also updates the
settings query with the verified email address.
2023-09-15 16:00:24 +07:00
Daniel Lockyer
8b0de7e6e4 Temporarily increased timeout for Comments-UI web server init
refs https://github.com/TryGhost/Product/issues/3867

- this helps avoid flaky tests before we investigate further
2023-09-15 10:48:08 +02:00
renovate[bot]
9730229968 Update sentry-javascript monorepo to v7.69.0 2023-09-15 10:33:55 +02:00
renovate[bot]
a58c77f20a Update tiptap monorepo to v2.1.9 2023-09-15 08:26:18 +00:00
renovate[bot]
a28e4a4395 Update dependency @playwright/test to v1.38.0 2023-09-15 10:09:33 +02:00
Jono M
2310e9d93f
Fixed AdminX user details modal behaviour (#18153)
refs https://github.com/TryGhost/Product/issues/3832

---

This pull request improves the user management and Stripe integration
features in the admin-x-settings app. It adds a new `ChangePasswordForm`
component for changing user passwords, refactors the error handling and
response handling logic in the `StripeConnectModal` and `apiRequests`
files, and fixes a bug in the `UserDetailModal` component. It also
creates new files for the custom error classes and the response handling
function.
2023-09-15 08:50:09 +01:00
Ronald Langeveld
384c232b1a
Bumped Admin X to 0.0.19 (#18136)
no issue

---

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

Updated `@tryghost/admin-x-settings` package to version 0.0.19. This
package provides the settings UI for the Ghost admin app and includes
some bug fixes and improvements.
2023-09-15 08:06:34 +07:00
Peter Zimon
bcb543d039
Update settings for roles in AdminX (#18147)
refs. https://github.com/TryGhost/Product/issues/3349

- updated user modal for various roles
2023-09-14 19:20:50 +02:00
Michael Barrett
32eb4635cf
Updated data-members-newsletter to use the name of the newsletter (#18072)
refs https://github.com/TryGhost/Product/issues/3860

`data-members-newsletter` implementation was updated to use the `name`
of the newsletter instead of it's `id`
2023-09-14 16:02:09 +01:00
Djordje Vlaisavljevic
82e9aae4cc
Made LoadingIndicator component more flexible (#18145)
refs https://github.com/TryGhost/Product/issues/3849

- Added small and medium variants of `LoadingIndicator` component
- Added `Loading` prop to `Button` component, which uses `LoadingIndicator`
- Updated instances of `Modal` component so they use the new `LoadingIndicator`
2023-09-14 14:57:41 +00:00
Jono M
a79de45392
Fixed tiers and scrolling bugs with AdminX (#18138)
refs https://github.com/TryGhost/Product/issues/3832

- Updated tier benefits to be added when pressing enter
- Updated tier sorting logic to make sure free comes first
- Updated scrolling behaviour and made the sidebar scroll automatically
- Added placeholder backdrop when loading a modal to prevent flashing

And other minor fixes
- Removed placeholder from newsletter footer field
- Updated theme installation to work with the default theme
2023-09-14 14:09:51 +00:00
Simon Backx
e3347827ca Added sending of events when clicking or subscribing to a recommendation
fixes https://github.com/TryGhost/Product/issues/3855
2023-09-14 14:47:02 +02:00
Djordje Vlaisavljevic
b1cd7dd898 Added Table wrapper
refs https://github.com/TryGhost/Product/issues/3881
2023-09-14 12:25:48 +01:00
Peter Zimon
dff8c38547
AdminX UI fixes (#18110)
refs. https://github.com/TryGhost/Product/issues/3349

- fix tiers save & close bug
- show trial days on tier card
- removed 0's from monthly and yearly tier prices
- added color to learn more link in tier modal
- set background to white in newsletter preview
- fixed newsletter default sender data
- removed underline in "View in browser" link in newsletter preview
- updated copy in newsletters
- added Integrations' active indicator
- scrolling menu under searchbar to give search more prominance
- updated Portal modal buttons to be consistent with design settings
- fixed bug in AdminX loading Orb so that it actually starts auto-playing
2023-09-14 12:04:31 +02:00
Ronald Langeveld
d7835ad5ed
Bumped Admin X to 0.0.18 (#18135)
no issue

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-09-14 09:44:53 +00:00
Ronald Langeveld
34db31a2a6
Changed staff token to fetch on request (#18132)
no issue

- Solves an issue where it didn't fetch the updated staff token after
saving and still used the cached one which is invalidated.
---

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

Improved staff token handling in `UserDetailModal` component. This
component fetches and displays a staff token for a user in the general
settings, and prevents editing or errors.
2023-09-14 15:03:35 +07:00
Jono M
00e598b365
Updated AdminX features for different roles (#18131)
refs https://github.com/TryGhost/Product/issues/3832

---

This pull request introduces a new `MainContent` component that handles
the role-based access and rendering of the settings page and the
sidebar. It also refactors and improves the UI and logic of the
`UserDetailModal` and the `Users` components, and updates the footer
component to use the new settings page and profile modal for editors.
Additionally, it removes unused code and adds new helper functions for
checking the user's roles and permissions.
2023-09-14 07:48:07 +00:00
Ronald Langeveld
fd4c3d1e53
Fixed flaky announcement test for Admin X (#18130)
no issue

- Attempts to resolve a flaky test.
---

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

Refactor announcement bar preview test to use a helper function for
checking text in iframes. This improves code quality and readability.
2023-09-14 14:28:05 +07:00
Jono M
a9f9f6121a
Updated AdminX scroll margin to work consistently on different screens (#18127)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-14 06:31:38 +00:00
Ronald Langeveld
430671d12a
Added Staff Token copy and generation to Admin X (#18123)
refs
https://www.notion.so/ghost/Staff-access-token-is-missing-from-user-detail-screen-0336ea3e586c4b88ad7dae266a95429c?pvs=4

- Added API routes to retrieve and regenrate Staff Token keys.
- Wired up UI

---

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

This pull request introduces a new feature for staff access tokens,
which enable users to access the Ghost Admin API securely and
conveniently. It adds a new `staffToken.ts` module for the API logic and
a new `StaffToken` component for the UI. It also integrates the feature
into the user profile and settings in the `general` page.
2023-09-14 12:51:42 +07:00
Djordje Vlaisavljevic
b5ab3af8a6
Removed success toast on 1-click subscribe (#18119)
refs https://github.com/TryGhost/Product/issues/3880
2023-09-13 15:25:17 +00:00
Simon Backx
5d696d0d0a
Updated recommendation creation to use excerpt by default (#18118)
fixes https://github.com/TryGhost/Product/issues/3869
2023-09-13 14:23:52 +00:00
Djordje Vlaisavljevic
e9af2c86c1 Added inline success message after 1-click subscribe
refs https://github.com/TryGhost/Product/issues/3880
2023-09-13 14:50:55 +01:00
Simon Backx
0559c8ba64
Fixed loading 0th page of recommendations (#18116)
no issue

When the total numbers of pages was 0, the pagination hook would try to
load the 0th page which would cause an API error.
2023-09-13 15:46:18 +02:00
Simon Backx
908e02c016
Added recommedation add/remove toasts (#18113)
fixes https://github.com/TryGhost/Product/issues/3844
2023-09-13 15:31:29 +02:00
Jono M
7462ad2be6
Updated AdminX search to also hide sidebar items (#18109)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-13 13:47:05 +01:00
Jono M
7cc9d959fc
Updated AdminX scroll handling to work more consistently (#18106)
refs https://github.com/TryGhost/Product/issues/3832

---

Refactored the scrolling logic for the settings page into a custom hook
and context. This improves the navigation and user experience of the
settings page and simplifies the code. Added the file
`useScrollSection.tsx` and updated the files `SettingGroup.tsx`,
`SettingNavItem.tsx`, `RoutingProvider.tsx`, and `useRouting.tsx`
accordingly.
2023-09-13 11:52:00 +01:00
Ronald Langeveld
279ce77226
Wired Pintura Editor to Admin X (#18100)
no issue

This pull request adds the Pintura image editor as an optional feature
for image settings in the admin-x. 
It introduces a `usePinturaEditor` hook that handles the loading and
management of the Pintura editor instance, and a custom edit button for
the `ImageUpload` component that can open the editor. 
It also modifies the `BrandSettings` and `UserDetailModel` component to use the hook and the button.

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-09-13 17:28:05 +07:00
Jono M
9bf40795d6
Added staff filtering to AdminX history view (#18104)
refs https://github.com/TryGhost/Product/issues/3832

---

This pull request adds a new feature to filter and view the history of
actions performed by staff users in the admin settings. It introduces a
new route and a MultiSelect component for the history modal, and updates
the UserDetailModal component to link to the history modal with the user
parameter.
2023-09-13 07:42:58 +00:00
renovate[bot]
212eacf4b9 Update dependency @tanstack/react-query to v4.35.3 2023-09-13 07:23:03 +00:00
Jono M
9b2387a364
Fixed bugs in AdminX portal and theme settings (#18099)
refs https://github.com/TryGhost/Product/issues/3832

- Fixed portal preview when no tiers are enabled
- Fixed portal preview not respecting access setting
- Disabled portal customisation when nobody can sign up
- Fixed custom theme settings not updated when theme is changed
- Added publication icon setting in newsletters
- Added extremely rudimentary editor role display
- Fixed drag overlay position in modals
2023-09-13 07:10:33 +00:00
Ronald Langeveld
2554c0df31
Added createable selector to embed in AdminX (#18094)
no issue

Added the ability to create new labels for the embed signup form in the
admin-x-settings app. This involved importing a new component and adding
a prop to the `MultiSelect` component, and enabling the prop in the
`EmbedSignupSidebar` component.
2023-09-13 10:32:55 +07:00
Jono M
60b69f510c
Bumped AdminX settings to 0.0.17 (#18093)
no issue
2023-09-12 18:47:02 +00:00
Peter Zimon
be32b23295
AdminX copy updates (#18092)
refs. https://github.com/TryGhost/Product/issues/3349

- couple of copy had to be updated in AdminX
2023-09-12 17:15:42 +02:00
Peter Zimon
dbe1c0fa2e
AdminX various UI fixes (#18089)
refs. https://github.com/TryGhost/Product/issues/3349

- some of the UI components' scrollbar was visible where it wasn't necessary
- metadata preview was shown in view mode too
- social accounts value was shown even if it was empty
- user detail modal was missing field descriptions
- it was not possible to reopen the Zapier modal after closing it the "Close" button
- copy had to be updated for analytics export to make it clear what is going to be exported
- invite modal had to be closed after successful invitation
- toggle component was only active on the text itself, instead of the whole row
2023-09-12 16:11:12 +02:00
Djordje Vlaisavljevic
3995713551 Added static design for recommendation stats
refs https://github.com/TryGhost/Product/issues/3864
2023-09-12 14:44:52 +01:00
Djordje Vlaisavljevic
75311cc534 Updated design to handle one-click subscriptions better
refs https://github.com/TryGhost/Product/issues/3856
2023-09-12 12:37:28 +01:00
Djordje Vlaisavljevic
919132e325 Updated copy
no refs
2023-09-12 12:37:28 +01:00
Daniel Lockyer
35c70fcf2a Temporarily increased test timeout for Comments-UI
refs https://github.com/TryGhost/Product/issues/3867

- this temporarily increases the timeout to avoid some flaky CI
  performance until the cause has been fixed
2023-09-12 12:56:14 +02:00
Simon Backx
d166977ae4
Updated Portal to always honor outboundLinkTagging setting (#18079)
no issue

- Do not set ?ref in recommendations if analytics is disabled
- Do not send url_history if analytics is disabled
- Expose outboundLinkTagging as a public setting
2023-09-12 10:27:04 +00:00
Peter Zimon
9477a08a90
Added view site link to themes modal (#18080)
refs. https://github.com/TryGhost/Product/issues/3349

- "View site" link was missing in the new theme preview modal
- The size of the preview was not responding to smaller screens
2023-09-12 12:18:59 +02:00
Peter Zimon
25e240357e
AdminX global loading Orb (#18076)
refs. https://github.com/TryGhost/Product/issues/3349

- we showed a "Loading..." text for people on super slow connection
instead of the animated Ghost Orb
2023-09-12 11:56:41 +02:00
Simon Backx
562123f06a
Added attribution to recommendation clicks (#18077)
fixes https://github.com/TryGhost/Product/issues/3865
2023-09-12 09:21:37 +00:00
Simon Backx
6475895f9e
Added loading indicator to one click signup (#18075)
no issue
2023-09-12 09:04:43 +00:00
Simon Backx
c863ed2188
Fixed white page during one click subscribe flow (#18074)
no issue

In Chrome, opening a new tab immediately focusses it, even when trying
to blur or focus the main window.
2023-09-12 08:36:50 +00:00
Simon Backx
f130fb2e85
Implemented one-click-subscribe for recommendations (#18067)
fixes https://github.com/TryGhost/Product/issues/3856
2023-09-11 17:06:15 +02:00
Ronald Langeveld
8263e34adc
Bumped AdminX to 0.0.16 (#18066)
no issue

---

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

Updated `@tryghost/admin-x-settings` package to version 0.0.16 with
dependency and bug fixes. This package provides the settings UI for the
Ghost admin app.
2023-09-11 13:42:46 +00:00
Ronald Langeveld
1aa9dffbec
Optimised iframe buffering on AdminX (#18064)
no issue

- Added a little delay to allow for a bit more time to load before
swapping.
- Also fixed a little bug where the array condition in the memo is
returning false.


---

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

Improved the loading behavior of the admin settings page by adding a
delay before showing the iframes. Fixed a typo in the `data-testid`
attribute of `IframeBuffering.tsx`.
2023-09-11 20:29:04 +07:00
Peter Zimon
fec67c8d2a
Fix AdminX preview header color bug (#18065)
refs. https://github.com/TryGhost/Product/issues/3349
2023-09-11 15:28:09 +02:00
Ronald Langeveld
f7f0f3033e
Added debounce to background colour picker (#18052)
no issue

---

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

Optimized theme settings component to use debounced function for
updating settings. This reduces API requests and improves UX.
2023-09-11 19:32:35 +07:00
Jono M
dd7df1ec6c
Bumped AdminX settings to 0.0.15 (#18062)
no issue
2023-09-11 12:00:27 +00:00
Jono M
07f1ae06c8
Fixed low-hanging fruit in AdminX (#18061)
refs https://github.com/TryGhost/Product/issues/3832

- Fixed code editor horizontal scroll
- Fixed toggle setting initial value in theme settings
- Prevented locking site without a password
- Updated to hide Pintura settings when config is set
- Updated mailgun settings to show only if not in server config
- Updated Pintura settings to hide banner when in server config
- Fixed body font category not updating in newsletter preview
- Fixed external images not loading when hosted
- Added character count to user bio
- Updated to scroll up when searching
- Fixed code editor not working with null value
- Improved form error messages
2023-09-11 12:49:45 +01:00
Jono M
acae53d9ed
Updated AdminX to be preloaded to improve perceived speed (#18059)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-11 10:55:12 +01:00
Peter Zimon
8064dda566
AdminX dark mode updates (#18056)
refs. https://github.com/TryGhost/Product/issues/3349

- modals in AdminX were not prepared for dark mode
2023-09-11 11:30:58 +02:00
Ronald Langeveld
3755384b66
Fixed visibility updating announcement bar in AdminX (#18058)
no issue

- fixed an issue where toggling the visibility of the announcement bar doesn't update the preview.
---

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

Simplified the `AnnouncementBarPreview` component by using a shallow
equality check for the `visibility` prop. This is part of a refactor to
use React hooks and functional components.
2023-09-11 16:14:09 +07:00
Ronald Langeveld
210de7fa11
Added iframe double buffering in AdminX (#18002)
refs https://github.com/TryGhost/Product/issues/3807
https://github.com/TryGhost/Product/issues/3806

Added double buffering to iframes in Admin to have smoother transitions when swapping out iframes for preview pages.
---

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

Refactored the announcement bar modal and preview components to use a
custom `IframeBuffering` component for better performance and
simplicity. Extracted the `IframeBuffering` component to a new file and
added some types and functions to support it. Removed some unused code
and cleaned up imports.
2023-09-11 15:23:12 +07:00
Peter Zimon
7ebbf9d56e
AdminX dark mode (#18035)
refs. https://github.com/TryGhost/Product/issues/3349

- added basic support for dark mode
2023-09-08 20:53:41 +02:00
Michael Barrett
7f9ba46ab6
Fixed data-members-newsletter when used with checkboxes (#18041)
no refs

When `data-members-newsletter` was used with checkboxes, if no
checkboxes were selected then the backend would subscribe the member to
the default newsletters which is not what we want - We want to subscribe
the members only to the newsletters they have selected
2023-09-08 14:12:16 +00:00
Michael Barrett
b472ffb39b
Fixed invalid selector for data-members-newsletter attribute (#18039)
no refs

Fixed invalid selector for `data-members-newsletter` attribute
2023-09-08 13:21:56 +00:00
Ronald Langeveld
d9b36567ca
Bumped AdminX to 0.0.14 (#18040)
no issue

---

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

Updated `@tryghost/admin-x-settings` package to version 0.0.14 with new
features and bug fixes. This package provides the settings UI for the
Ghost admin panel.
2023-09-08 13:19:45 +00:00
Princi Vershwal
963d4002cd
Added support for selectable newsletters in custom sign up-forms (#18030)
refs https://github.com/TryGhost/Product/issues/3836
2023-09-08 18:30:07 +05:30
Jono M
6306680993
Bumped AdminX to 0.0.13 (#18038)
no issue
2023-09-08 12:58:37 +00:00
Ronald Langeveld
0e81eb9f1f
Added colour picker to signup embed - AdminX (#18037)
refs https://github.com/TryGhost/Product/issues/3819

---

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

This pull request adds a color picker feature to the membership
settings, which lets the user customize the appearance of the embed
signup form. It modifies the `EmbedSignupFormModal` and
`EmbedSignupSidebar` components and uses the `ColorPicker` component
from the admin-x-ds library.
2023-09-08 19:50:18 +07:00
Djordje Vlaisavljevic
797dc4f218 Made Recommendation settings and Table component responsive
refs https://github.com/TryGhost/Product/issues/3839
2023-09-08 13:14:16 +01:00
Djordje Vlaisavljevic
8d1e636ca8 Improved pagination spacing
refs https://github.com/TryGhost/Product/issues/3822
2023-09-08 13:14:16 +01:00
Djordje Vlaisavljevic
58b5b25c8f Fixed pagination cursor states
refs https://github.com/TryGhost/Product/issues/3822
2023-09-08 13:14:16 +01:00
Peter Zimon
c1cc0b59f2
AdminX design fixes (#18029)
refs. https://github.com/TryGhost/Product/issues/3349

- Fixed change theme responsive issues
- Added marketplace link to themes
- Installed theme refinements
- Added current theme indicator
- Improved disabled textfield a bit
2023-09-08 13:58:31 +02:00
Daniel Lockyer
6dc1d08590 Re-enabled general eslint rules in TS config
refs https://github.com/TryGhost/DevOps/issues/50

- when creating a TS config in our `eslint-plugin-ghost` dependency, I
  only extended the recommended config, which left out a lot of
  stylistic things we used to enforce in JS
- this fixes that by bumping the dependency to a version which extends
  those shared configs, and fixes all the code that currently goes
  against those rules
2023-09-08 13:47:42 +02:00
Simon Backx
c08538ba84
Released Portal v2.35.2 (#18031) 2023-09-08 11:07:20 +00:00
Simon Backx
669be72673
Wired up pagination to recommendations (#18018)
fixes https://github.com/TryGhost/Product/issues/3822
fixes https://github.com/TryGhost/Product/issues/3838

This PR became a bit big because it affected multiple parts of Ghost
that needed to be updated to prevent breaking anything.

### Backend
- Added pagination to the recommendations API's
- Updated BookshelfRepository template implementation to handle
pagination
- Allow to pass `page` and `limit` options to Models `findAll`, to allow
fetching a page without also fetching the count/metadata (=> in the
repository pattern we prefer to fetch the count explicitly if we need
pagination metadata)
- Added E2E tests for public recommendations API (content API)
- Extended E2E tests of admin recommendations API

### Portal
- Corrected recommendations always loaded in Portal. Instead they are
now only fetched when the recommendations page is opened.

### Admin-X
- Added `usePagination` hook: internally used in the new
`usePaginatedQuery` hook. This automatically adds working pagination to
a query that can be used to display in a table by passing the
`pagination` and `isLoading` results to the `<Table>`
- Added placeholder `<LoadingIndicator>` component
- Added a loading indicator to `<Table>`. This remembers the previous
height of the table, to avoid layout jumps when going to the next page.
2023-09-08 12:32:06 +02:00
Ronald Langeveld
b0662d2cf9
Wired up embeddable signup form to Admin X (#18010)
refs https://github.com/TryGhost/Product/issues/3819

- Wired up embeddable signup form to admin x.
- minus the colour picker, to add in the next commit.
---

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

This pull request introduces a new feature that allows users to embed a
signup form for their blog site on other websites. It adds a new
component `EmbedSignupFormModal` that renders a modal with form
customization and code copying options. It also updates the `Config`
type and the `config.ts` file to store and access the necessary data for
the embed code generation.
2023-09-08 09:21:05 +00:00
Jono M
e9bff23aa9
Updated brand and theme settings to use custom color picker (#18026)
refs https://github.com/TryGhost/Product/issues/3832

---

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

This pull request refactors the color settings in the site design and
branding section of the admin settings app to use a reusable
`ColorPickerField` component. This improves the UI consistency, user
experience, and code readability.
2023-09-08 09:36:20 +01:00
Djordje Vlaisavljevic
fbb12f3c70 Fixed heading regression
refs https://github.com/TryGhost/Product/issues/3794
2023-09-08 09:34:22 +01:00
Princi Vershwal
83282ca4cd
Added checks for subscription to multiple newsletter through custom sign up form (#17994)
refs https://github.com/TryGhost/Product/issues/3810

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2023-09-07 18:27:32 +01:00
Michael Barrett
b70fd30a39
Add ability to specify newsletter in a custom sign-up form (#17956)
refs https://github.com/TryGhost/Product/issues/3809

When an input is added to a custom sign-up form with the attribute
`data-members-newsletter`, the value of the input will be used as the
newsletter to subscribe the member to.
2023-09-07 16:31:14 +01:00
Peter Zimon
608795d45a
Various AdminX mobile refinements (#18017)
refs. https://github.com/TryGhost/Product/issues/3349

- AdminX settings had a couple of minor bugs related to responsive styles
2023-09-07 16:39:30 +02:00
Djordje Vlaisavljevic
2b248c1f5a Added Pagination component to Table component
refs https://github.com/TryGhost/Product/issues/3822
2023-09-07 15:06:54 +01:00
Djordje Vlaisavljevic
f6c5f0394a Added static design for Pagination component
refs https://github.com/TryGhost/Product/issues/3822
2023-09-07 15:06:54 +01:00
Djordje Vlaisavljevic
ba71d53e82
Fixed table action not appearing on cell hover (#18014)
refs https://github.com/TryGhost/Product/issues/3823
2023-09-07 13:22:37 +00:00
Peter Zimon
78e2cb0c28
AdminX responsive design updates (#17979)
refs. https://github.com/TryGhost/Product/issues/3349

- A lot of pieces in AdminX missed proper handling of non-desktop devices
2023-09-07 13:23:26 +02:00
Djordje Vlaisavljevic
3d9f22c13a Fixed table action appearing in wrong position
refs https://github.com/TryGhost/Product/issues/3823
2023-09-07 11:48:40 +01:00
Simon Backx
6e7089e58a
Fixed loading of invalid recommendation icons and feature images (#18011)
fixes https://github.com/TryGhost/Product/issues/3811 
fixes https://github.com/TryGhost/Product/issues/3829
2023-09-07 12:30:59 +02:00
Jono M
1366296330
Bumped AdminX settings and fixed default JS path (#18007)
no issue
2023-09-07 08:53:51 +00:00
renovate[bot]
d23c86b547 Update dependency @tanstack/react-query to v4.35.0 2023-09-07 08:45:28 +00:00
Simon Backx
8f618c7b5c Updated Portal tests 2023-09-07 10:29:43 +02:00
Simon Backx
afeb9579b5 Released Portal v2.35.1 2023-09-07 10:29:43 +02:00
Simon Backx
d1c6bfefbc Fixed direct subscribe links broken
refs https://github.com/TryGhost/Product/issues/3770

- Site is not always defined, so the things broke when using the signup action without a defined site, where it wants to read the recommendations_enabled setting
- Fixed this by removing the welcome page and looking for the existing query params instead
2023-09-07 10:29:43 +02:00
Jono M
9e45afddb8
Updated AdminX to load via ES Modules to enable code splitting (#17971)
refs https://github.com/TryGhost/Product/issues/3349
2023-09-07 06:38:20 +00:00
Jono M
8a02d54326
Fixed AdminX search behaviour (#18003)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-07 06:17:35 +00:00
Peter Zimon
b91714f80e
Added AdminX Embeddable signup forms UI (#17972)
refs https://github.com/TryGhost/Product/issues/3819
2023-09-07 11:49:18 +07:00
Simon Backx
47c178b376
Released Admin-x-settings v0.0.11 (#17998) (#17999) 2023-09-06 16:01:52 +00:00
Simon Backx
d40b8c7d63 Released comments-ui v0.13.1 2023-09-06 17:33:42 +02:00
Simon Backx
2497a665b2 Released Portal v2.35.0 2023-09-06 17:33:42 +02:00
Simon Backx
f71c074d31
Added one-click-subscribe detection (#17995)
fixes https://github.com/TryGhost/Product/issues/3820

- This adds a new public site endpoint in the members API to check if a
site can offer the one-click-subscribe feature
- This is implemented on the members API as a copy of the `site`
endpoint because the admin API site endpoint is protected by CORS and
mainly because it can be served on a different domain than the
recommended site and this is hard to detect reliably from the frontend
- Added a new calculated setting `allow_self_signup`, which can replace
the setting that is currently used in Portal (best to do this after a
release otherwise we risk creating issues if a patch release happens)
2023-09-06 15:11:14 +00:00
Djordje Vlaisavljevic
712da704f7 Removed backdrop click on modals
refs https://github.com/TryGhost/Product/issues/3828
2023-09-06 13:49:17 +01:00
Simon Backx
448e91d916
Fixed notification and showing of recommendation modal (#17991)
refs https://github.com/TryGhost/Product/issues/3771

- Don't show a notification if the recommendation modal is shown
- Don't show the recommendation modal if there are no recommendations
2023-09-06 12:01:27 +00:00
Ronald Langeveld
95c63e16c9
Wired up announcement bar to Admin X (#17967)
refs https://github.com/TryGhost/Product/issues/3807

- Added announcement bar customisation to 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 91368ce</samp>

This pull request enhances the `AnnouncementBarModal` component to
enable users to customize the announcement bar on their site. It adds
editing and previewing features, as well as API integration and toast
notifications.
2023-09-06 15:53:33 +07:00
Simon Backx
83399222ea
Fixed recommending site without available metadata (#17989)
fixes https://github.com/TryGhost/Product/issues/3813
2023-09-06 07:21:27 +00:00
Sag
8f272e730b
Updated recommendation modal copy when triggered after signup (#17985)
refs https://github.com/TryGhost/Product/issues/3771
2023-09-05 18:50:34 +00:00
Djordje Vlaisavljevic
9e1b11f26e Added Close button to Recommendations modal
refs https://github.com/TryGhost/Product/issues/3824
2023-09-05 16:06:53 +01:00
Djordje Vlaisavljevic
76778a9dd8 Made "Preview" link only visible if recommendations are enabled
refs https://github.com/TryGhost/Product/issues/3816
2023-09-05 15:46:16 +01:00
Djordje Vlaisavljevic
8efeb20ae8 Updated heading copy
refs https://github.com/TryGhost/Product/issues/3771
2023-09-05 11:58:58 +01:00
Djordje Vlaisavljevic
ff1b256ff5 Improved design when Recommendation doesn't have a reason
refs https://github.com/TryGhost/Product/issues/3814
2023-09-05 11:58:58 +01:00
Simon Backx
8b1ca62025
Added "Recommended you" section to settings (#17973)
fixes https://github.com/TryGhost/Product/issues/3808 
refs https://github.com/TryGhost/Product/issues/3791
2023-09-05 12:46:27 +02:00
renovate[bot]
d15aed0d0a Update tiptap monorepo to v2.1.8 2023-09-05 06:40:46 +00:00
Peter Zimon
fcb2636d59
AdminX Announcement Bar (#17950)
refs https://github.com/TryGhost/Product/issues/3807

- Created Announcement Bar components in Admin X.
2023-09-05 09:27:20 +07:00
Djordje Vlaisavljevic
187f369720 Made description clearer and added link to preview recommendations modal
refs https://github.com/TryGhost/Product/issues/3816
2023-09-04 21:54:54 +01:00
Sag
a017596a1d
Added a random order and a limit of 5 to the Recommendations modal (#17958)
refs https://github.com/TryGhost/Product/issues/3815

- recommendations are rendered in a random order, using Fisher-Yates
shuffle
- only 5 recommendations are rendered by default, the other ones are
hidden behind a "Show all" button
- recommendations are fetched all at once from the backend, as we assume
there won't be more than 100-ish recommendations per publication
2023-09-04 19:05:32 +02:00
Djordje Vlaisavljevic
cd4fa044c9
Updated recommendations settings design (#17957)
refs https://github.com/TryGhost/Product/issues/3786, https://github.com/TryGhost/Product/issues/3773

- Moved Recommendations under Memberships section in settings sidebar
- Updated design for recommendations to work better with small favicons
2023-09-04 15:21:37 +00:00
Sag
d7504bdbf5
Added recommendation modal trigger on signup (#17925)
refs https://github.com/TryGhost/Product/issues/3771

- if recommendations are enabled, render the recommendation modal on
sign up, in Portal
- for free signups, the recommendations modal is rendered after clicking
on the magic link
- for paid signups, the recommendations modal is rendered after Stripe
Checkout
- the recommendations modal is not rendered on a free to paid upgrade
2023-09-04 14:35:56 +00:00
Jono M
46df83a397
Fixed AdminX modal routing (#17947)
refs https://github.com/TryGhost/Product/issues/3349
2023-09-04 07:07:48 +00:00
Jono M
a97f384cdf
Implemented email customisation labs flag in AdminX (#17881)
refs https://github.com/TryGhost/Product/issues/3745

---

This pull request adds a new feature to the `admin-x-settings` app that
allows users to customize the colors of their email newsletters. It also
simplifies and refactors the routing logic and the components related to
integrations, newsletters, and users. It introduces new dependencies and
components for color manipulation and selection, and updates the
existing components and stories to use them.
2023-09-04 07:00:37 +01:00
Ronald Langeveld
967a17460d
Fixed portal modal infinite looping (#17945)
refs https://github.com/TryGhost/Product/issues/3349
https://ghost.slack.com/archives/C0568LN2CGJ/p1693556448443489

- fixes an issue that's caused an infinite loop in the Portal design modal and stressing the CPU.

---

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

Refactors error handling logic for signup options form fields in
`SignupOptions.tsx` using `useCallback` and `useEffect` hooks. This
enhances the code quality and efficiency.
2023-09-04 09:58:28 +07:00
Simon Backx
b49d5a6964
Wired up saving title when editing recommendations (#17930)
no issue

- Also fixes a backend issue with nullable fields
- Fixes blurring the url input and setting the value to '/'
automatically while we expect absolute urls
- Added autoFocus to inputs
2023-09-01 15:19:25 +00:00
Djordje Vlaisavljevic
2f5a4d801b
Improved Add/Edit Recommendations flow design (#17923)
refs https://github.com/TryGhost/Product/issues/3773

- Improved recommendation preview in the modal
- Added separate Back button
- Fixed Table spacing issue
2023-09-01 14:17:34 +00:00
Daniel Lockyer
c6cb35074a Updated linting and testing packages 2023-09-01 15:51:17 +02:00
Jono M
9e89c88489
Added workaround for flaky codemirror test (#17884)
refs https://github.com/TryGhost/Product/issues/3349

---

This pull request improves the end-to-end tests for the code injection
settings in the admin-x-settings app. It fixes some typing and saving
issues with the `CodeMirror` editor.
2023-08-31 19:54:39 +01:00
renovate[bot]
d5e273a3ac Update dependency @headlessui/react to v1.7.17 2023-08-31 15:03:57 +00:00
renovate[bot]
62df82d1a3 Update dependency @tanstack/react-query to v4.33.0 2023-08-31 14:50:31 +00:00
renovate[bot]
d58f5dcc9f Update tiptap monorepo to v2.1.7 2023-08-31 14:33:11 +00:00
Simon Backx
3a946de06d
Added edit recommendations modal (#17889)
refs https://github.com/TryGhost/Product/issues/3794
2023-08-31 12:28:27 +02:00
Sag
f56c36ca24
Wired up recommendations in Portal (#17888)
closes https://github.com/TryGhost/Product/issues/3796
refs https://github.com/TryGhost/Product/issues/3770

- also added a public endpoint for Recommendations in the Content API
2023-08-31 10:07:49 +00:00
Djordje Vlaisavljevic
69a6388009 Updated Recommendations list design in Portal
refs https://github.com/TryGhost/Product/issues/3770
2023-08-31 10:47:32 +01:00
Djordje Vlaisavljevic
d04c077be5 Moved Recommendations settings under Membership section
refs https://github.com/TryGhost/Product/issues/3787
2023-08-31 10:47:32 +01:00
Simon Backx
875fe939a5
Wired up adding recommendations via admin-x (#17878)
refs https://github.com/TryGhost/Product/issues/3773
2023-08-31 11:26:12 +02:00
Jono M
84e1f11494
Added stories for AdminX CurrencyField (#17882)
refs https://github.com/TryGhost/Product/issues/3745

---

This pull request adds a storybook file for the `CurrencyField`
component and changes its value prop to use cents instead of a string.
This improves the component's usability and consistency.
2023-08-31 07:50:18 +01:00
Kevin Ansfield
5f5ad4d5dd
Added automatic conversion of old content when opening in beta editor (#17876)
no issue

Previously the beta editor only worked for newly created posts/pages, any older content would open with the original editor. This change enables automatic conversion of old content to the new content format when a post/page is opened in the admin interface allowing new features like signup and advanced header cards to be used on existing content.

- removed `convertToLexical` feature flag
  - where necessary switched to using just the `lexicalEditor` feature flag in its place
- moved the "L"/"M" indicators on the posts list to a new `lexicalIndicators` feature flag to make debugging/development easier
- added a redirect to the original editor route so that any route to opening the editor (such as the `/edit` front-end shortcut, or other areas of Admin) will open in the beta editor
  - avoids confusing/inconsistent behavior
2023-08-30 16:54:03 +01:00
Sag
62172fb883
Added basic Recommendations modal (#17877)
refs https://github.com/TryGhost/Product/issues/3770
2023-08-30 15:24:04 +00:00
Djordje Vlaisavljevic
feb55ccc00
Recommendations settings design tweaks (#17875)
refs https://github.com/TryGhost/Product/issues/3791

- Added realistic recommendations placeholders
- Slightly improved Recommendations list design
2023-08-30 14:39:36 +00:00
Simon Backx
310f01da0b
Wired up deleting recommendations from admin x (#17873)
fixes https://github.com/TryGhost/Product/issues/3793
2023-08-30 14:24:55 +02:00
renovate[bot]
d418a431be Update sentry-javascript monorepo to v7.66.0 2023-08-30 14:00:40 +02:00
Djordje Vlaisavljevic
00911326d1
Added Recommendations settings design (#17871)
refs https://github.com/TryGhost/Product/issues/3773, https://github.com/TryGhost/Product/issues/3791

- Added static design for Recommendation list
- Added static design for "Add recommendation" flow
- Added static design for "Remove recommendation" flow
- Updated `Table` component with Hint and Separator
2023-08-30 12:54:26 +01:00
Simon Backx
78ae776c5e
Added Recommendations browse API to admin-x-settings (#17870)
refs https://github.com/TryGhost/Product/issues/3786
2023-08-30 10:25:31 +00:00
Jono M
cbe3070476
Added webmention notifications toggle in AdminX when the labs flag is enabled (#17867)
refs https://github.com/TryGhost/Product/issues/3745

---

Added a user setting for webmention notifications in the admin panel.
This allows users to opt in or out of receiving notifications when they
are mentioned by other sites using webmentions.
2023-08-30 09:15:30 +00:00
Jono M
86ad035fbb
Wired up AdminX Tips & Donations (#17846)
refs https://github.com/TryGhost/Product/issues/3746

---

This pull request adds and improves features for the membership settings
app, especially for the tips or donations feature. It introduces a new
`CurrencyField` component and a `currency` module for handling currency
input and display. It also refactors and enhances some existing
components, hooks, and types for better user experience and code
quality. It affects files such as `TierDetailModal.tsx`,
`TipsOrDonations.tsx`, `useForm.ts`, and `currency.ts`.
2023-08-30 09:08:31 +00:00
renovate[bot]
f977227d18 Update dependency postcss to v8.4.29 2023-08-30 08:29:32 +02:00
renovate[bot]
24300120c2 Update dependency vitest to v0.34.3 2023-08-29 18:52:13 +01:00
Djordje Vlaisavljevic
8416278ea7
Added Recommendations settings placeholder under feature flag (#17855)
refs https://github.com/TryGhost/Product/issues/3787

- Added Recommendations feature flag
- Added an empty placeholder settings section for Recommendations under the feature flag
2023-08-29 12:36:50 +01:00
renovate[bot]
324a71daad Update storybook monorepo to v7.4.0 2023-08-29 11:24:57 +01:00
renovate[bot]
1128655287 Update storybook monorepo to v7.4.0 2023-08-29 10:46:20 +01:00
Daniel Lockyer
1ca8dcc836 Released Portal v2.34.4 2023-08-29 08:59:11 +01:00
renovate[bot]
ad1743816a Update dependency @playwright/test to v1.37.1 2023-08-29 08:38:03 +01:00
renovate[bot]
228b497076 Update dependency @babel/eslint-parser to v7.22.11 2023-08-29 08:25:12 +01:00
renovate[bot]
9e0fc878a1 Update dependency vite-plugin-commonjs to v0.9.0 2023-08-29 07:34:32 +01:00
renovate[bot]
96b0fae0ad Update dependency @tailwindcss/forms to v0.5.6 2023-08-29 07:33:51 +01:00
renovate[bot]
94dcafae39 Update dependency @storybook/addon-styling to v1.3.7 2023-08-28 19:07:59 +01:00
renovate[bot]
1a44d8106b Update sentry-javascript monorepo to v7.65.0 2023-08-28 19:06:53 +01:00
Jono M
05e6588832
Wired up AdminX Labs settings (#17844)
refs https://github.com/TryGhost/Product/issues/3745

---

This pull request adds and refactors several components and hooks for
the labs and advanced settings in the admin app. It introduces feature
flags for alpha and beta features, and allows the user to upload and
download redirects, routes and content files.
2023-08-28 16:24:03 +01:00
Jono M
0b720c237c
Added dirty state to user detail modal (#17824)
refs https://github.com/TryGhost/Product/issues/3349

---

Improved user experience for editing user details in the admin settings.
Added `dirty` state to track and handle unsaved changes in the
`UserDetailModal` component.
2023-08-24 15:49:37 +00:00