2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

1150 commits

Author SHA1 Message Date
Peter Zimon
e5ef88de5b
Fixed Stripe modal bottom padding in AdminX (#18366)
refs. https://github.com/TryGhost/Product/issues/3949
2023-09-26 22:37:52 +02:00
Jono M
fb435cc115
Fixed minor issues with AdminX Ember sync (#18359)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-26 12:23:52 +00:00
Ronald Langeveld
5161009e56
Added progress spinner to the theme upload button (#18358)
no issue

- Added a progress spinner to the theme upload button in AdminX for
better UX.

---

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

Improved user feedback for theme upload feature. Added a loading
indicator to the `ThemeModal` component to show the progress of the
`uploadTheme` function.
2023-09-26 11:38:09 +00:00
Ronald Langeveld
6eb5dfa29b
Added null safety checks in AdminX actions (#18356)
no issue

- added additional null safety checks to the actions utility in AdminX.
---

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

Refactored `action.context` access in `actions.ts` to use optional
chaining. This makes the code more concise and robust.
2023-09-26 18:29:43 +07:00
Jono M
d51322c95b
Updated AdminX API error handling to report to Sentry (#18300)
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 d434b20</samp>

This pull request refactors the error handling logic in various
components of the admin-x-settings app to use a custom hook called
`useHandleError`. This hook wraps the Sentry integration and provides a
consistent and reliable way of reporting and logging errors. This
improves the code quality, readability, and maintainability of the app.
The pull request also improves the Sentry initialization by passing the
DSN and the environment to the `ServicesProvider` component.
2023-09-26 11:09:42 +01:00
Ronald Langeveld
4f3b35e4dd
Fixed errors not displaying when uploading broken theme in Admin X (#18350)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695716107796769

- The main culprit here was that now since we moved to using some model data from Ember as opposed to just the API, the errors key had to be renamed to gscan_errors  as that's how it's named in the Ember theme model.

---

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

Updated the theme modal and the theme installed modal to use the new
`gscan_errors` property for theme validation. This improves the accuracy
and consistency of the feedback given to users when they upload or
activate themes.
2023-09-26 16:57:50 +07:00
Ronald Langeveld
6d0da713f0
Revert "Fixed actions crashing on post history"
Revert "Improved null handling on Admin X" and Revert "Fixed actions
crashing on post history"

no issue
2023-09-26 15:07:43 +07:00
Ronald Langeveld
1f2f0a7322
Improved null handling on Admin X actions (#18346)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695642553045059

- The previous commit didn't quite handle things as expected. This adds
more null handling.
---

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

This pull request improves the robustness and accuracy of the admin
settings API for actions. It adds checks and logic to handle missing or
invalid data and custom post types in `actions.ts`.
2023-09-26 06:58:35 +00:00
Ronald Langeveld
677c829c4b
Fixed actions crashing on post history - Admin X (#18344)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695642553045059

- this attempts to fix an undefined error on AdminX when accessing
history log.
- At the moment I only have it reproducible on staging, so if this doesn't fix it, it will potentially be reverted.

---

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

Improve context handling for action events in `actions.ts`. Use a
variable to simplify and customize the action name and title based on
the context.
2023-09-26 12:30:49 +07:00
Ronald Langeveld
41576d2dc3
Fixed Pintura url not handling relative config url on import (#18343)
no issue

- Fixed the Pintura hook not handling relative urls passed to it from the config.

---

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

Fixed Pintura asset loading from subdirectories by using the admin root
path. Updated `usePinturaEditor` hook to import and use a helper
function for getting Ghost paths.
2023-09-26 01:57:01 +00:00
Jono M
328a785065
Updated AdminX to sync data changes to Ember (#18327)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 7a91ba3</samp>

This pull request enables data synchronization between the Ember app and
the React app for the settings module. It passes `onUpdate` and
`onInvalidate` functions as props from the Ember app to the React app
through the `ReactApp` component and the `ServicesContext`. It also
removes unused code and adds some debugging logs in the `setting`
serializer and the `settings` service.
2023-09-25 17:29:09 +01:00
Peter Zimon
731f0c2a5e
AdminX settings GA design refinements (#18332)
refs. https://github.com/TryGhost/Product/issues/3949

- some minor copy had to be updated
- we had a little bug in the small version of dropdowns
- the crash page was just a plain text without any way out (e.g. allowing navigating to dashboard)
2023-09-25 17:49:12 +02:00
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