0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
Commit graph

40240 commits

Author SHA1 Message Date
Ghost CI
4d93defea0 v5.107.0 2025-01-17 15:07:43 +00:00
Michael Barrett
026bb8ffbf
Updated search results account type in admin-x-activitypub (#22021)
no refs

Updated the search results account type in the admin-x-activitypub to
match the updated API response
2025-01-16 21:02:02 +00:00
Djordje Vlaisavljevic
e5ea3a0a8c Fixed "Show all" button not appearing on profile summaries
no ref
2025-01-16 19:14:02 +00:00
Djordje Vlaisavljevic
3e806ca761 Updated copy to match terminology we're using
ref https://linear.app/ghost/issue/AP-646/update-terminology-on-search-page

- "Account" instead of "profile", "handle" instead of "username"
2025-01-16 19:14:02 +00:00
Djordje Vlaisavljevic
0f1d6167cf
Extracted TableOfContents into a separate component (#22019)
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- `TableOfContents` is now a separate component to keep `ArticleModal` simpler
- Switched to using constants for styling different heading levels for better performance and maintainability
2025-01-16 14:32:16 +00:00
Djordje Vlaisavljevic
7bc1102cc6 Improved how we represent unusual article heading structures
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- Sometimes publishers use headings in unusual ways (for example, using just `h3`s). This means we can't rely on headings always being structured in the expected way (`h1`, `h2`, `h3`...) Now after we scan the article for headings, we find the highest level heading and then calculate normalized levels for all other headings. This helps the widget look good even in these edge cases.
2025-01-16 13:30:39 +00:00
Princi Vershwal
a983bf0791
🎨 Optimised SQL query for exporting members (#22017)
ref
https://linear.app/ghost/issue/ONC-699/lever-member-export-unresponsive

- Split large SQL queries into smaller, focused queries to improve
performance and reduce database load.
- Shifted aggregation logic from database to in-memory processing for
improved query efficiency and faster execution.
- Added temp logging to identify performance bottlenecks and measure
execution time for each step in production environment as things are
pretty fast in local setup and staging.
- No updates in the test, this API already has snapshot tests and unit tests
2025-01-16 18:17:41 +05:30
Peter Zimon
2b335e8c37
Fix main navigation default visibility (#22016)
ref
https://linear.app/ghost/issue/DES-797/admin-visual-design-improvements

- With the current user setting initialization the main navigation was to be 
closed/hidden by default. This change makes sure that if the menu toggle
wasn't used it's going to use the default value (`visible: true`)
2025-01-16 11:03:01 +00:00
Michael Barrett
7cf0e92d3e
Changed profile modal to always remote load in admin-x-activitypub (#22012)
no refs

Changed profile modal to always remote load in `admin-x-activitypub`
instead of both accepting an object or a string. This will allow for
easier refactoring of the modal when we switch this area of the app to
use `accounts` instead of `profiles`
2025-01-15 20:59:08 +00:00
Michael Barrett
4ebf4dd1b0
Fixed missing author handle in admin-x-activitypub (#22011)
refs
[AP-647](https://linear.app/ghost/issue/AP-648/refactor-profile-tab-to-use-account-and-follows)

Fixed missing author handle in admin-x-activitypub
2025-01-15 17:53:38 +00:00
Michael Barrett
6bc164cb7c
Updated profile tab to use dedicated account endpoints in admin-x-activitypub (#22010)
refs
[AP-647](https://linear.app/ghost/issue/AP-648/refactor-profile-tab-to-use-account-and-follows)

Updated the profile tab in `admin-x-activitypub` to use dedicated
account endpoints. This is to remove coupling between the UI and the
ActivityPub endpoints in preparation for the upcoming changes around
storing `accounts` and `follows` in the database
2025-01-15 16:43:51 +00:00
Djordje Vlaisavljevic
73f8bcf0b3
Added table of contents widget to article modal (#22008)
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- Adds a table of contents widget to the right side of articles in
reader view that let's you navigate between headings for easier
navigation in long, complex articles
- Enhanced popover component with configurable side positioning
- Updated package version to 0.3.44
2025-01-15 14:33:08 +00:00
Daniel Lockyer
363c27423d Deleted collections code
ref https://linear.app/ghost/issue/ENG-1805/remove-collections-code

- a bit of a chunky commit but this removes all (backend) collections code from
  the codebase, as we're removing the feature whilst it's not fully
  fleshed out
- removes the flag, code and tests
- I need to leave the models because there are some fixtures that get
  generated and I need to clarify whether having inconsistent databases
  is acceptable atm
2025-01-15 15:31:33 +01:00
Daniel Lockyer
1d2e7c2000 Fixed initializing ActivityPub webhooks when enabled after boot
ref https://linear.app/ghost/issue/AP-644/fix-enabling-activitypub-service-when-flag-is-enabled

- right now, we only set up the ActivityPub webhooks if the service is
  initialized at boot
- so if the flag is enabled after boot, the webhooks aren't setup
- this changes that to allow initializing the service either at boot, or
  when the labs setting is changed (and ActivityPub flag is enabled)
2025-01-15 11:26:56 +01:00
Sag
2cc1e28eca
Cleaned up newEmailAddresses feature flag (#22001)
ref https://linear.app/ghost/issue/ENG-1416

- "New email addresses" feature was released in [Ghost
v5.78.0](https://github.com/TryGhost/Ghost/releases/tag/v5.78.0)
(commit:
7d0be3f1a9)
- In the context of DMARC changes from February 2024, we've allowed
self-hosters to change their sender and reply-to email addresses without
verification (cf. [Investigation For
Self-hosters](https://www.notion.so/ghost/Investigation-on-FROM-addresses-3f07d724e6044179b38e2793e1d9e797)
and [DMARC Product
Changes](https://www.notion.so/ghost/Working-Document-DMARC-Product-Changes-4cf1e435d8f2452f83cd92dddeaf9d67?pvs=4))
2025-01-15 10:56:47 +07:00
Peter Zimon
6ca066c8c3
Refined hover area for closed sidebar in Admin (#22004)
ref
https://linear.app/ghost/issue/DES-797/admin-visual-design-improvements

- When the sidebar is closed in Admin, the hover area to re-open it is
too narrow. This PR updates the width of this area so it's easier to
target.
2025-01-14 14:10:44 +01:00
Ronald Langeveld
8055c3db55
Bumped Comments-UI to 1.0.6 (#22003)
closes PLG-288

- Bumped comments-ui to 1.0.6
2025-01-14 08:12:48 +00:00
Ronald Langeveld
819f510867
🐛 Fixed custom view not showing edit button in bad state (#22002)
ref ONC-715

- A customer reported an issue where one of their custom views in Admin doesn't
have the edit button appearing.
- The issue stems to a bad state in the database where `order` has
`null` as a value, however this should never be possible.
- To fix this, we allow the filtering which compares the routes with the
view query to ignore nulled keys in order for the edit button to be
populated.
- also added tests
2025-01-14 15:37:11 +09:00
Ronald Langeveld
8db228fa6e
Updated Comments likes UI changes to be instant (#21861)
ref PLG-288

- Implemented instant UI updates for comment likes/unlikes using
optimistic rendering.
- Enhanced error handling reverts state on API failure, ensuring
consistency.
- Added new test helper to mock failed API requests, needed to test
revert state handling.
2025-01-14 15:20:47 +09:00
Steve Larson
978609506a
Added additional test routes (#22000)
no ref

Added a couple new routes for testing purposes. server:testmode config
must be set to true to access.
- {ghostUrl}/ghost/api/block/:seconds will block the node process for
the given duration
- {ghostUrl}/ghost/api/drop will simply hold the connection until client
timeout by doing nothing with it, helpful for saturating connections
2025-01-13 23:00:13 +00:00
Sanne de Vries
40073d916a
Fixed power select trigger styles in post preview (#21997)
No issue
- The css specificity had changed due to adding `:not(gh-input-x)`,
which led to an unintended border around the free/paid dropdown in the
email preview
- The description field on the tag page had an unintended `max-width`.
2025-01-13 16:27:14 +00:00
Peter Zimon
9f13ad0716
🎨 Admin visual design updates (#21987)
ref DES-797

A lot of visual details of the Admin is outdated and inconsistent with
newer UI components such as settings. This PR improves several of these
inconsistencies and refreshes the visual design of the Admin outside
settings. In details the following components have been updated:

- Input fields and dropdowns use grey background color in Post settings
menu when not in-focus
- Got rid of the grey background for sections in Member details and Tag
details
- Updated typography details esp. as font-weights and sizes
- Updated modal corners, shadows
- Added a way to close the main navigation
- Updated main navigation styles
- Added flat background color for list items on hover
- Updated subscription cards in Member details
- Further smaller visual design changes
2025-01-13 17:23:43 +01:00
Daniël van der Winden
83d7691fe9
Fixed dark mode separator in Analytics settings (#21996)
The separator in Analytics settings wasn't showing in the right colour
in dark mode. This change fixes that.

Fixes
https://linear.app/ghost/issue/DES-1077/analytics-separators-have-wrong-colour-in-dark-mode
2025-01-13 14:47:38 +00:00
Daniël van der Winden
1c4d7b8cd7
Fixed dark mode separator in Access settings (#21995)
The separator in Access settings wasn't showing in the right colour in
dark mode. This change fixes that.

No issue.
2025-01-13 14:24:04 +00:00
Sodbileg Gansukh
459fe30ed7
Made form elements more consistent (#21921)
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Sanne de Vries <65487235+sanne-san@users.noreply.github.com>
2025-01-13 15:11:09 +01:00
Daniël van der Winden
31fcedd13b
Improved member filter display by clamping long post titles (#21994)
[Previously](98306d2337),
we improved the way the member filter looks when it needs to display
long titles. Extremely long titles, however, would be a little hard to
read.

Now, extremely long titles will be clamped after two lines, making the
filter easier to scan.

No issue.
2025-01-13 12:09:30 +01:00
Ghost CI
a963b5147e v5.106.1 2025-01-13 07:55:06 +00:00
Daniel Lockyer
93fceec613 Reverted mocha to resolve minimum Node version bump
- Mocha v11 requires a higher version of Node 18 than our minimum, so we
  should revert it to maintain support for v18.12.1 for now
2025-01-13 08:41:15 +01:00
Ghost CI
4059fa2f7f v5.106.0 2025-01-10 15:07:54 +00:00
Sam Lord
5b42cf2338
Portal: Refactored data-attributes file to use async / await
no issue

Will assist with later changes, like adding Captcha. Since Captcha is an
optional feature, it would complicate the promise chain considerably.
2025-01-09 17:41:37 +00:00
Sam Lord
8dd5b0883a
Added Captcha service module
ref BAE-369

Added captcha-service module. Currently unused but idea here is that we
can add this middleware to forms protected by Captcha to validate the
response.
2025-01-09 16:25:40 +00:00
Sam Lord
3cf1abfc49
Added a labs flag for Captcha
refs BAE-638
Currently unused, but adding this early to prevent future commits from
enabling the feature for all users
2025-01-09 15:43:03 +00:00
Michael Barrett
20a1b64a15
Handle null values for post content & excerpt in admin-x-activitypub (#21989)
Handle null values for post content & excerpt in admin-x-activitypub

refs [TryGhost/ActivityPub#245](https://github.com/TryGhost/ActivityPub/pull/245)

In [TryGhost/ActivityPub#245](https://github.com/TryGhost/ActivityPub/pull/245) we changed the service to allow for `null` values for the `content` & `excerpt` field. This means we could potentially be passing `null` values to `stripHtml` which would cause the app to crash. This commit ensures we always pass a string to `stripHtml` as well as updating the types to reflect what the value can be
2025-01-09 15:32:06 +00:00
Sanne de Vries
ea127b29db
Shipped portal@2.48.0 (#21988)
No issue
- Includes changes to Portal Button default settings and mobile
behaviour
2025-01-09 16:12:12 +01:00
Sanne de Vries
2668284451
Changed Portal Button to be off by default and hidden on mobile (#21983)
Ref
https://linear.app/ghost/issue/DES-1074/change-portal-button-defaults-and-hide-on-mobile
- These days, themes have subscribe and account buttons built in. The
Portal Button should be opt-in rather than opt-out.
- On mobile devices, the Portal Button takes up too much valuable real
estate.
2025-01-09 13:07:30 +01:00
renovate[bot]
c7139a27c7
Added support for line breaks in more editor card fields (credit: @cathysarisky)
ref https://github.com/TryGhost/Ghost/issues/20027

- fixes quirky behaviour and adds full support for Shift+Enter line breaks across our various editor cards
2025-01-08 16:50:03 +00:00
Daniël van der Winden
171036e640
🎨 Made 5 settings quicker to edit at the top-level in Settings (#21976)
Based on our changes to the _Access_ and _Analytics_ cards in Settings,
we decided to update how we allow edits to a few other settings, too.

These changes allow the following settings to be manipulated at the
top-level in Settings, without having to click 'Edit' first.

- Timezone
- Default recipients for newsletters
- Publication language
- Social accounts
- Tips and donations

fixes
https://linear.app/ghost/issue/DES-1062/updates-to-editsave-method-of-settings-cards
2025-01-08 16:33:54 +00:00
Djordje Vlaisavljevic
d9abbb594f Fixed bottom part of modals getting cut off on mobile
ref https://linear.app/ghost/issue/DES-1069/cannot-save-changes-made-to-staff-user-profile-from-mobile-device, https://linear.app/ghost/issue/DES-1070/on-mobile-cannot-click-send-invitation-now-when-adding-staff-members

- We were using viewport units to set the height of the modal, but the issue with that value is that it doesn't take into account browser toolbars on phones. Switching to dynamic viewport units fixes this issue.
2025-01-08 15:52:11 +00:00
Peter Zimon
620b42f275
Fixed Select component catching all ESC keypresses (#21977)
closes
https://linear.app/ghost/issue/DES-1075/regression-esc-doesnt-close-admin-settings

- Hitting ESC in Admin/Settings while nothing is in focus should close
Settings and navigate back to the Dashboard — instead, right now nothing
happens when `ESC` is hit. The problem was that the `Select` component
in the current Design System caught `ESC` keystrokes and stopped
propagating them even if they were not in focus. This issue wasn't
apparent so far because no `Select` components were rendered directly on
the Settings page. However, in a [recent
change](ab2c7f18e2)
we moved out some select components from Access settings to the main
Settings view, which immediately stopped propagating `ESC` keystrokes to
the main component. This fix adds a check if the `Select` (or any other)
component is in focus and stops propagation only if that's true.
2025-01-08 15:13:00 +01:00
Chris Raible
0c56c9bb8f
Fixed browser tests running in docker compose (#21974)
ref
https://linear.app/ghost/issue/ENG-1968/get-browser-tests-working-in-docker

- When running browser tests in docker compose, the `stripe listen`
command was not outputting the API key from the environment, because
it's expecting that you've already run `stripe login` to authenticate
with stripe. It only outputs the API key in the command line in CI.
- This isn't convenient/practical to do in docker, and it's much easier
to supply the API key as an environment variable, so this changes the
logic to use the API key from the command line when running in docker
_or_ CI.
2025-01-07 20:03:39 -08:00
Chris Raible
c1f9740665
Added opt-in ghost service to docker compose (#21938)
ref
https://linear.app/ghost/issue/ENG-1957/add-ghost-service-to-base-docker-compose-setup

- Currently our `compose.yml` file only runs Ghost's supporting
services, and it's expected that you'll run Ghost locally on your host
machine. This commit adds a `ghost` service to our `compose.yml` file,
so you can optionally run Ghost itself in a container using docker
compose.
- The `ghost` service is opt-in using [docker compose
profiles](https://docs.docker.com/compose/how-tos/profiles/), to
maintain the current behavior of only running supporting services as the
default.
- This commit also fixes an issue in the Dockerfile: the `WORKDIR` arg,
which is used to optionally specify an alternative working directory, is
not propagated from one build stage to the next, so it has to be
manually added as an `ARG` in each stage. This was necessary to use the
same Dockerfile for devcontainers (which require the WORKDIR to be
`/workspaces/ghost`) and docker compose, where we use `/home/ghost` in
alignment with the production image.
2025-01-07 14:16:43 -08:00
Djordje Vlaisavljevic
30a60d903d Disable "Create" button after first click in "Create newsletter" modal
ref https://linear.app/ghost/issue/DES-505/double-click-on-newsletter-create-button-closes-the-modal

- It was possible to click this button again after the first click, which would close the modal and then open the "Edit newsletter" modal, which is confusing for the user. The button is now both disabled and in the loading state after the first click.
2025-01-07 16:56:13 +00:00
Djordje Vlaisavljevic
1d59399b41
Improved history modal (#21970)
ref https://linear.app/ghost/issue/DES-408/staff-filter-cut-off-in-history-in-rare-case, https://linear.app/ghost/issue/DES-313/adminx-history-doesnt-show-loader-when-actions-are-being-fetched, https://linear.app/ghost/issue/DES-314/adminx-history-pagination-is-cut-off

- Added missing loading states: bigger one for initial fetch, smaller one when loading the next page
- Added missing empty states: one for when there’s no history entries at all, another for when no entries match the currently applied filters
- Fixed last entry having the bottom part cut off
- Fixed type icon showing underneath the avatar
- Made “Filter” button larger to match the select field
2025-01-07 12:12:58 +00:00
renovate[bot]
e441157874 Pin dependencies 2025-01-07 12:11:37 +01:00
Daniel Lockyer
1b26f06c48 Removed Admin UI for enabling URL cache
ref https://linear.app/ghost/issue/ENG-1803/remove-url-cache-code

- this was an experimental feature to persist the URL cache to disk so it can be read upon boot, which would save recalculating it and hopefully speed up boot times
- it was never fleshed out and the code is a bit of a hack, so it's not really worth keeping it around
- it's not trivial to delete the backend code because it's hooked into
  the E2E tests and they fail if you remove the flag (strange), so I'm
  just removing the UI so no-one can enable it
- I'll remove the backend code in a future commit
2025-01-07 11:11:42 +01:00
Sag
0c045d0515
Released Portal v2.47.1 (#21967)
no issue

- changelog:
    - 943c393542
    - 1fd2175a44
2025-01-07 09:06:41 +00:00
Sag
1fd2175a44
Fixed copy in Portal when signup is not available (#21965)
ref https://linear.app/ghost/issue/ENG-1235

- we currently have three different messages when signup is not
available (this site is invite-only, this site only accepts paid
memebers, membership unavailable); the first two offer a link to sign
in, whereas the third one does not as all membership features are
disabled
- this PR fixes the logic to render the correct message, given the
reason why signup is not available
- also removes the usage of `allowSelfSignup` in Portal, as 1) the
naming is poor and 2) `allowSelfSignup` is computed based on the
existing `membersSignupAccess` and is therefore redundant
2025-01-07 08:32:32 +00:00
Hannah Wolfe
b6fe724b57
Updated test snapshots for 2025 (#21963)
ref
a86bf46347 (diff-310689502a3d29cb4c582e61ebb4ac0c79c0a102d1096bd622ee5a7439642021L455)
ref
f568b35f26

- We shouldn't really hardcode these dates, but fixing it once a year is
quicker than figuring out what to do instead 😅
2025-01-06 16:19:59 +00:00
Daniël van der Winden
98306d2337
Fixed member filter dropdown breaking for long post titles (#21962)
Previously, if you'd filter members by which page or post they signed up
on, if you had very long titles for your posts they wouldn't display
properly. This change removes the fixed height set for items within this
dropdown, which fixes that.

Fixes
https://linear.app/ghost/issue/DES-1057/long-post-titles-get-squashedcut-off-in-members-filter-dropdown
2025-01-06 13:48:41 +00:00
John O'Nolan
943c393542
2025
Co-authored-by: Hannah Wolfe github.erisds@gmail.com
2025-01-06 11:40:59 +00:00