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.
no issue
- including a body snapshot for the pages API collection card tests causes issues because the generated HTML is dynamic and contains post creation times meaning the snapshot was unstable
- removed the body snapshot for the tests concerned for now as they are mostly there to catch saving issues rather than rendering issues
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 0ddea75</samp>
Added `membersUtils` service to `AdminXSettings` component to support
tiers feature. Reloaded service after saving settings with
`TiersResponseType`.
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.
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.
no issue
- added a missing emberDataTypeMapping needed for theme uploads to be
handled correctly
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 40647c6</samp>
Added support for custom theme settings API in Ember Data. Updated
`settings.js` to map the new `CustomThemeSettingsResponseType` to the
store.
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)
no issue
- added passthrough of `transaction` property when fetching post IDs otherwise SQLite will error with ` "Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?"`
no issue
- act as regression tests for internal collection code changes
- useful to test as we've hit missing transaction passthrough for sqlite a couple of times that wasn't caught
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
- When a user is in forced upgrade state, clicking on `Explore` would keep them trapped inside of the Explore frame rather than redirecting to Ghost(Pro)
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.
fixes https://github.com/TryGhost/DevOps/issues/72
- in order to have greater control of labs flags outside of Ghost, this
commit allows Ghost to respect the value of `labs: { flagName: boolean }`
- this means we can hardcode a value to true or false, irrespective of
the value in the DB or GA flags array
- also adds tests to check functionality
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.
refs https://github.com/TryGhost/Arch/issues/95
- We are releasing with a slight risk of failing over, so need a switch to allow disabling collections on hosted environment.
refs https://github.com/TryGhost/Arch/issues/95
refs 00e5f84d88
- Maintaining "latest" collection's static content is causing performance issues we are not able to overcome in a short period of time. Instead we leave it as a "dynamic" collection, which equals the contents of the Posts API. The "featured" collection will be saved in a "static" form as previously.
- This is roughly the same migration as in 5.64 version (see refed commit). It wipes out all of the stored collections data and only populates the featured collection.