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

36970 commits

Author SHA1 Message Date
renovate[bot] de3a222231 Update dependency postcss to v8.4.31 2023-10-02 08:51:53 +02:00
renovate[bot] 708ff0564d Update dependency @embroider/macros to v1.13.2 2023-10-02 08:51:39 +02:00
renovate[bot] be022b9e58 Update dependency i18next-parser to v8.8.0 2023-10-02 08:51:28 +02:00
renovate[bot] b06ec3929d Update dependency html-validate to v8.5.0 2023-10-02 08:51:10 +02:00
renovate[bot] 18c6c70d3d Update dependency react-select to v5.7.6 2023-10-02 08:51:00 +02:00
Ronald Langeveld 9ae2e24315
Fixed overwritten theme duplication in ThemeList (#18405)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=6a295239a38840f18b0a3b1710095074&pm=s

- There was an issue where an overwritten theme would be included in the
themes array twice when passed to the ThemeList component.
- We now remove the initial theme from the array when overwriting to
avoid duplications.

---

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

This pull request refactors the theme problem view component to make it
reusable and fixes a bug with theme name display in the theme modal. It
affects the files `InvalidThemeModal.tsx` and `ThemeModal.tsx` in the
admin-x-settings app.
2023-10-02 09:50:23 +07:00
renovate[bot] f5b2bdd41e Update dependency @tanstack/react-query to v4.35.7 2023-10-02 01:18:34 +00:00
Ghost CI edba377657 v5.66.0 2023-09-29 15:03:04 +00:00
Kevin Ansfield d541991046 Fixed collection cards not re-rendering when posts were bulk-edited
no issue

- bulk edit actions bypass the Bookshelf model hooks which meant our page reset behaviour in `onSaving` and `onDestroyed` was not being hit
- added overrides to `bulkEdit` and `bulkDestroy` to add the same page-reset behaviour any time we have a bulk edit or destroy
2023-09-28 18:05:01 +01:00
Daniel Lockyer 6e46e8b5ba
Refactored loading of Koenig-Lexical package (#18392)
refs https://ghost.slack.com/archives/C02G9E68C/p1695901801049219?thread_ts=1695035790.122589&cid=C02G9E68C

- DRY up all the fetching of Koenig-Lexical so we only do it from one place
- this will help when we switch to loading Koenig-Lexical from local assets

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-28 17:43:12 +02:00
Djordje Vlaisavljevic e4f518868e
Updated Recommendations design (#18390)
refs https://github.com/TryGhost/Product/issues/3938

- Updated "Recommendation received" email design
- Slightly improved how dark favicons show in dark mode
- Added TabView with counter variant to Storybook
2023-09-28 15:22:00 +01:00
Simon Backx f1a2565ac2 Removed paid conversions column from incoming recommendations
fixes https://github.com/TryGhost/Product/issues/3968
2023-09-28 15:36:31 +02:00
Simon Backx 44ad71e06a Centered recommendation spinner
no issue
2023-09-28 15:36:31 +02:00
Daniel Lockyer 35d7e50027 Deleted Lexical sandbox page
refs https://ghost.slack.com/archives/C02G9E68C/p1695900212734549?thread_ts=1695035790.122589&cid=C02G9E68C

- this is no longer needed as we have Storybook to demo the components
2023-09-28 14:13:07 +02:00
Ronald Langeveld 1f73028729
Added invalid theme modal to AdminX (#18387)
refs
https://ghost.slack.com/archives/C0568LN2CGJ/p1695801433166809?thread_ts=1695741379.821479&cid=C0568LN2CGJ

---

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

This pull request adds a new feature to show a modal with the errors of
an invalid theme when uploading a theme fails in the admin settings app.
It creates a new `InvalidThemeModal` component that uses the
`admin-x-ds` library and the `ThemeProblemView` component to display the
error details. It also updates the `handleError` function to handle JSON
errors for theme uploads.
2023-09-28 11:09:29 +00:00
Simon Backx 05215734af
Added recommend back URL (#18382)
refs https://github.com/TryGhost/Product/issues/3958

- Disabled automatic network retries for external site lookups (=> timed
out to 5s in every situation because it returned 404 when a site doesn't
implement the Ghost api)
- Disabled representing a modal when it is already present on hash
changes
- Added support for search params in modals
- Handle `?url` search param in the addRecommendationModal
2023-09-28 10:54:16 +00:00
Daniel Lockyer 95ec7b5016 Enabled --adminx by default
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695897183996699

- Admin-X Settings is soon due to be the official new settings, so we
  should always ensure it's running for developers
2023-09-28 12:49:34 +02:00
Sag 63ac90c603
Moved autoFocus to the title, when adding a recommendation (#18384)
no issue
2023-09-27 16:25:44 +00:00
Sag 3d91c37d5b
Added Enter as shortcut to go next, when adding a recommendation (#18381)
closes https://github.com/TryGhost/Product/issues/3953
2023-09-27 17:03:36 +02:00
Sag 488ef87a7d
Added limit to the description size, when adding/editing a recommendation (#18380)
closes https://github.com/TryGhost/Product/issues/3960

- recommendation description is limited to 200 characters, so that it renders nicely in Portal
2023-09-27 13:04:25 +00:00
Sanne de Vries 5e85d2f58f
Fixed feature image caption dark mode (#18379)
No ref
2023-09-27 10:49:35 +00:00
Sag 8b62ebd40a
Fixed recommendation add/delete in AdminX (#18378)
no issue
2023-09-27 09:54:19 +00:00
Ghost CI 390ba70c88 Merged v5.65.1 into main 2023-09-27 08:20:40 +00:00
Ghost CI bddbf19a76 v5.65.1 2023-09-27 08:20:39 +00:00
Daniel Lockyer aee6458b4e
Fixed listing all themes when a theme path is invalid
- in the event one of the theme paths is invalid (a symlink that goes to
  a non-existent path), Ghost currently bails out of listing all themes
  because `fs.stat` throws an error
- in that case, we should just ignore the theme and continue
- this helps us prepare new symlinks whilst their source is not valid
- this commit wraps the code with try-catch to protect against that
- also adds a test
2023-09-27 09:57:31 +02:00
Michael Barrett d406d2ba6a
🐛 Fixed incorrect subscription status text when subscription is comped (#18369)
refs https://github.com/TryGhost/Product/issues/3963

The subscription status text was incorrect when a subscription was
comped and a member had multiple subscriptions (i.e a cancelled sub and
a comped sub). This was because the methods used to determine the status
of a subscription only took into account the status of the first
subscription associated with a member.
2023-09-27 08:46:55 +01:00
renovate[bot] d9ec7a0b90 Update dependency @vitejs/plugin-react to v4.1.0 2023-09-27 09:36:39 +02:00
renovate[bot] aa8fa94b20 Update dependency ember-cli-babel to v8.0.1 2023-09-27 09:36:15 +02:00
renovate[bot] 8857dd4125 Update dependency markdown-it to v13.0.2 2023-09-27 09:35:56 +02:00
renovate[bot] d5e00f3ff6 Update peter-evans/create-or-update-comment digest to ddff993 2023-09-27 09:35:39 +02:00
Michael Barrett 497f3b40dd
🐛 Fixed issue with settings being marked as dirty when visibility is changed (#18370)
refs https://github.com/TryGhost/Product/issues/3924

Settings were being marked as dirty when visibility was changed causing
the confirm dialog to show when navigating away from the settings page.
This change manually computes the dirtiness of the setting to ensure the
visibility change is ignored
2023-09-27 08:18:21 +01:00
Ronald Langeveld 7bebe7daf4
Fixed theme preview on theme without styles (#18375)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695741379821479

- Fixes a bug in the preview renderer where a theme without styles
wouldn't be handled properly as it cannot inject new styles and cause an
empty page to be returned.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-09-27 12:32:11 +07:00
Ronald Langeveld 29f98104df
Fixed icon not updating on Ember from AdminX (#18374)
refs
https://www.notion.so/ghost/df5bdea8f7ea4aca9d25eceb6a1bf34c?v=be2f15b6b58b4c27a0e11374282bead0&p=bafc80a9ad644fb18fe338f89500ff36&pm=s

- we now reload ember's settings data when settings data updated, to
keep certain data synced, such as the icon in the sidebar.

---

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

Refactor settings component to use Ember Octane and reload settings
model after saving. This improves the UI and code quality of the
`admin-x` component.
2023-09-27 09:36:45 +07:00
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
Simon Backx b51e12d90f
Added emails for recommendations (#18361)
fixes https://github.com/TryGhost/Product/issues/3938
2023-09-26 15:29:17 +00:00
Sag d24c7c5fa6
Added {{recommendations}} theme helper (#18340)
refs https://github.com/TryGhost/Product/issues/3940

- the {{recommendation}} helper fetches recommendations from the Content
API and renders a HTML template with pre-defined CSS classes
- the HTML template can be overridden in themes, by uploading a file
under partials/recommendations.hbs
- the CSS classes are not pre-defined, they need to be defined in
individual themes
- if there are no recommendations, nothing is rendered
- the {{recommendations}} helper currently accepts "page", "limit",
"filter", and "order" as options
2023-09-26 17:15:17 +02:00
Simon Backx 3a5c233122
🐛 Fixed staff emails eventually having invalid styles (#18363)
fixes https://github.com/TryGhost/Ghost/issues/17937

- We used a global Handlebars instance, which means it was reused across
Ghost
- Partials are different between parts of Ghost, that means the partials
were overwritten every time a normal Mailgun email was send
- All staff emails send after a normal newsletter would have invalid
styles because the partials for styles were overwritten
2023-09-26 16:25:03 +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
Sam Lord 5836685d29 Updated snapshots to include got 13 support for brotli
no issue
2023-09-26 12:45:14 +01:00
Sam Lord fd7ead6ce6 Upgraded to latest version of @tryghost/request
refs: https://github.com/TryGhost/Product/issues/3782

Latest version of request avoids using the OS-level name resolution system. This prevents long shutdowns from occuring where the OS is blocking the process from exiting cleanly.

The new version uses `got` 13, which has many breaking changes. Some of these are resolved within @tryghost/request (like response errors), but input parameters need to be changed.
2023-09-26 12:45:14 +01: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
Daniel Lockyer 8e83836de9 Fixed listing all themes when a theme path is invalid
- in the event one of the theme paths is invalid (a symlink that goes to
  a non-existent path), Ghost currently bails out of listing all themes
  because `fs.stat` throws an error
- in that case, we should just ignore the theme and continue
- this helps us prepare new symlinks whilst their source is not valid
- this commit wraps the code with try-catch to protect against that
- also adds a test
2023-09-26 13:33:39 +02:00
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