Commit Graph

36728 Commits

Author SHA1 Message Date
Daniel Lockyer
ec9b668e02 Updated translations with latest changes 2023-09-26 13:33:39 +02: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
Kevin Ansfield
f296761577 Fixed snapshot errors for changing dates in collection card tests
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
2023-09-26 12:23:33 +01:00
Jono M
ea64107f9d
Fixed syncing tiers status between Ember and AdminX (#18353)
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`.
2023-09-26 12:13:09 +01:00
Jono M
1f2dbc95f9
Updated links to old settings to link to AdminX (#18352)
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
2023-09-26 10:33:00 +00: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
Jono M
84ae5f58d2
Fixed site title syncing from AdminX to Ember (#18349)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-26 10:51:43 +01:00
Ronald Langeveld
ac7abb9edd
Added custom theme type to emberdatatypemapping (#18348)
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.
2023-09-26 08:55:45 +00: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
Princi Vershwal
3f04c93e21
Renamed Kyiv to Kiev till we pass the moment library update (#18263)
Renamed Kyiv to Kiev till we pass the moment library update
2023-09-25 21:58:55 +05:30
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
Steve Larson
498c375240
Added placeholder for beta editor (#18339)
closes TryGhost/Product#3906
- show placeholder 'post' for posts and 'page' for pages
2023-09-25 15:39:54 +00: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
Kevin Ansfield
562e8af26a Fixed saving collection card with 'latest' collection on sqlite
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?"`
2023-09-25 15:11:05 +01:00
Kevin Ansfield
6480cfb161 Added e2e tests for creating+saving pages containing collection cards
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
2023-09-25 15:11:05 +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
Aileen Booker
907796d857 Fixed ForceUpgrade state not working with Explore
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)
2023-09-25 12:56:04 +01: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
Allan Stromfeldt Christensen
6757d984af
Add line-height for descenders getting cut off in Post settings Tag names (#17836) 2023-09-25 17:37:11 +08:00
Daniel Lockyer
49d36fc1a1 Allowed config to override labs flags
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
2023-09-25 11:24:32 +02:00
Daniel Lockyer
1432c6f311 Rewritten labs unit test to use assert over should
refs https://github.com/TryGhost/DevOps/issues/72

- assert is the way we're going with assertion libraries and makes the
  code a little clearer
2023-09-25 11:24:32 +02:00
Daniel Lockyer
500507ff21 Moved labs unit test to correct folder
refs https://github.com/TryGhost/DevOps/issues/72

- labs.js is in the shared folder, so I've moved it to the corresponding
  folder to make understanding the tests easier
2023-09-25 11:24:32 +02:00
renovate[bot]
369cb62f5e Update dependency lib0 to v0.2.86 2023-09-25 10:22:57 +02:00
renovate[bot]
1387c64e5a Update dependency @playwright/test to v1.38.1 2023-09-25 09:12:04 +02:00
renovate[bot]
d15de11bf3 Update dependency @types/node-jose to v1.1.11 2023-09-25 09:11:50 +02:00
renovate[bot]
fcfcc00bdb Update dependency @types/express to v4.17.18 2023-09-25 09:10:30 +02:00
renovate[bot]
e6f8aa144c Update dependency @types/node to v20.6.5 2023-09-25 09:10:07 +02:00
renovate[bot]
a9bd5ce820 Update dependency html-validate to v8.4.1 2023-09-25 09:09:49 +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
Ghost CI
65ecb8ccd1 v5.65.0 2023-09-22 15:04:47 +00:00
Naz
19306228b2 Removed visible route link for collections
refs https://github.com/TryGhost/Arch/issues/95

- Collections should not be visible in the UI for now. Only the API part is GA at the moment.
2023-09-22 22:33:50 +08:00
Naz
1fecb08957 Reworked the collections killswitch to always override labs
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.
2023-09-22 22:33:50 +08:00
Naz
ca6ee41806 Promoted collections feature to GA
refs https://github.com/TryGhost/Arch/issues/95

- The collections endpoints APIs are stable and  ready to be used by internal Ghost features
2023-09-22 22:33:50 +08:00
Naz
1fd4861e97 Cleaned up fixtures from latest collections entry
refs https://github.com/TryGhost/Arch/issues/95
refs 45c1a82909

- Latest collection has become "dynamic" in the referenced commit, this means we don't need stored entries in the database.
2023-09-22 22:23:30 +08:00
Naz
8655f960c8 Nooped v5.64 migrations
refs https://github.com/TryGhost/Arch/issues/95

- The migrations in v5.65 are clearing the collections data again and only populate the "featured" collection.
2023-09-22 22:23:30 +08:00
Naz
8d02752802 🏗️ Repopulate featured collection records
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.
2023-09-22 22:23:30 +08:00