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

36880 commits

Author SHA1 Message Date
Simon Backx
b868dd263d
Added plausible events to the recommendation modal (#18526)
fixes https://github.com/TryGhost/Product/issues/3841

- Wired up the trackEvent method in admin-X
- Send an event when a recommendation is added
2023-10-06 15:41:33 +02:00
Djordje Vlaisavljevic
2574546f2e
Updated recommendation email design (#18521)
refs https://github.com/TryGhost/Product/issues/3939

- Fixed Outlook and iOS Mail issues
- Fixed inconsistent button color
2023-10-06 13:04:59 +00:00
Simon Backx
92b57b4bdf
Improved error handling in recommendation modals (#18524)
fixes https://github.com/TryGhost/Product/issues/3990

- Show errors on blur
- Show toast on submit (final modal only)
- Do an initial validation on mount
2023-10-06 12:23:18 +00:00
Jono M
3680c16362
Fixed AdminX CSS scoping to prevent overriding old admin styles (#18523)
refs https://github.com/TryGhost/Product/issues/3832

Tailwind raises errors if you try to use `important:
'.admin-x-settings'` and have custom styles for `.admin-x-settings`,
hence adding a new base class. We should sort these out when we extract
the design system.

---

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

Scoped base and theme styles to the `admin-x-settings` app by adding a
class to the app root element and updating the `index.css` file. This
improves the app's isolation and reduces code duplication.
2023-10-06 13:02:21 +01:00
Daniel Lockyer
49dc6f8cdc Removed static conditional
- I actually wanted this to be a production-only check but forgot to
  change it before pushing
2023-10-06 13:46:17 +02:00
Daniel Lockyer
7a7d64b764 Removed unused variable 2023-10-06 13:46:17 +02:00
Daniel Lockyer
07e603a5cd Reverted "Update sentry-javascript monorepo to v7.73.0"
- this reverts commit ec5e2cef20
2023-10-06 13:46:17 +02:00
renovate[bot]
394c09be49 Update Koenig packages 2023-10-06 12:40:19 +01:00
Sanne de Vries
dc11270954
Fixed post preview icons in dark mode (#18517)
No ref
2023-10-06 11:03:58 +00:00
renovate[bot]
991f815a51
Update Koenig packages (#18477)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@tryghost/kg-card-factory](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`4.0.10` ->
`4.0.11`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-cards](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`9.1.4` ->
`9.1.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>TryGhost/Koenig (@&#8203;tryghost/kg-card-factory)</summary>

###
[`v4.0.11`](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.10...@tryghost/kg-card-factory@4.0.11)

[Compare
Source](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.10...@tryghost/kg-card-factory@4.0.11)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 10:53:31 +01:00
renovate[bot]
ec5e2cef20 Update sentry-javascript monorepo to v7.73.0 2023-10-06 11:12:32 +02:00
Jono M
fb7bf6d01e
Improved AdminX test coverage based on old admin tests (#18502)
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 7eda74c</samp>

This pull request improves the validation, customization, and feedback
of various form components and modals in the admin-x-settings app. It
also adds new components for user detail modal sections and modifies the
user type to allow null values for social accounts. Additionally, it
adds `dirty` props to some integration modals and a `data-testid`
attribute to the exit settings button. It also deletes an unused file.
2023-10-06 10:06:05 +01:00
renovate[bot]
caf104dbb4 Update dependency @types/validator to v13.11.2 2023-10-06 11:01:24 +02:00
Shaun Roselt
3f5a2370c2
Updated Afrikaans Translations (#18399) 2023-10-06 10:58:35 +02:00
Jonathan Browne
e8840510fc
Fixed post items getting cut off on iOS (#17189)
- This PR is a fixed version of #16765. I took a different approach for this to work around some of the issues that were found after that one got merged. In that PR's description, I mentioned that there were multiple scroll areas for the post editor that were somehow displaying at different sizes. The reason appears to be that the CSS vh unit includes some areas that are obscured by Safari's toolbars, since those toolbars may disappear if the <body> element is scrolled. However, since Ghost's admin area uses <div> elements for all scrolling, those toolbars never disappear, and so the space becomes unused. We can work around this by changing to the CSS dvh unit, which always represents the current size of the viewport.
- Most pages have enough padding that the vh unit doesn't cause any problems. In this PR, I've changed it for two places that do break, the post editor and the post settings menu (which can get the "Delete" button cut off). I also included the sidebar width fix from the previous PR.
- Video of the fixed behavior (compare with the old behavior video linked in #16765): https://github.com/TryGhost/Ghost/assets/12983479/eceda43a-23c3-4cf6-9de2-8eda54a98100
2023-10-06 10:58:08 +02:00
renovate[bot]
5b46f246ef Update dependency @ebay/nice-modal-react to v1.2.13 2023-10-06 08:56:57 +00:00
renovate[bot]
7aef7b7db1 Update dependency rimraf to v5.0.5 2023-10-06 10:52:34 +02:00
renovate[bot]
d07161a077 Update dependency tracked-built-ins to v3.3.0 2023-10-06 10:42:18 +02:00
Daniel Lockyer
3e42d4b1be Implemented cachebuster for Admin-X Settings and Koenig-Lexical files
fixes https://github.com/TryGhost/DevOps/issues/86

- this will now hash the files and append a cachebuster, so we never
  serve stale files again
2023-10-06 10:41:37 +02:00
Ugurcan Yildirim
bf9bf9f210
Fixed typo in Turkish translations (#18485) 2023-10-06 10:39:40 +02:00
renovate[bot]
d6c944c8b8 Update peter-evans/create-or-update-comment digest to e3645dd 2023-10-06 10:36:02 +02:00
Alexandre "Lekler" Rodrigues
cab29e1604
Updated Brazilian Portuguese translations (#18510)
refs https://github.com/TryGhost/Team/issues/2795
2023-10-06 10:35:10 +02:00
renovate[bot]
b2cebdc9b0 Update dependency vite to v4.4.11 2023-10-06 07:55:29 +02:00
renovate[bot]
ba6830453a Update dependency jwks-rsa to v3.1.0 2023-10-06 07:54:57 +02:00
Ronald Langeveld
d0cd7f040d
Added Recommendations Acceptance tests - Admin X (#18513)
no issue

---

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

This pull request adds acceptance tests for the recommendations feature
in the `admin-x-settings` app. It also updates the test utils module to
use the appropriate type and fixture for the recommendations API.
2023-10-06 10:52:18 +07:00
Chris Raible
70304d92d4
🐛 Fixed bug preventing changes to tier benefit capitalization (#18406)
fixes TryGhost/Product#3970

- When saving a tier, it is impossible to change the capitalization of a
benefit
- The logic when saving a tier matches benefits by `name.toLowercase()`
and then overwrites the incoming change with the name from the previous
version of the benefit
- This changes the logic to match benefits the same way using
`name.toLowercase()`, but use the _incoming_ benefit's capitalization
rather than the old benefit's, to allow users to e.g. change 'TEst
benefit' to 'Test benefit'
2023-10-05 19:04:11 -07:00
Kevin Ansfield
d812781888
Prevented Escape from closing the image editor (#18505)
no issue

`Escape` can often be hit when attempting to cancel or undo an action
through muscle memory despite it not doing anything in Pintura except
closing the modal and losing all changes

- added `willClose` option to the Pintura modal settings which only
returns `true` when we've detected a click on the close button
2023-10-05 17:30:56 +01:00
Djordje Vlaisavljevic
1775591472 Fixed Stripe thumbnail src
no refs
2023-10-05 15:10:34 +01:00
Ronald Langeveld
e82f845d5c
Added flags helper for Acceptance Tests in AdminX (#18500)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696495250115289

Adds a new helper function `toggleLabsFlag` that allows toggling of lab
flags within tests. This function can be used directly inside a test
case or within `beforeEach` or `beforeAll` hooks to set the initial
state before tests run.

Usage:
- To toggle a flag within a test: `toggleLabsFlag('recommendations',
false);`
- To set initial state in a hook: 
  ```javascript
  beforeEach(() => {
    toggleLabsFlag('recommendations', true);
  });

---

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

This change adds a utility module for acceptance testing of experimental
features in Ghost. It allows tests to mock and change the labs settings
using `defaultLabFlags` and `toggleLabsFlag`.
2023-10-05 20:12:54 +07:00
Nick Moreton
8122f02f17
Added resize option to Pintura (#18504)
Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this
list, thanks!

- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-10-05 13:08:23 +00:00
Sam Lord
45f704ce86 Add a metric when shutting down in-flight requests takes more than 15 seconds
refs: https://github.com/TryGhost/DevOps/issues/64
2023-10-05 12:31:02 +01:00
Simon Backx
7b3a0c6863
🐛 Fixed outboundLinkTagging setting affected whether member sources are tracked (#18498)
no issue

- During the one click subscribe flow, the outboundLinkTagging should
affect whether we send a history or not to the signup endpoint. But for
internal history this is the members_track_sources setting. This happens
in the backend normally.
- Do not send a (constructed) history to external sites (= one click
subscribe flow in recommendations) if outboundLinkTagging is false
- Do always send a history internally for local signups (backend handles
whether to store it based on the members_track_sources setting that is
currently not exposed in the frontend). The history is not built if this
setting is disabled, but we could have an old history entry if this
setting was enabled in the past.
2023-10-05 12:25:21 +02:00
Daniel Lockyer
85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
Simon Backx
1882b7048d
Added click tracking for recommendations helper (#18496)
fixes https://github.com/TryGhost/Product/issues/4001
2023-10-05 11:37:02 +02:00
Nick Moreton
d454f18ad2
Removed sticker option from Pintura (#18497)
Removed the sticker feature from the image editor component in both the
new and the legacy admin apps. This simplifies the UI and the code of
the `usePinturaEditor.ts` and `koenig-image-editor.js` files.
2023-10-05 10:32:13 +01:00
Kevin Ansfield
1b5359dce1
Removed old/unused posts list item component (#18495)
no issue

- cleanup of unused files
2023-10-05 10:01:12 +01:00
Ronald Langeveld
929d05a33b
Fixed sidebar order of Newsletters section - X (#18493)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696490815762949

- Fixed a tiny issue where the Sidebar Navigation doesn't align with the
newsletter options.
- Got rid of some unused commented out code that's not needed.
2023-10-05 15:20:18 +07:00
Ronald Langeveld
d1b92a04a3
Changed HTML Editor to use Koenig's onFocus (#18492)
no issue

- we added a new plugin in Koenig which exposed a new onFocus plugin,
meaning we can get this directly from Koenig instead of hacking the html
dom.
- changed the HTML Editors onFocus function to use Koenig's / Lexical's
built in OnFocus plugin.

---

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

Fix editor toolbar disappearing bug in `HtmlEditor.tsx`. Use focus
plugin from `Koenig` package to handle editor focus.
2023-10-05 12:47:29 +07:00
Sag
0c8218b8f6
Removed wrapper in the Recommendation helper template (#18488)
no issue
2023-10-04 22:11:25 +00:00
Sag
380f3b5ca2
Added missing unit tests to the Recommendations package (#18489)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-04 21:52:22 +00:00
Sag
2391ccc3db
Added more options to "order", in the Recommendations API (#18487)
closes https://github.com/TryGhost/Product/issues/4000
2023-10-04 19:32:03 +00:00
Djordje Vlaisavljevic
27cec8b909
Improved "Copy link" design (#18486)
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 19:16:08 +01:00
Djordje Vlaisavljevic
cbd43d38a8 Added a tooltip to the "Copy link" button
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
1e5b52b368 Added label showing if you're already recommending back a site recommending you
refs https://github.com/TryGhost/Product/issues/3978
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
9a45b0b785 Made recommendation modals footer sticky
no refs
2023-10-04 18:21:32 +01:00
Kevin Ansfield
08e4593093 Added pre-emptive fetch of editor module after logging in to Admin
no issue

Reduces likelihood of seeing the "Loading editor..." state when accessing the editor by fetching the editor module in the background after login.

- added `koenig` service
  - `.resource` getter for returning a React suspense resource object to reduce duplication across main editor and HTML input components
  - `.fetch()` method that fetches the Koenig module, avoids concurrent or repeated fetches by utilising an internal `._fetchTask` ember-concurrency task
- updated Koenig components to use the `koenig` service and associated resource for fetching the module
  - required setting up `editorResource` inside the component's class and passing it in as a prop to the suspense-aware components as we need access to Ember's dependency injection available in the class
- added `koenig.fetch()` call to our post-login code in the `session` service so the fetch is started before the editor is accessed
2023-10-04 17:45:42 +01:00
renovate[bot]
60aa1d9cb7 Update dependency @uiw/react-codemirror to v4.21.19 2023-10-04 15:35:24 +00:00
Sag
15adb254f0
Added an option to recommend back in Admin Settings (#18478)
refs https://github.com/TryGhost/Product/issues/3978

- added "GET /incoming_recommendations/" browse endpoint to the Admin
API - we store incoming recommendations as mentions in the database. The
new endpoint reuses the Mentions API underneath to fetch verified
mentions of type recommendation - recommendation-specific attributes are
returned by the new endpoint, including calculated fields such as the
"RecommendingBack" boolean
- show "Recommend back" option for sites recommending me, only if I
haven't recommended the site already
2023-10-04 15:22:04 +00:00
Michael Barrett
e06a5825dc
🐛 Fixed cache key generation not taking into account array value (#18476)
`generateOptionsData` was not taking into account the query params
`include`, `fields` and `format` could also be an array if included in
the request query like: `?fields[]=title&fields[]=slug` or
`?fields=title&fields=slug`
2023-10-04 15:54:59 +01:00
Kevin Ansfield
c56bfd51de Fixed posts list hrefs showing "mobiledoc-editor" and added "editor-beta" redirects
no issue

- switched posts list over to using the `lexical-editor.edit` route so it uses the `/editor/` href rather than `/mobiledoc-editor/`
- added redirect handling for the `/editor-beta/*` urls to our generic 404 route so anyone upgrading with the beta URLs still open in tabs or saved won't hit a 404
2023-10-04 14:37:12 +01:00