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

2310 commits

Author SHA1 Message Date
Sam Lord
2f63fa2302
Added Captcha to data attribute forms
ref BAE-370

Enables Captcha (when labs flag and config entry set) in data-attribute
forms within Portal.
2025-01-27 16:52:52 +00: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
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
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
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
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
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
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
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
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
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
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
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