0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00
Commit graph

40151 commits

Author SHA1 Message Date
Chris Raible
cabee005f4
Consolidated compose.yml files for Dev Container (#21659)
ref
https://linear.app/ghost/issue/ENG-1785/consolidate-dev-container-composeyml-with-the-root-level-composeyml

- We currently have two compose.yml files:
    - `.devcontainer/compose.yml`: used for the Dev Container
    - `compose.yml`: used for local development with docker compose
- The Dev Container compose file does need some additional
configuration, but most of this code is duplicated from the root level
compose.yml file
- This commit removes this duplication by using both compose files in
the Dev Container setup, so it will base the compose configuration on
the root level, and then extend it with the Dev Container specific
configuration
- This way any updates to the root level compose file will also be
available and reflected in the Dev Container setup without having to
make the change twice.
2024-12-17 12:57:02 -08:00
Peter Zimon
58ac19ada6
Updated Portal notification styles (#20538)
closes https://linear.app/ghost/issue/DES-548/update-portal-notification-style

Portal popup notification styles look outdated and harsh. Also in-popup notifications have several visual design issues such as positioning, alignment, typography and so on. This PR fixes these issues by applying a much more standard design to Portal notifications.
2024-12-17 13:37:00 +01:00
Sodbileg Gansukh
65bec88187
Added 403 errors to the error handler (#21898)
ref ENG-745

- added permission related errors to list of error types to be handled
- previously, generic error messages were displayed when permission
errors are thrown
- this would make it possible to display the actual message returned
from the API in toasts
2024-12-17 18:21:48 +08:00
Sodbileg Gansukh
4ec0bdde3c
Made name field optional in Portal account settings (#21900)
ref DES-898

- previously, the name field in Portal account settings used to be required which caused an issue users were not able to update their email address without adding name first
- now the name field is optional makes it possible to update the email address without adding name, or remove their name as well
- it was intended not to wire this up to "Display name in signup form" setting in Portal for the simplicity
2024-12-17 18:15:16 +08:00
Sodbileg Gansukh
4bc85e2ff2
Fixed layout shift issue when Portal popup appears (#21895)
ref DES-547

- when Portal popup is opened and the browser scroll bar is visible, it
used to make layout shift, because we were hiding the scrollbar
- now it applies right margin to body element and the trigger button by
calculating the scrollbar width only when the browser scroll bar is
visible
- it also preservers the current right margin for those elements and
makes the calculation based on that
2024-12-17 14:16:39 +08:00
Ronald Langeveld
3d65bfa38d
Added comment regarding Feature flags & E2E tests (#21897)
ref [ENG-1862](https://linear.app/tryghost/issue/ENG-1862/)

- Added information regarding Feature Flag behaviour during E2E tests
2024-12-17 03:44:59 +00:00
Sodbileg Gansukh
c2bd0d9d07
Fixed theme management menu alignment (#21896)
ref DES-933

- when three dot buttons are clicked in the theme management modal, the
menu alignment was wrong
- this fixes the issue by aligning the button and the menu by the right
edge
2024-12-17 03:14:11 +00:00
Princi Vershwal
485f52df80
Added browser tests for reset password (#21893)
Closes
https://linear.app/ghost/issue/ENG-1856/add-e2e-browser-test-for-password-reset

- Added browser tests for reset password for both cases: 2FA enabled and
disabled.
2024-12-16 18:05:04 +00:00
Daniël van der Winden
59b6e92497
🐛 Fixed post list not displaying correctly with long titles (#21892)
Previously, if you had posts with very long titles, the layout of the
post list would break, causing the analytics button and the metrics to
shift from row to row.

These changes address that, and make the list render cohesively
regardless of the length of a post's title, across resolutions.

fixes
https://linear.app/ghost/issue/DES-610/post-list-breaks-with-really-long-titles
2024-12-16 15:51:32 +01:00
Sodbileg Gansukh
b6f94c5fdb
Cleaned up the customFonts feature flag (#21889)
ref DES-1025
2024-12-16 18:13:15 +08:00
Gary Lai
28a502fe4c
Added missing zh-Hant translations (#21885)
no issue
2024-12-16 09:39:04 +00:00
Ronald Langeveld
3233bae37c
🐛 Fixed archived newsletters visible in Portal when email disabled (#21737)
ref ONC-225

- Ensures newsletter preferences are hidden in the Portal when email functionality is disabled.
- Adds conditional logic in NewsletterManagement.js to check for the hasNewslettersEnabled prop.
- Updates tests in AccountEmailPage.test.js and AccountHomePage.test.js to cover scenarios where newsletters are disabled.
- Improves user experience by preventing the display of irrelevant settings when email is turned off.
2024-12-16 13:14:21 +07:00
renovate[bot]
011f6a71ed
Update dependency @uiw/react-codemirror to v4.23.7 (#21888)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@uiw/react-codemirror](https://uiwjs.github.io/react-codemirror)
([source](https://redirect.github.com/uiwjs/react-codemirror)) |
[`4.23.6` ->
`4.23.7`](https://renovatebot.com/diffs/npm/@uiw%2freact-codemirror/4.23.6/4.23.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@uiw%2freact-codemirror/4.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@uiw%2freact-codemirror/4.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@uiw%2freact-codemirror/4.23.6/4.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@uiw%2freact-codemirror/4.23.6/4.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>uiwjs/react-codemirror (@&#8203;uiw/react-codemirror)</summary>

###
[`v4.23.7`](https://redirect.github.com/uiwjs/react-codemirror/releases/tag/v4.23.7)

[Compare
Source](https://redirect.github.com/uiwjs/react-codemirror/compare/v4.23.6...v4.23.7)

[![Buy me a
coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@&#8203;uiw/react-codemirror@4.23.7/file/README.md)

Documentation v4.23.7:
https://raw.githack.com/uiwjs/react-codemirror/5b16350/index.html\
Comparing Changes:
https://github.com/uiwjs/react-codemirror/compare/v4.23.6...v4.23.7

```shell
npm i @&#8203;uiw/react-codemirror@4.23.7
```

- 💄 chore: update nextjs example.
[#&#8203;677](https://redirect.github.com/uiwjs/react-codemirror/issues/677)
[`ab89f28`](https://redirect.github.com/uiwjs/react-codemirror/commit/ab89f28)
[@&#8203;jaywcjlove](https://redirect.github.com/jaywcjlove)
- 🐞 fix(theme): implement 'exports' field in themes/theme/package.json
([#&#8203;708](https://redirect.github.com/uiwjs/react-codemirror/issues/708))
[`4edca1d`](https://redirect.github.com/uiwjs/react-codemirror/commit/4edca1d)
[@&#8203;aspiers](https://redirect.github.com/aspiers)
- 🐞 fix(theme): implement 'exports' field in themes/\*/package.json
[#&#8203;708](https://redirect.github.com/uiwjs/react-codemirror/issues/708)
[#&#8203;613](https://redirect.github.com/uiwjs/react-codemirror/issues/613)
[#&#8203;680](https://redirect.github.com/uiwjs/react-codemirror/issues/680)
[`ced0b1a`](https://redirect.github.com/uiwjs/react-codemirror/commit/ced0b1a)
[@&#8203;jaywcjlove](https://redirect.github.com/jaywcjlove)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TryGhost/Ghost).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 03:20:35 +00:00
Ghost CI
bb9bd0e233 v5.105.0 2024-12-13 15:05:49 +00:00
Kevin Ansfield
fd8759a3a8 Shipped comments-ui@1.0.5
no issue

- includes styling fix for replies line in dark mode and addition of `data-member-uuid` attribute on each rendered comment container
2024-12-12 21:08:41 +00:00
Kevin Ansfield
ab2058ee1d Added data-member-uuid attribute to each comment
closes https://linear.app/ghost/issue/PLG-268

- allows for external scripts to more easily decorate individual comments
2024-12-12 21:01:37 +00:00
Sanne de Vries
27e79a3a3d
Changed replies line color to be more clear (#21879)
No ref
- The line was almost invisible in dark mode, so the color has been
adjusted to be slightly less transparent.
2024-12-12 20:06:55 +00:00
Djordje Vlaisavljevic
6595697864
Improved ActivityPub reader view (#21877)
ref https://linear.app/ghost/issue/AP-633/reader-view-customization-options, https://linear.app/ghost/issue/AP-631/estimated-reading-time-in-reader-view

- Improved typography, spacing and alignment.
- Improved selection of font sizes from the reader view customization popover.
- Added a button to reset reader view customization settings to default, in case user ends up in a state they’re not happy with and want to go back to a sensible default.
- Added preview to typeface selection component so it’s easier to see what you’re selecting.
- Disabled background clicks on all AP modals for a more consistent experience and to avoid accidental clicks.
- Changed the reading progress indicator increments from 1 to 5 to attract less attention while the user is reading.
2024-12-12 19:47:49 +00:00
Kevin Ansfield
c1c7828499 Shipped comments-ui@1.0.4
no issue

- fixed merge conflict with i18n locales
2024-12-12 19:03:23 +00:00
Kevin Ansfield
12993dff6f Shipped comments-ui@1.0.3
no issue

- contains two edge-case bug fixes, one related to pagination when deleting a comment and another that works around issues arising from potentially unstable API sorting
2024-12-12 19:03:23 +00:00
Kevin Ansfield
48abf6e146 Fixed potential for duplicate comments when fetching pages in comments-ui
closes https://linear.app/ghost/issue/PLG-305

- adds deduplication of comments when fetching top-level pages
- avoids problems where the underlying sort is unstable (e.g. "best" as likes are changing) resulting in an already loaded comment appearing on a later-loaded page
- doesn't solve for missing comments between pages but does prevent invalid local state that can lead to buggy UI
2024-12-12 19:03:23 +00:00
Kevin Ansfield
137ea89a7b Fixed incorrect pagination after deleting top level comment
closes https://linear.app/ghost/issue/PLG-304

- added a refresh of the comments list when a top-level comment with no replies is deleted so the pagination resets and replies aren't missed when loading more due to a shift in the underlying paginated data
2024-12-12 19:03:23 +00:00
Kevin Ansfield
962939b99a Shipped comments-ui@1.0.2
no issue

- contains two minor bug fixes for edit name/expertise buttons on the main form and incorrect replies-left-to-load counts after deleting replies
2024-12-12 19:03:23 +00:00
Kevin Ansfield
46f6f49c03 Fixed incorrect replies pagination count after deleting reply
closes https://linear.app/ghost/issue/PLG-303

- when deleting a reply our "replies left" calculation was getting out of sync because the `count.replies` state on the parent comment wasn't being updated, the result was for each comment deleted we were displaying 1 more reply that was still to load
- updated the `deleteComment` action to also modify the parent comment's `count.replies` value when a reply was deleted ensuring our "replies left" calculation remains correct
2024-12-12 19:03:23 +00:00
Kevin Ansfield
bd9f6bb216 Fixed "Edit expertise" button often not working on main comment form
closes https://linear.app/ghost/issue/PLG-302

- switching from `onClick` to `onMouseDown` allows the button events to fire and be picked up by the popup-opening handler before the click causes a blur event on the main form to fire which removes the expertise buttons
- we have a test for adding expertise via the main form which was giving us a false positive due to the way Playwright handles events, unfortunately I couldn't find a way to adjust that to match the real-world behaviour without ending up with a test that always fails
2024-12-12 19:03:23 +00:00
Kevin Ansfield
fc49dfa10a Shipped comments-ui@1.0.1
no issue

- contains various improvements to design and behaviour
2024-12-12 19:03:23 +00:00
Kevin Ansfield
3dd33968f5 Improved various aspects of comments app
ref https://linear.app/ghost/issue/PLG-300/

Full details available soon on https://ghost.org/changelog/

- removed `commentImprovements` labs flag conditionals
2024-12-12 19:03:23 +00:00
Àlex Rodríguez Bacardit
904a30082e
🌐 Updated Catalan translations in comments.json (#21827)
- Corrected certain inaccuracies. 
- Added coherence to infinitives for actions (save -> desar)
- Added missing translations.
2024-12-12 16:11:54 +00:00
echobilisim3421
262126e40b
🌐 Added missing Turkish translations to portal.json (#21784)
- Added all missing/blank translations in the portal.json file
2024-12-12 16:00:22 +00:00
Àlex Rodríguez Bacardit
b1275e6776
🌐 Updated Catalan translations in signup-form.json (#21831)
- Corrected typos and style. 
- Added missing translations.
- Added coherent style (tu vs vostè) across files.
2024-12-12 15:21:52 +00:00
Peter Zimon
e2fad8bcb5
Added experimental section in Shade (#21875)
ref https://linear.app/ghost/issue/DES-1033/icon-implementation

The Storybook structure contained Lucide icons under "Components", but
it's an experimental component. This commit creates an Experimental
component group in Shade and updates the corresponding docs.
2024-12-12 12:12:23 +00:00
Peter Zimon
2f671eca69
Shade icons (#21873)
closes https://linear.app/ghost/issue/DES-1033/icon-implementation

In Shade right now there's no support for icons, which is a fundamental
building block in any design system. We use Streamline Icons which
unfortunately don't have an out-of-the-box React support like e.g.
Lucide Icons. This PR adds support for custom icons to be used directly
from Shade by importing SVG's from a directory and creating React
components dynamically. It also adds a grid view of all available icons
in Storybook so it's easy to get an overview of available icons and copy
their React component.
2024-12-12 11:47:26 +01:00
Daniël van der Winden
d78802d7d1
🐛 Fixed responsive issues with Posts filters (#21871)
When using the Admin on a mobile device, the filters on the Posts screen
fell off the screen. They weren't scrollable horizontally, making them
difficult to use. These changes address that.
The Members header uses the same markup, so I addressed a responsive
issue there as well (the search bar for Members wasn't behaving
accurately across resolutions).

fixes
https://linear.app/ghost/issue/DES-1030/filters-for-posts-fall-off-screen-on-mobile-resolutions

**Before / After**


https://github.com/user-attachments/assets/f7d51801-6949-45d0-aea6-054f17d92a19
2024-12-12 09:29:11 +01:00
Princi Vershwal
dd9810fc96
Fixed creating unverified session for reset password (#21867)
Fixes https://linear.app/ghost/issue/ENG-1855/fix-reset-password-flow-in-case-of-2fa

- User is getting stuck on reset password page and they receive a verify token on the mail and nothing happens on the UI. 
- This is happening because the session is not verified in the case of the reset password flow. The backend is sending a code to verify the session, but we don't have the UI in place where the user can enter the code.
- Previously, the user would be redirected to the dashboard once they clicked on "Save new password."
- Now when 2FA is on, we should directly redirect to the dashboard as the reset password link was sent to the email address anyway. This is why we are creating an already verified session in this case.
2024-12-12 07:47:15 +00:00
Sodbileg Gansukh
2308f6f4e1
Fixed deleted member styling in the post analytics (#21874)
ref DES-1012

- previously, when a member was deleted, they were displayed with an
avatar initial `NM`, the name was empty, and their list item wasn't
clickable, which led to user confusion
- now it's much clearer with a placeholder avatar and `Deleted member`
as name
2024-12-12 15:38:13 +08:00
Djordje Vlaisavljevic
038a3e5939
Improved ActivityPub reader view (#21854)
ref https://linear.app/ghost/issue/AP-633/reader-view-customization-options, https://linear.app/ghost/issue/AP-631/estimated-reading-time-in-reader-view

- Added reader view customization options (typefaces, font sizes and line height) which allow users to make the reading experience suit their personal needs and taste. Changing the font size also subtly tweaks the spacing and width of the articles.
- Added an estimated reading time and a simple text-based progress indicator, so users have a better idea of the article length and their progress when reading long-form content.
2024-12-11 18:58:46 +00:00
Peter Zimon
fbbf34e1d0
Added Shade fundamentals (#21812)
ref
https://linear.app/ghost/issue/DES-1020/create-new-react-app-for-shade

Shade is our new design system that follows React best practices and
leverages third-party libraries extensively. It's built on ShadCN/UI
which is one of the most popular React UI libraries today. This commit
adds an (almost) empty React app, set up to be the a starting point of
Shade.
2024-12-11 15:55:58 +01:00
Sanne de Vries
8e5730680e
Improved discoverability of email design settings (#21869)
No ref
- Added "design" and "customization" to the keywords for the newsletters
settings
- Added a description to the newsletters settings
2024-12-11 13:35:32 +00:00
Paul Davis
2351016647
Move saveRaw method from LocalImagesStorage and LocalStorageBase class (#21810)
ref
https://linear.app/ghost/issue/CON-3/external-media-inliner-should-inline-more-file-types

The external media inliner requests each file as a buffer. Saving this
works well for images, but not media or files as the `saveRaw` method is
not available on those storage adapters.

This PR moves the `saveRaw` method from `LocalImagesStorage` to
the `LocalStorageBase` class so it is available to subclasses.
2024-12-11 12:24:01 +00:00
Ghost CI
1feb38442d Merged v5.104.2 into main 2024-12-11 12:01:02 +00:00
Ghost CI
4a4c6c4063 v5.104.2 2024-12-11 12:01:01 +00:00
Michael Barrett
adacb4f451
Changed location of built public content to temporary dir (#21857)
refs
[ONC-662](https://linear.app/ghost/issue/ONC-662/fix-file-write-issues-in-ghost-application-related-to-asset-generation)

Changed location of built public content to temporary dir to circumvent
file writing issues in some environments (i.e gluster). This is a
stop-gap measure until we get to refactoring the generation of the built
public content.
2024-12-11 11:44:43 +00:00
Michael Barrett
712ae4025f
Changed location of built public content to temporary dir (#21857)
refs
[ONC-662](https://linear.app/ghost/issue/ONC-662/fix-file-write-issues-in-ghost-application-related-to-asset-generation)

Changed location of built public content to temporary dir to circumvent
file writing issues in some environments (i.e gluster). This is a
stop-gap measure until we get to refactoring the generation of the built
public content.
2024-12-11 11:34:37 +00:00
Sanne de Vries
86ee480d45
Updated avatar icon for removed comments (#21864)
No ref
- The previous avatar icon was too busy visually.
2024-12-11 10:10:22 +00:00
Daniël van der Winden
c5182e2174
🐛 Fixed mobile navigation for Admin (#21863)
Previously, the only way to close the navigation in Ghost Admin on
mobile was to tap outside of the menu, on the background behind it. With
this change, you can also tap the 'More' button or navigate to any other
menu item to have the menu close itself again.

fixes
https://linear.app/ghost/issue/DES-993/the-slide-out-panel-inside-ghosts-admin-on-mobile-lacks-intuitive

https://github.com/user-attachments/assets/db48a8cd-db4f-4118-9d6a-7b7b3d5e6236
2024-12-11 10:17:25 +01:00
Kevin Ansfield
e86d44ff85 Fixed replies line showing after all replies have been deleted
ref https://linear.app/ghost/issue/PLG-267

- updated delete comment action so it removes comments rather than just updating their status to `'deleted'`
- deleted comments that still have replies have their status updated so the replies remain visible
- matches updated API behaviour where deleted comments are not shown at all
2024-12-11 08:41:27 +00:00
Sag
bd20ad3adb
🐛 Fixed missing subscription attribution on free to paid upgrade (#21846)
closes https://linear.app/ghost/issue/ENG-1561

- problem: When a free member upgraded to paid, we sometimes did not
capture the subscription attribution data

- cause:
    - after checkout, Stripe sends `customer.subscription.created`,
`customer.subscription.updated` and `checkout.session.completed` webhook
events
    - we want to create a subscription in our database based on the
`checkout.session.completed` event, as it contains additional data (e.g.
subscription attribution data)
    - but, we were sometimes creating a subscription based on a
`customer.subscription.*` event during free → paid upgrades, which did
not contain subscription attribution data

- solution: we now ignore `customer.subscription.*` events until a
member and its related subscription have been created in the database
first, by the `checkout.session.completed` event
2024-12-11 02:49:28 +00:00
Steve Larson
dd9d3a6f2e
Added node event support to the job queue (#21858)
ref https://linear.app/ghost/issue/ENG-1851/
- added handling so that jobs run by the job queue can emit events on
completion
- added tests

Events (both node and our DomainEvents lib) must be emitted on the
primary process, so we can't emit these within the worker threads.
Instead, we'll return the necessary data with the job's completion in
the thread message such that the JobQueueManager can emit whatever
events may be needed.
2024-12-10 21:47:49 +00:00
Kevin Ansfield
0f9449137f Fixed comment count in comments-ui when logged in as admin
closes https://linear.app/ghost/issue/PLG-297

- we were setting the comment count Admin API browse comments response meta pagination data which will never be correct because it only counts top-level comments for pagination purposes
- we have a public comment counts endpoint that is already fetched, there's no need to override that when using the Admin API because the overall count doesn't change across API's, even when the Admin API includes hidden comments because those don't impact the visible count
- updated test setup so the title and count is shown so it can be asserted against
- updated mocked api to correctly return count of all published comments+replies
2024-12-10 18:59:49 +00:00
Steve Larson
78c1d5bcf0
Added config for caching the member lookup for link clicks (#21855)
https://linear.app/ghost/issue/ENG-1850/
- added cache/memoized the member uuid lookup within the
LinkClickRepository (used by the LinkClickTrackingService)
- added repository tests for the save method which were absent

This one one of a series of options we're testing out in order to smooth
out the surge in requests following a newsletter send. Most of this
activity is due to link checkers, but Ghost still needs to spend time
processing the member lookup to know whether or not it is a valid id,
and memoizing this lookup could significantly improve throughput by
reducing DB contention.
2024-12-10 11:37:47 -06:00