Commit Graph

991 Commits

Author SHA1 Message Date
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