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

40272 commits

Author SHA1 Message Date
Sam Lord
439bbf8b79
Use Captcha middleware in members API
ref BAE-104

The members send-magic-link API should be protected by Captcha. This
required initialising the Captcha service in the members API, and
putting the middleware into the send-magic-link API.

If it's enabled via lab flag and config, then the service will prevent
API calls that don't have a valid Captcha response.
2025-01-27 15:57:31 +00:00
Ghost CI
3e2658baa0 v5.108.1 2025-01-26 17:53:15 +00:00
Ghost CI
d2c868db00 v5.108.0 2025-01-24 15:07:51 +00:00
Daniël van der Winden
9589a91684
🐛 Fixed tags and authors not fitting in the input field (#22052)
Input fields for tags and authors in the post sidebar were hard to use;
they became scrollable if you added more than one line of either.

This fix addresses that; the input field now grows in size to
accommodate for the number of tags or authors you enter.

fixes
https://linear.app/ghost/issue/DES-1087/overflow-on-boxes-in-post-settings-too-small,
https://linear.app/ghost/issue/DES-1084/tag-field-in-post-settings-menu-is-difficult-to-work-now-with-when
2025-01-24 14:11:07 +01:00
Djordje Vlaisavljevic
8c2e62dc23
Improved ActivityPub design (#22051)
ref https://linear.app/ghost/issue/AP-677/standardize-border-radius-used-in-avatars, https://linear.app/ghost/issue/AP-680/standardize-font-sizes-colors-and-weights, https://linear.app/ghost/issue/AP-676/improve-the-sidebar-widget

- Ensured consistent use of border-radius in avatars
- Removed onClick for large avatars, since we only use them when you're already viewing someone's profile
- Updated font colors, weights and sizes for consistency
- Updated design of the sidebar widget in (simpler design, less lines, tighter spacing=
- "Explore" button looks more like what we use in settings and dashboard
2025-01-23 17:35:05 +00:00
Peter Zimon
19d9c3e3e2
Post analytics router update (#22050)
ref https://linear.app/ghost/issue/DES-1082/router-prototype

This task is about testing, figuring out pros and cons of React Router
compared to our current (custom) router, and what effort and risks are
involved in migrating to it.
2025-01-23 16:48:29 +01:00
Sam Lord
c0ccdbe280
Portal: Added HCaptcha element to signup/signin pages
ref BAE-371

Added the HCaptcha react component & related utils to enable it /
disable it based on the Captcha labs flag. At the moment this does not
include the same functionality on forms using the data-attributes.
2025-01-23 12:02:53 +00:00
Peter Zimon
e41fc2c4d5
Shade updates (#22045)
ref
https://linear.app/ghost/issue/DES-1085/update-shade-to-be-used-in-activitypub

- Shade so far was just used in our playground (Post analytics). It
needed to be prepared so that it can be integrated in real projects like
ActivityPub. This means cleaning up everything related to it like
conventions, file structure, documentation etc.
2025-01-23 08:22:04 +01:00
Sag
568322c378
Added new setting in the database: blocked_email_domains [migration] (#22046)
ref https://linear.app/ghost/issue/ENG-1973
ref https://app.incident.io/ghost/incidents/132

- added a new database setting: `blocked_email_domains` (array, default:
`[]`)
- this setting will allow publishers to block additional email domains
during member signups, on top of the ones blocklisted at a config level
(follow-up PR)
2025-01-23 11:12:29 +07:00
Vũ Minh Nguyên
64eef2a851
Added missing Vietnamese translation for portal (#21948)
Translating "This site only accepts paid members."

Co-authored-by: Chris Raible <chris@ghost.org>
2025-01-22 17:21:37 -08:00
Djordje Vlaisavljevic
2d0f6568fa
Fixed reading progress indicator for very short articles (#22036)
ref https://linear.app/ghost/issue/AP-653/scroll-percentage-remains-at-0percent-when-no-content-to-scroll

- When an entire article fits into the viewport height, we used to
show`0%` in the reading progress indicator. Now we check if that's the
case, and then show `100%` if it is.
2025-01-22 17:49:11 +00:00
Sag
5409ae1c68
Released Portal v2.48.3 (#22044)
no issue
- changelog v2.48.2 -> v2.48.3:
    - f07291b72c
2025-01-22 07:35:54 +00:00
Sag
f07291b72c
Added missing error message handler for the integrity token endpoint (#22043)
ref https://linear.app/ghost/issue/PRO-1349

- the integrity token endpoint can return a json response with an error
message (for example, when rate limited)
- added the standard response handler to the integrity token endpoint in
Portal, to render the error message sent by the backend
2025-01-22 14:26:49 +07:00
Kevin Ansfield
3a38aef9b2 Added contentVisibilityAlpha flag
no issue

- flag to allow internal testing of content visibility developments without unintentional early release to beta testers
2025-01-22 07:17:20 +00:00
Sag
c8e76fb498
Released Portal v2.48.2 (#22041)
no issue

- changelog v2.48.1 -> v2.48.2:
    - 3ca419bcbc
2025-01-22 04:48:58 +00:00
Sag
3ca419bcbc
Improved error message when email provider is blocked (#22040)
ref https://linear.app/ghost/issue/ONC-721
ref https://linear.app/ghost/issue/PRO-1349

- also added the rate limit error message into the translate-able
strings in Portal
2025-01-22 04:40:22 +00:00
Chris Raible
669da1cfb1
Shipped portal@2.48.1 (#22039)
Patch update including this bug fix:
713e75838a
2025-01-21 13:04:23 -08:00
Chris Raible
713e75838a
🐛 Fixed newsletters not rendering in Portal Email Preferences (#22037)
ref
https://linear.app/ghost/issue/ONC-723/support-escalation-re-fwd-email-preferences

- On sites where the Default recipients setting was set to anything
other than "Whoever has access to the post", the list of newsletters and
the toggle to subscribe/unsubscribe would not be rendered on the Portal
"Email Preferences" page.
- The bug was introduced in v5.106.0, and intended to hide the
newsletter list if Newsletter sending were disabled completely, but
there was bug in the logic
- This commit has a breaking test to prevent this in the future, and
fixes the logic to only hide the newsletter list if
`editor_default_email_recipients` is explicitly set to 'disabled'.
2025-01-21 11:22:45 -08:00
Peter Zimon
996c9d8c68
Post analytics prototype router (#22034)
ref https://linear.app/ghost/issue/DES-1082/router-prototype

- The current router from `admin-x-framework` looks super complex. This
PR is about testing React Router in the Post analytics prototype.
2025-01-21 14:54:02 +01:00
Hannah Wolfe
3211a146d4
Removed i18n toggle from labs UI (#21927) (#21975)
ref bb9a69e
ref https://linear.app/ghost/issue/ENG-1753/labs-flags-cleanup

- We promoted i18n to GA several weeks ago now, and it's going fine
- Removing the UI first to reduce confusion before cleaning up all the
other references to the flag
- Introduced a new function for setting the publication language in internationalization (i18n) test cases, for readability
2025-01-21 09:58:13 +00:00
Ghost CI
c5b6c72cb5 Merged v5.107.2 into main 2025-01-21 02:17:20 +00:00
Ghost CI
618125169d v5.107.2 2025-01-21 02:17:19 +00:00
Chris Raible
2ecf7ff5c9 🐛 Fixed degraded database performance when using the Post Analytics screen (#22031)
ref
https://linear.app/ghost/issue/ONC-717/support-escalation-re-dashboard-unresponsive

This reverts commit 9082a9f1db, which
introduced an automatic refresh interval on the Post Analytics screen in
Admin. This change led to an increase in the number of requests to the
`/ghost/api/admin/members/events/` endpoint, which is a particularly
database intensive endpoint. Ultimately this led to significantly higher
load on the database which degraded performance for sites with a large
`email_recipients` table.
2025-01-20 17:57:27 -08:00
Chris Raible
6b00bdecb0
🐛 Fixed degraded database performance when using the Post Analytics screen (#22031)
ref
https://linear.app/ghost/issue/ONC-717/support-escalation-re-dashboard-unresponsive

This reverts commit 9082a9f1db, which
introduced an automatic refresh interval on the Post Analytics screen in
Admin. This change led to an increase in the number of requests to the
`/ghost/api/admin/members/events/` endpoint, which is a particularly
database intensive endpoint. Ultimately this led to significantly higher
load on the database which degraded performance for sites with a large
`email_recipients` table.
2025-01-20 17:34:04 -08:00
Djordje Vlaisavljevic
cf9c0199c3 Fixed posts not opening when clicked from profile feed
no ref
2025-01-20 22:40:58 +00:00
Djordje Vlaisavljevic
6b9e6b2cd1 Updated Article design on Profiles
ref https://linear.app/ghost/issue/AP-534/profile-weird-button-hover-state-in-post-list

- While we've separated Inbox and Feed views, we're still showing both Notes and Articles together in Profiles. Articles had a confusing hover state and also felt disconnected. The new design is similar to the one used in the new publishing flow, with adjustments where it makes sense.
- Added more useful alt descriptions
- Fixed images from Thread notes not showing
2025-01-20 18:49:59 +00:00
Djordje Vlaisavljevic
c1d7a46599 Added truncation and "Show more" button for long notes
ref https://linear.app/ghost/issue/AP-618/show-only-excerpts-for-very-long-notes-in-the-feed

- Notes can be pretty long and we used to show them in their entirety, so they could take up a large chunk of the viewport. Now we're limiting the displayed text in notes to 10 lines, and we show a "Show more" button to indicate there is more content.
2025-01-20 18:49:59 +00:00
Ghost CI
72dfb7e80c Merged v5.107.1 into main 2025-01-20 16:07:52 +00:00
Ghost CI
ff4545939c v5.107.1 2025-01-20 16:07:50 +00:00
Sag
77af93be6a 🔒 Blocked spammy email domains in member signups (#22027)
ref https://linear.app/ghost/issue/ONC-721
ref https://app.incident.io/ghost/incidents/132

- added a blocklist at the email domain level for free member signups
- for example, if `blocked-domain.com` is blocked,
`thomas@blocked-domain.com` cannot sign up as free member
- the blocklist is configurable: `"spam.blocked_email_domains":
["blocked-domain.com"]`
2025-01-20 10:50:17 -05:00
Sag
970741cf5d
🔒 Blocked spammy email domains in member signups (#22027)
ref https://linear.app/ghost/issue/ONC-721
ref https://app.incident.io/ghost/incidents/132

- added a blocklist at the email domain level for free member signups
- for example, if `blocked-domain.com` is blocked,
`thomas@blocked-domain.com` cannot sign up as free member
- the blocklist is configurable: `"spam.blocked_email_domains":
["blocked-domain.com"]`
2025-01-20 22:12:55 +07:00
Peter Zimon
e1f5ff1533
Shade updates (#22025)
ref
https://linear.app/ghost/issue/DES-1022/overview-tab-for-post-analytics

- A static version of a React-only Post analytics page needed to be
worked out to learn how Charts, Tabs, Sidebars etc. work in Shade. This
also is a basis for learning more about React patterns.
2025-01-20 12:56:21 +00:00
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