Commit Graph

18848 Commits

Author SHA1 Message Date
Sanne de Vries
f70dcd6861
Replaced Twitter with X in editor and tags (#18415)
No ref
2023-10-02 11:16:07 +00:00
Sodbileg Gansukh
01646580e4 Fixed post edit button URL
no issues

- the edit button in the post list wasn't doing anything with an empty link
- now it has same URL as the post list item and it directs to its edit screen
2023-10-02 17:50:06 +08:00
Jono M
bb0dff3571
Updated to highlight searched keywords in AdminX settings (#18112)
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 1347a85</samp>

Added search functionality to the settings page using a custom hook and
a service. The `useSearch` hook uses the `useSearchService` function to
create a search service object that provides the filter and highlight
logic. The `highlightKeywords` function from the search service is
passed to the `SettingsGroupHeader` component to render the settings
with the matching keywords.
2023-10-02 09:33:24 +01:00
renovate[bot]
f87e3317f2 Update dependency ember-cli-babel to v8.1.0 2023-10-02 08:52:09 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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