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`.
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.
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.
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.
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)
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.
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.
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>
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.
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.
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.
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>
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
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