0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
Commit graph

40041 commits

Author SHA1 Message Date
Sanne de Vries
4e806f7de4
Ensured replies remain visible when parent comment is being edited (#21756)
REF https://linear.app/ghost/issue/PLG-274/

- Currently, replies are hidden when the parent comment is being edited. This PR ensures that replies remain visible when the parent comment is being edited.
- To achieve this, the `CommentComponent` now checks if the parent comment is being edited. If so, the comment content is swapped by the EditForm, while the comment's avatar, header, menu, and replies remain visible.
- The Form component now only renders the FormEditor. A FormWrapper component is used to wrap the avatar and comment header.
- This Form component is used in the EditForm without the FormWrapper, as it is already wrapped in the CommentComponent.
- The ReplyForm and the MainForm use the FormWrapper.
- The Avatar component now also accepts a `member` prop, which is used to display the avatar image. This is because it's no longer used inside the Form component.
2024-12-02 22:17:15 +00:00
Kevin Ansfield
9f9aee508f
Fixed comments APIs incorrectly returning hidden/deleted replies (#21743)
ref https://linear.app/ghost/issue/PLG-270/

If the API is returning replies that are not shown in the UI then the comments-ui app isn't able to paginate correctly. This should be true across all comments endpoints with no inconsistency across browse by page or comment, or when fetching individual comments.

- expectations for public comments endpoints:
  - hidden/deleted comments are never returned unless they have published replies
  - hidden/deleted replies are never returned
- expectations for admin comments endpoints:
  - deleted comments are never returned unless they have published replies
  - deleted replies are never returned
  - hidden comments+replies are always returned (necessary to allow hidden comments to be toggled back to visible)

Fixed by:
- using bookshelf `withRelated` callback function for `replies` relation in `defaultRelations` (and again in `findPage` which uses `withRelations` to load relations individually)
- cleaned up now-unnecessary additional filtering in `CommentsService`
- added additional tests to ensure behaviour and lack of regressions
2024-12-02 20:10:01 +00:00
Djordje Vlaisavljevic
550a52598c
Fixed WordPress article feature image not showing (#21779)
ref https://linear.app/ghost/issue/AP-619/feature-images-from-wordpress-are-[object-object]

- WordPress puts the feature image into an `image` object, rather than putting the URL directly into an `image` string. We now properly render this.
2024-12-02 15:50:27 +00:00
Sanne de Vries
5c3e26351a
Change blockquote border color to accent color (#21780)
REF
https://linear.app/ghost/issue/PLG-291/add-support-for-blockquote-border-in-darkmode
- The border color was invisible in dark mode. Instead of adding a white
border for dark mode, it now uses the accent color. This matches link
and buttoncolors in comments, and makes it stand out more.
2024-12-02 15:45:58 +00:00
Djordje Vlaisavljevic
940914609f
Updated drawer so you can interact with page behind it (#21778)
ref https://linear.app/ghost/issue/AP-613/make-drawer-wider-when-displaying-articles-on-larger-screens

- Added a prop to Modal which allows you to interact with the page
behind the Modal, so the main navigation could still be used while the
Article modal is opened
- Removed the breakpoint we only use in one place, and switched to using
an arbitrary Tailwind breakpoint that matches the one in admin instead
2024-12-02 13:12:05 +00:00
Hannah Wolfe
675b29a418
🔥 Removed UI for AMP (#21762)
closes
https://linear.app/ghost/issue/ENG-1807/further-deprecate-amp-by-removing-the-ui

- AMP has been deprecated for a year, and will be removed in Ghost 6.0
- As the next step towards removing it, we're removing the UI, meaning
new sites can't enable it
- This will hopefully help the transition to dropping it be smoother and
especially prevent newer users from spending a lot of time on AMP in the
run up to it going away
- NOTE: this only removes the UI. All the logic remains, you can still enable AMP via the API/settings table in the DB.
2024-12-02 12:12:52 +00:00
Daniël van der Winden
df53eb091d
🐛 Fixed feedback buttons' layout breaking in different languages, in newsletters (#21752)
fixes
https://linear.app/ghost/issue/DES-974/feedback-and-comment-icons-when-translated-cause-overlapping-in-email

- Since we added i18n, the feedback/comment button layout would break in
languages where the text is longer.
- We've revised the button layout to be centred. On smaller (mobile)
resolutions, we hide the labels and rely solely on the icons.

**Before**
<img width="679" alt="french-before"
src="https://github.com/user-attachments/assets/e3de40a2-7a0a-4317-8ab8-03e285eb9f8a">
<br /><br />


**After**
<img width="720" alt="newsletter-buttons-desktop-french"
src="https://github.com/user-attachments/assets/f7fce52d-bb3b-4afd-b8fd-538a2ec9a31e"><br
/><br />
<img width="462" alt="newsletter-buttons-mobile"
src="https://github.com/user-attachments/assets/9e21c706-8d92-4fc2-804c-ad2aab6b6350">
2024-12-02 10:00:16 +01:00
Princi Vershwal
76c1cd96d2
Added test for re authentication flow (#21774)
Closes https://linear.app/ghost/issue/ENG-1810/add-test-for-re-authenticate-flow-inside-the-editor
2024-12-02 08:14:32 +00:00
Princi Vershwal
f3c3dcdda1
Added undefined check for user in session service (#21773)
No issue

- user is undefined in the case when emailId doesn't exist in the db.
2024-12-02 08:08:24 +00:00
Princi Vershwal
1ded188039
Added config doc to verify screen (#21772)
Closes https://linear.app/ghost/issue/ENG-1729/check-what-happens-for-self-hosters-when-setting-up-a-new-site-without

- Added a link to the configs doc in case self hosters do not receive emails
- This is for the case when email is sent but not delivered.
2024-12-02 08:07:02 +00:00
Sodbileg Gansukh
2292fad5f5
Added design system as a dependency to the Admin-X Settings checks (#21775)
no issues

- when anything is changed in the design system, the Admin-X Settings
checks will run now
- they didn't use to run before, and it caused some PRs to be merged
without being checked
2024-12-02 15:20:01 +08:00
Sodbileg Gansukh
9054781212
Fixed email error flash on the publish flow (#21706)
ref DES-990

- previously, the publish flow was continued regardless of if there was an error while sending email
- now it correctly stays on the error state, and goes to the normal flow once the error is fixed and retried
2024-12-02 11:07:14 +08:00
Michael Barrett
04ed106c73
Refactored data loading to be more performant in admin-x-activitypub (#21770)
refs
[AP-614](https://linear.app/ghost/issue/AP-614/investigate-client-loading-issues)

Refactored data loading to be more performant in admin-x-activitypub:
- Utilised tanstack query for suggested profiles instead of rolling our
own custom hook. This allows us to utilise tanstack for caching
- Refactored how data is loaded for the Inbox / Feed view - Queries are
no longer cleared when switching between the 2 layouts
- Refactored how activity data is key'd to make caching more
deterministic as well as allow mutating a specific activity cache (i.e
when adding a note, ensure it only gets added the the feed activities)
- Removed redundant `excludeNonFollowers` parameter - This is no longer
used by the API
2024-11-30 22:41:51 +00:00
Michael Barrett
995edaa966
Refactored minor things in admin-x-activitypub (#21769)
Just a bunch of minor refactorings in admin-x-activitypub:

- Reorganised api methods
- Reorganised api query hooks
- Reorganised api tests
- Removed redundant `getActor` api method
- Colocate `Search` type with component
- Moved `ViewProfileModal` to `modals`
- Refactored profile
- Remove redundant `useFollowersForUser`
- Remove redundant `useBrowseInboxForUser`
- Removed redundant acceptance tests
2024-11-30 17:35:38 +00:00
Michael Barrett
c7d4facd85
Added infinite scroll to profile page collections in admin-x-activitypub (#21768)
no refs

Added infinite scroll to profile page collections in admin-x-activitypub
2024-11-30 15:51:51 +00:00
Michael Barrett
e2bccbc49f
Utilised endpoint for retireving profile posts in admin-x-activitypub (#21767)
no refs

Updated the profile modal in admin-x-activitypub to retrieve profile
posts from the dedicated profile posts endpoint
2024-11-29 23:37:35 +00:00
Ghost CI
2d072c2758 v5.101.6 2024-11-29 15:05:52 +00:00
renovate[bot]
a065ada196
Update dependency mysql2 to v3.11.5 (#21763)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mysql2](https://sidorares.github.io/node-mysql2/docs)
([source](https://redirect.github.com/sidorares/node-mysql2)) |
[`3.11.4` ->
`3.11.5`](https://renovatebot.com/diffs/npm/mysql2/3.11.4/3.11.5) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mysql2/3.11.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mysql2/3.11.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mysql2/3.11.4/3.11.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mysql2/3.11.4/3.11.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>sidorares/node-mysql2 (mysql2)</summary>

###
[`v3.11.5`](https://redirect.github.com/sidorares/node-mysql2/blob/HEAD/Changelog.md#3115-2024-11-28)

[Compare
Source](https://redirect.github.com/sidorares/node-mysql2/compare/v3.11.4...v3.11.5)

##### Bug Fixes

- 1040 datetime fields returned without time part when time is 00:00:00
([#&#8203;3204](https://redirect.github.com/sidorares/node-mysql2/issues/3204))
([bded498](bded498006))
- circular dependencies
([#&#8203;3081](https://redirect.github.com/sidorares/node-mysql2/issues/3081))
([d5a76e6](d5a76e6c49))
- Deno `v2` requires `commonjs` type explicitly
([#&#8203;3209](https://redirect.github.com/sidorares/node-mysql2/issues/3209))
([cdc9415](cdc9415c7c))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-28 21:39:55 +00:00
Hannah Wolfe
46ca8778b9
Switched tinybird tracker to use localstorage (#21761)
closes https://linear.app/ghost/issue/ANAL-88/go-cookie-less

- This is still an experimental feature
- Using localstorage removes the need for a session cookie
- This in turn removes the need to have a cookie banner
2024-11-28 21:27:30 +00:00
Djordje Vlaisavljevic
f65f5b1426
Made drawer view for Articles wider for easier reading (#21760)
ref https://linear.app/ghost/issue/AP-613/make-drawer-wider-when-displaying-articles-on-larger-screens

- The drawer view for viewing Articles was only slightly wider than the
one for viewing Posts. Since we've decided to make a bigger separation
between these 2 types of post, we wanted to make the drawer almost full
width (excluding the main navigation sidebar).
- This also removes the backdrop from drawer view so the interaction
would be lighter.
- To achieve this we're adding another CSS breakpoint so it would match
the one used in Admin. We didn’t have one since our DS was mostly used
in isolation in Settings.
2024-11-28 19:08:03 +00:00
Djordje Vlaisavljevic
a8a1095910 Cleaned up stylesheet used to display ActivityPub Articles
close https://linear.app/ghost/issue/AP-574/clean-up-iframe-css

- When we began working on ActivityPub integration, we reused the styles from our default Source theme and added default Ghost card styles. This meant we could quickly have nice-looking posts in the admin, but also meant we have some unnecessary lines of CSS. This is now cleane up, resulting in a ~40% smaller file.
2024-11-28 16:27:10 +00:00
Djordje Vlaisavljevic
772e22c5f8 Updated hover state for 'back' button
ref https://linear.app/ghost/issue/AP-599/make-hover-and-click-states-for-buttons-consistent

- 'Back' button in the drawer was missing the hover state we're using for other icon buttons. Now it's consistent with the rest.
2024-11-28 16:27:10 +00:00
Djordje Vlaisavljevic
40adb28f28 Turned off autocomplete in Search input field
close https://linear.app/ghost/issue/AP-612/autofill-appears-in-searchfield

- Safari autocompletes our Search field because it mentions the word 'username' in the placeholder text, but we don't want that as users don't really want to search for their own usernames.
2024-11-28 16:27:10 +00:00
Daniel Lockyer
f6d774ee93 Removed Lexical multiplayer experiment
fix https://linear.app/ghost/issue/ENG-1804/remove-lexicalmultiplayer-code

- this experiment never went anywhere and we'll probably change our plan
  in the future, so this commit cleans up all the relevant code in this
  repo for the feature, in order to cut down on the code we have
2024-11-28 16:00:10 +01:00
Daniël van der Winden
6fb5047601
Updated Dutch translation for "Comment"-button in newsletters (#21757)
The Dutch translation of the "Comment"-button in newsletters was very
formal. This new translation improves that, and more closely matches
Ghost's tone of voice.
2024-11-28 15:56:14 +01:00
Djordje Vlaisavljevic
355f361b64
Updated font sizes and colors for better hierarchy (#21755)
ref https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe

- Posts in the inbox view used the same font colors and sizes for
elements of different importance. Now the contrast and hierarchy of
elements is improved which makes it easier to browse the posts.
- Larger border radius on hover better fits the size of posts.
2024-11-28 14:26:36 +00:00
Djordje Vlaisavljevic
894e1ed798
Improved posts design and icon button hover states (#21754)
close https://linear.app/ghost/issue/AP-599/make-hover-and-click-states-for-buttons-consistent, https://linear.app/ghost/issue/AP-616/improve-feed-view-design

- Updated design for posts shown in the feed, reply and drawer views
- Consistent hover and click states for icon buttons
- Fixed inbox view posts overlapping with the sidebar suggestions
2024-11-28 13:47:56 +00:00
Princi Vershwal
6a70ba8895
Moved staff2fa flag to BETA_FEATURES (#21749)
Closes https://linear.app/ghost/issue/ENG-1800/move-staff2fa-to-beta-features-and-disable-developer-experiments

Currently we have this flag in ALPHA_FEATURES. We want to enable 2fa for selected sites but we would want to disable developer experiments for them, so they don't see the UI and enable random things.
2024-11-28 12:13:59 +00:00
Daniel Lockyer
0f5fb0a2f5 Moved importMemberTier to beta status
ref https://linear.app/ghost/issue/ENG-1802/move-importmembertier-to-beta

- this allows us to enable the flag without needing developer
  experiments enabled, which is useful for Concierge whilst we're still
  wanting to keep it in GA
2024-11-28 12:34:06 +01:00
Ghost CI
f705e7df62 Merged v5.101.5 into main 2024-11-28 11:15:33 +00:00
Ghost CI
eaa6187e8f v5.101.5 2024-11-28 11:15:31 +00:00
Ronald Langeveld
4d8c3ff25d Removed blocking tests (#21747)
ref https://ghost.slack.com/archives/C02G9E68C/p1732783603483239

- Need to create a patch release, however this test is suddenly failing.
- Fails at  const fileChooserPromise = page.waitForEvent('filechooser');
- reason is not clear, however, cannot reproduce.
2024-11-28 17:47:31 +08:00
Daniël van der Winden
30a0018c15
🐛 Fixed unclear newsletter (un)subscribe modal (#21739)
fixes
https://linear.app/ghost/issue/DES-953/newsletter-unsubscribe-modal-is-unclear-leading-to-repeated

Previously, when clicking 'Unsubscribe' in an email, landing on this
modal it was unclear what had just happened if you didn't read the text
below the title, causing people to click the toggles repeatedly.

We've now added a toast notification to make it clear what has just happened,
and if you click the toggles, the notification also shows.

Ideally, we'd be able to stack these notifications in case you hit
multiple toggles in quick succession, but that's going to be a separate
issue, as—to achieve that—it needs to be rewritten more significantly.

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2024-11-28 10:42:43 +01:00
Daniel Lockyer
cd7f8fbba4 Removed old activitypub flag
- we have another flag with a different casing and that's the one that
  is used, so `activitypub` can be deleted
2024-11-28 10:40:19 +01:00
renovate[bot]
0f483fd998 Update dependency @tryghost/koenig-lexical to v1.3.32 (#21745)
ref TryGhost/Koenig@5652bc6

This revert an issue that caused an extra tag in certain conditions in the rendering.
2024-11-28 17:38:40 +08:00
renovate[bot]
3aefb8951c
Update dependency @tryghost/koenig-lexical to v1.3.32 (#21745)
ref TryGhost/Koenig@5652bc6

This revert an issue that caused an extra tag in certain conditions in the rendering.
2024-11-28 09:25:18 +00:00
Ronald Langeveld
72125f352b
Removed blocking tests (#21747)
ref https://ghost.slack.com/archives/C02G9E68C/p1732783603483239

- Need to create a patch release, however this test is suddenly failing.
- Fails at  const fileChooserPromise = page.waitForEvent('filechooser');
- reason is not clear, however, cannot reproduce.
2024-11-28 09:16:34 +00:00
Djordje Vlaisavljevic
60ff94943b
Improved inbox view UI (#21741)
ref
https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe

- Vertically centered feature image
- Timestamp next to the site title
- More consistent spacing in hover state
2024-11-27 13:11:56 +00:00
Sanne de Vries
029177fa69
Fixed delete button being clickable multiple times (#21736)
REF
https://linear.app/ghost/issue/PLG-287/fix-double-click-on-delete-button-impacting-comment-count
2024-11-27 12:43:30 +01:00
Daniel Lockyer
4b51942403 🐛 Fixed triggering wrong error for invalid client versions
fix https://linear.app/ghost/issue/ENG-1502/handle-malformed-client-versions-to-avoid-versionmismatcherror

- in the event we pass a client version that is invalid (ie, anything
  that doesn't resemble semver version), we currently throw a
  VersionMismatchError
- this is slightly misleading because although it is a version mismatch,
  it moreso that it's an invalid string to pass in this header
- to fix that, we can just use `validRange` from `semver` to detect
  this, and throw a BadRequestError with a meaningful error message
- this helps us detect whether the header is actually a version
  mismatch, or an invalid input
2024-11-27 11:52:45 +01:00
Sanne de Vries
52d15cf955
Updated comments spinner style for light mode sites (#21734)
REF
https://linear.app/ghost/issue/PLG-272/look-into-potential-spinner-regression
2024-11-27 10:55:40 +01:00
Đặng Ngọc Quảng
97591cba5e
🌐 Updated Vietnamese translations (#21726)
- Update some untranslated words in the comments.json file
2024-11-27 06:26:51 +00:00
Sag
a5af4c2516
Fixed redundant build steps in the custom-fonts package (#21733)
no issue
2024-11-27 04:38:20 +00:00
Kevin Ansfield
04f337e085 Fixed comments-ui tests not properly mocking actions on replies
no issue

- `MockedApi.browseComments` only worked on top-level comments, it couldn't find replies when passed `filter:'id:123'` such is used when liking and editing replies
- fixed missing get handler for fetching single comment via Admin API (used after showing a hidden comment)
- added `flattenComments` and `findCommentById` helper functions to facilitate easier finding of a comment or reply within the nested structure
- added tests for liking and hiding replies
2024-11-26 18:34:02 +00:00
Djordje Vlaisavljevic
d32955b21e
Made inbox view easier to scan through (#21729)
ref https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe

- Added more white space
- Made more lines of text for titles and excerpts visible
- Added estimated reading time
- Updated feature image size and position
2024-11-26 17:35:25 +00:00
Kevin Ansfield
cdea73b873 Refactored comments-ui admin moderation tests
no issue

- expanded e2e test behaviour to route Admin requests through our MockedApi instance so we have the same test experience for normal and admin comments requests
- extracted page route method bodies to enable request methods to be spied on
- updated admin moderation tests to properly use admin requests
2024-11-26 14:30:23 +00:00
Sanne de Vries
6c064b73e4
Fixed spinner being invisible in light mode (#21727)
REF
https://linear.app/ghost/issue/PLG-272/look-into-potential-spinner-regression
2024-11-26 14:00:23 +01:00
Sam Lord
5865bb576f Fixed invite test
Invited staff members no longer need to do a 2fa verification code on
the first sign-in
2024-11-26 12:04:53 +00:00
Sam Lord
28dba53f26 Bypass 2FA for accounts which haven't yet logged in
ref ENG-1681
2024-11-26 11:16:55 +00:00
Ronald Langeveld
781bfdd60f
Wired up admin api for hidden comments (#21724)
ref PLG-270

- Updated the getCommentByID service to filter out hidden and deleted
replies.
- Ensured all replies are loaded before applying the filter.
- Simplified logic to handle non-paginated routes by directly removing
unwanted replies.
- Wired up new Admin Endpoint that shows hidden replies but not deleted
replies.
- Updated comments-ui client
- Added unit tests for mocking apiClient event listeners.
- added eventlistener playwright tests to ensure it fires on UI clicks.
2024-11-26 16:56:17 +08:00