Commit Graph

39885 Commits

Author SHA1 Message Date
Djordje Vlaisavljevic
14e7647157 WIP 2024-11-18 08:44:11 +00:00
Djordje Vlaisavljevic
86641268ab Stopped HTML cards with fixed width from causing overflow in the drawer
close https://linear.app/ghost/issue/AP-557/elements-in-articles-can-cause-horizontal-scrolling
2024-11-14 17:45:59 +00:00
Djordje Vlaisavljevic
6bf69b6a07
Fixed drawer “Back” button appearing in the wrong place (#21624)
ref https://linear.app/ghost/issue/AP-587/back-button-appears-in-wrong-spot-when-article-is-reached-through-a
2024-11-14 17:45:37 +00:00
Djordje Vlaisavljevic
af54b21bf3
Fixed separator showing even after the last list item (#21620)
close
https://linear.app/ghost/issue/AP-528/remove-unnecessary-separator-after-last-list-items

- Previously, in some components, we relied on CSS and all elements in
the list being the same type of an HTML element to show the separator.
Now, we've extracted the separator into its own component and place
after all items during mapping except the last one.
2024-11-14 17:42:43 +00:00
renovate[bot]
0aae3bb1fc
Update dependency gscan to v4.46.0 (#21617) 2024-11-14 20:10:03 +08:00
Sodbileg Gansukh
462fe9c12b
Updated the valid theme fixture (#21619)
no issues

- with gscan v4.46.0, we introduced a new rule for the custom fonts
feature
- this updates the valid theme zip file to make the theme tests work
with the new rules
2024-11-14 19:43:27 +08:00
Djordje Vlaisavljevic
2a0ad25edc
Fixed activity badges not showing when the user doesn't have a profile icon (#21609)
ref https://linear.app/ghost/issue/AP-575/badges-are-not-showing-up-on-placeholder-avatars
2024-11-14 11:15:00 +00:00
Djordje Vlaisavljevic
5e5d5dc5da
Updated menu items to not trigger parent element on click (#21618)
close https://linear.app/ghost/issue/AP-576/clicking-copy-link-to-post-shouldnt-open-the-drawer

- Clicking on a menu item in the `...` dropdown now doesn’t trigger click handlers on parent elements, but it does close the Menu

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
2024-11-14 11:13:37 +00:00
Ronald Langeveld
e254ddbd17
🐛 Fixed marketplace theme installation route (#21616)
no issue

- Fixes a potential regression that caused the marketplace install route
not to route correctly.
2024-11-14 03:41:47 +00:00
Chris Raible
5a3b1d6cf8
Ensured prometheusClient is not initialized unless enabled via config (#21615)
no issue

- Currently the prometheus client is only initialized on boot if enabled
via config, but if it's required in other files (i.e. to create a custom
metric) it will be initialized then
- This commit explicitly checks if the prometheus client is enabled via
config before initializing it, thus preventing it from being initialized
when disabled
2024-11-13 18:34:36 -08:00
Chris Raible
6d9ea91634
Added utilities for creating custom prometheus metrics (#21614)
ref
https://linear.app/ghost/issue/ENG-1771/add-utility-functions-to-easily-create-custom-metrics

- Currently adding custom metrics to our prometheus client requires you
to directly access the `prometheusClient.client` to create the metrics
- This isn't super convenient, as you then have to either keep the
metric in a local variable, or manually get it from the
`prometheusClient.client.register`
- This commit exposes some utility functions for registering metrics on
the `prometheusClient` class, and for retrieving metrics that have
already been registered
2024-11-13 16:21:49 -08:00
Steve Larson
9da4aa3bce
Updated donations tests to try to handle Stripe changes (#21607)
no ref

Stripe made changes (again) that causes our donation tests to fail. This
round we use an if statement to try to make it more inclusive of cases,
as I've seen them use an accordion button, card button, and no button
all in the past 12h.
2024-11-13 13:26:47 +00:00
Djordje Vlaisavljevic
5863c40306
Improved Inbox view UI (#21600)
ref https://linear.app/ghost/issue/AP-521/improve-inbox-view-alignmentstructure

- Improved the layout, spacing and typography of Inbox view
- Removed attachment counters for images in Inbox view
- Added a very very small variant of `APAvatar`
2024-11-13 11:45:37 +00:00
renovate[bot]
ead408ed20
Updated Koenig packages (#21606)
ref https://linear.app/ghost/issue/ENG-1751

- changelog: 9ed048c5ff
2024-11-13 15:09:35 +08:00
Ronald Langeveld
06f6483aa7
Fixed broken Stripe donations browser tests (#21605)
no issue

Stripe recently updated their checkout page to use React with Framer
Motion for animations, causing our Playwright tests to intermittently
fail when attempting to click the “Card” payment button. The standard
Playwright `.click()` method was unable to interact with the button
reliably due to animation-related delays, where the button was present
in the DOM but not fully interactable according to Playwright’s strict
visibility checks.

Switching to `dispatchEvent('click')` directly fires the click event on
the button, bypassing Playwright’s visibility and interactability
checks. This ensures the test can proceed without waiting for animations
to fully complete, resolving the issue with the Stripe checkout flow.
2024-11-13 06:20:21 +00:00
Princi Vershwal
01120c9e2f
Added 2fa to re-authenticate flow inside the editor (#21599)
Ref
https://linear.app/ghost/issue/ENG-1625/re-authenticate-flow-inside-the-editor-doesnt-support-2fa
2024-11-13 04:26:49 +00:00
Steve Larson
38f6bdaa72
Fixed flaky batch sending tests (#21604)
ref https://linear.app/ghost/issue/ENG-1749

Batch sending tests were failing with MySQL fairly regularly. It appears
to be a race condition where the listener for the batch sending job
having completed is returning too early, causing the subsequent
Bookshelf data model refresh to happen too soon.

This is a fundamental flaw in the JobManager awaitCompletion handler
(and how the batch sending system interacts with it) as there's no way
to identify one batch from another - they all use the same name, and we
don't pass along any metadata.
2024-11-12 16:15:43 -06:00
Kevin Ansfield
097394bd88 Fixed flaky avatar saturation test in comments-ui
no issue

- running tests locally, especially in UI mode, would often result in an avatar saturation test failing
- the cause was calculating saturation for an element that still had it's opacity animating in
- added a test util function that waits for an element in a frame to reach full opacity
- used function in test to ensure we have a stable element before calculating the color saturation
2024-11-12 17:10:44 +00:00
Michael Barrett
0f2058cc2a
Fixed inbox tab not showing user's own posts in admin-x-activitypub (#21601)
refs
[AP-588](https://linear.app/ghost/issue/AP-588/inbox-tab-not-showing-users-own-posts)

Fixed inbox tab not showing user's own posts in admin-x-activitypub by
ensuring that the `includeOwn` parameter is set to `true` when fetching
the activities for the inbox tab
2024-11-12 15:59:26 +00:00
Fabien 'egg' O'Carroll
d555cc6612
Handled non-string preferredUsername values (#21598)
ref https://linear.app/ghost/issue/AP-585

If preferredUsername is not a string, and we attempt to render it, we
will crash the entire React application!
2024-11-12 21:22:45 +07:00
John O'Nolan
e7a80d79f3
Updated link to Pintura integration 2024-11-12 08:52:17 -05:00
Kevin Ansfield
a25e79f041 Updated email golden-post snapshot to match modified bookmark rendering
ref https://github.com/TryGhost/Koenig/pull/1388

- includes new truncation of bookmark card content
2024-11-12 13:26:04 +00:00
renovate[bot]
a7a4b96aff Update Koenig packages 2024-11-12 13:26:04 +00:00
matsbst
a2a3b4eacf
🌐 Translated newsletter.json to Norwegian (#21595)
Complete translation of newsletter to Norwegian 🇳🇴
2024-11-12 18:18:26 +08:00
Sunghyun Kim
7c70c0630e
🌐 Added Korean i18n translations (#21577)
ref ONC-557
2024-11-12 16:24:13 +08:00
jubi-git
c845d2e1f6
🌐 Added Dutch (nl) locale to newsletter.json (#21588)
ref ONC-565
2024-11-12 15:52:33 +08:00
Christian Schou
23a4ba93f8
🌐 Updated Danish (dk) Translations (#21593)
Updated the translations with missing Danish translations for comments,
newsletter, portal, and search.
2024-11-12 15:50:13 +08:00
Sodbileg Gansukh
9ffc5ca79a
Fixed embeddable signup form preview and generated code (#21592)
ref ENG-1671
2024-11-12 14:33:52 +08:00
Princi Vershwal
7f158c0e18
🐛 Fixed Admin navigation settings, pressing ENTER will now create a new navigation item (#21591)
Ref
https://linear.app/ghost/issue/DES-73/enter-should-create-new-navigation-itemmove-to-next-field
2024-11-12 05:10:15 +00:00
Sodbileg Gansukh
c41bc5c237
Fixed table row hover effect in Safari (#21586)
ref DES-951
2024-11-12 10:51:51 +08:00
Sam Lord
07afa6500d
Changed SSO adapter to automatically verify sessions (#21388)
ref ENG-1680

SSO is a different flow that wouldn't need the extra email verification
flow
2024-11-11 22:26:40 +00:00
Djordje Vlaisavljevic
ea11367ea4
Stopped loading spinner flash when you first open Search page (#21569)
close
https://linear.app/ghost/issue/AP-531/search-spinner-flashes-for-a-split-second-when-switching-tab-for-the

- Fixed the logic for displaying “loading” and “no results found” states
- Refactored the component to avoid nested ternaries
2024-11-11 11:36:04 +00:00
Sodbileg Gansukh
177e604501
Added custom fonts (#21564)
ref DES-949

This adds custom fonts feature allowing users to select heading and body fonts for their themes from a curated list. This allows publishers to have more control over their brand, and allows themes to have a wider range of styles to appeal to different audiences. 

Without custom fonts support, themes will continue to work as normal, but users won't be able to customize their typography. As for the official themes, all of them will support custom fonts.

---------

Co-authored-by: Aileen Booker <AileenCGN@gmail.com>
2024-11-11 18:38:02 +08:00
Djordje Vlaisavljevic
b55ac9a03a
Fixed Articles appearing squeezed when opened from Notifications or Profile (#21587)
close
https://linear.app/ghost/issue/AP-581/article-content-appears-squeezed-when-opened-from-notifications-or
2024-11-11 09:31:04 +00:00
Ronald Langeveld
c349b9bf26
Added new hidden comments API implementation (#21444)
ref PLG-227

- Behind flags
- Changed Comments API for members and guests to not return hidden or
removed comments - with the only exception being if a hidden or removed
comment have published replies, in which case it will be greyed out as
per the previous version on the UI.
- Wired up a new admin API endpoint for comment to receive all comments.
It's on par with the members / guests endpoint, with the difference
being that it it shows hidden comment's content, where previously the
html property was nullified.
2024-11-11 15:00:59 +08:00
Bastien
c336d46352
🌐 Improved French translations (#21570)
ref https://ghost.org/changelog/internationalization/

- I've changed "email" to "e-mail", which is more correct in French. The
official term is "courriel" but it sounds a bit old-fashioned.
- Apart from that, I've made a few harmonisations and small corrections to
ensure consistency between the files.
2024-11-11 10:08:18 +08:00
Chris Raible
85408d10b7
Added connection pool metrics to prometheus client (#21576)
ref
https://linear.app/ghost/issue/ENG-1592/start-monitoring-connection-pool-utilization-in-ghost

- This commit adds prometheus metrics to the connection pool so we can
start to track connection pool utilization, number of pending acquires,
and also adds some basic SQL query summary metrics like queries per
minute and query duration percentiles.
- The connection pool has now been theorized to be a main constraint of
Ghost for some time, but it's been challenging to get actual visibility
into the state of the connection pool. With this change, we should be
able to directly observe, monitor and alert on the connection pool.
- Updated grafana version to fix a bug in the query editor that was
fixed in 8.3, even though this is a couple versions ahead of production
2024-11-07 23:01:34 -08:00
Ghost CI
08fe08a0a2 Merged v5.100.1 into main 2024-11-07 23:24:07 +00:00
Ghost CI
d3625537e0 v5.100.1 2024-11-07 23:24:04 +00:00
Hannah Wolfe
5229fd44ab Moved newsletter date localisation behind labs flag (#21575)
ref https://github.com/TryGhost/Ghost/pull/21573

- We discussed this, and figured we should get this behind the flag for
now, even though it's pulled
- This gives us the ability to do a fast revert if we have to later,
which is the point of having the labs "GA FEATURES" array
- Note this removes the labsEnabled variable in the tests to make it
clearer if the flag is off or on (it was off!)
2024-11-07 16:47:24 -06:00
Hannah Wolfe
cdb92f1528
Moved newsletter date localisation behind labs flag (#21575)
ref https://github.com/TryGhost/Ghost/pull/21573

- We discussed this, and figured we should get this behind the flag for
now, even though it's pulled
- This gives us the ability to do a fast revert if we have to later,
which is the point of having the labs "GA FEATURES" array
- Note this removes the labsEnabled variable in the tests to make it
clearer if the flag is off or on (it was off!)
2024-11-07 22:46:30 +00:00
Hannah Wolfe
3dc3d7e433 🐛 Fixed newsletter not sending if locale is invalid (#21573)
ref https://github.com/moment/luxon/blob/master/docs/intl.md

- We noticed the following error trace: RangeError: Incorrect locale
information provided
at BatchSendingService.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:639:32)
    at new DateTimeFormat (<anonymous>)
at getCachedDTF
(/home/ghost/node_modules/luxon/build/node/luxon.js:621:11)
at new PolyDateFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:842:16)
at Locale.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:1066:12)
at Formatter.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:2274:21)
at Formatter.formatDateTime
(/home/ghost/node_modules/luxon/build/node/luxon.js:2280:17)
at DateTime.toLocaleString
(/home/ghost/node_modules/luxon/build/node/luxon.js:6893:78)
at formatDateLong
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:45:74)
at Object.getValue
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:683:47)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:158:36
    at Array.map (<anonymous>)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:154:54
    at Array.map (<anonymous>)
at SendingService.buildRecipients
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:151:24)
at SendingService.send
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:127:33)
at response.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:451:51)
- This is due to the locale being user-input - it can be set to any
string.
- In our email sending code we pass the string to luxon to format dates,
which errors if the locale is not valid according it Intl.
- This fix ensures that the locale is valid before passing it to luxon,
falling back to en-gb if the locale is not valid
2024-11-07 16:18:09 -06:00
Hannah Wolfe
d3cda0d39d
🐛 Fixed newsletter not sending if locale is invalid (#21573)
ref https://github.com/moment/luxon/blob/master/docs/intl.md

- We noticed the following error trace: RangeError: Incorrect locale
information provided
at BatchSendingService.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:639:32)
    at new DateTimeFormat (<anonymous>)
at getCachedDTF
(/home/ghost/node_modules/luxon/build/node/luxon.js:621:11)
at new PolyDateFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:842:16)
at Locale.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:1066:12)
at Formatter.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:2274:21)
at Formatter.formatDateTime
(/home/ghost/node_modules/luxon/build/node/luxon.js:2280:17)
at DateTime.toLocaleString
(/home/ghost/node_modules/luxon/build/node/luxon.js:6893:78)
at formatDateLong
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:45:74)
at Object.getValue
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:683:47)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:158:36
    at Array.map (<anonymous>)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:154:54
    at Array.map (<anonymous>)
at SendingService.buildRecipients
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:151:24)
at SendingService.send
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:127:33)
at response.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:451:51)
- This is due to the locale being user-input - it can be set to any
string.
- In our email sending code we pass the string to luxon to format dates,
which errors if the locale is not valid according it Intl.
- This fix ensures that the locale is valid before passing it to luxon,
falling back to en-gb if the locale is not valid
2024-11-07 21:55:20 +00:00
Chris Raible
2eb1fdf7cd
Removed nodemon in favor of node --watch (#21572)
no issue

- We had reintroduced nodemon in
af0f26c75f (diff-bf18f8caf848e17b35e266db04bcaeaad05a3e5d069846615d2b1260482396e1)
for the docker setup, but it has since caused some issues with the `yarn
dev` script.
- In particular, it was causing a restart while migrations were running
in development, which left a migration lock on and prevented Ghost from
starting.
- This commit removes nodemon and replaces it with node --watch, which
we had been using in the past without issues.
2024-11-07 12:25:22 -08:00
Chris Raible
8aba92e444
Fixed CPU Usage chart in grafana dashboard (#21568)
ref
https://linear.app/ghost/issue/ENG-1505/start-monitoring-ghosts-constraints-and-our-3-goals-using-prometheus

- Using `irate` for aggregating CPU usage was resulting in some strange
behavior — the CPU Usage chart would zero out after a few mins of
running. Switching to regular `rate` seems to have fixed the issue
completely.
2024-11-07 10:18:41 -08:00
Djordje Vlaisavljevic
5138ef8ed3 Bumped admin-x-activitypub package
ref https://linear.app/ghost/issue/AP-522/inbox-view-thumbnail-size-inconsistencies
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
a9a72f9445 Made hover states for list items look nicer
ref https://linear.app/ghost/issue/AP-506/suggested-profiles-hover-refinement, https://linear.app/ghost/issue/AP-530/notifications-list-hover-state-is-inconsistent-with-the-rest, https://linear.app/ghost/issue/AP-516/profile-view-hover-state-on-profile
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
c5861a7664 Made all thumbnails in Inbox layout the same width
ref https://linear.app/ghost/issue/AP-522/inbox-view-thumbnail-size-inconsistencies
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
3709a4811e
Improved ActivityPub drawer view UI (#21521)
ref https://linear.app/ghost/issue/AP-507/inbox-view-missing-min-width-for-inbox-card, https://linear.app/ghost/issue/AP-562/remove-unused-viewfollowersmodal-and-viewfollowingmodal-files, https://linear.app/ghost/issue/AP-559/add-post-stats-and-buttons-to-articles-in-drawer-view, https://linear.app/ghost/issue/AP-468/drawer-visual-refinements, https://linear.app/ghost/issue/AP-558/add-actor-info-to-articles-in-drawer-view, https://linear.app/ghost/issue/AP-573/add-anchor-link-to-replies-in-the-drawer

- Made `Articles` in drawer view wider for better reading experience
- Added `Actor` info to `Articles` in drawer view for more context about who posted it
- Added `Like` and `Reply` buttons and counters to `Articles` in drawer view
- Clicking on a Reply notification or Reply icon in the drawer view now scrolls you directly to replies
- Removed modals we’re no longer using
- Updated `RoutingProvider` so it can work without any modals passed to
it
2024-11-07 15:59:29 +00:00
Bastien
28062367d9
🌐 Updated French translations (#21498)
ref https://ghost.org/changelog/internationalization/

- It's difficult out of context to know whether to use an infinitive,
_Ajouter votre commentaire_ or an imperative, _Ajoutez votre
commentaire_. English doesn't make the difference, but French does. By
default, an infinitive is preferable because it remains a suggestion,
whereas an imperative gives an order. For example, I think that _Ajoutez
votre commentaire_ is not relevant, because you don't necessarily have
to add a comment, but you can, so you should say _Ajouter votre
commentaire_. I've tried to be as precise as possible, but you may need
to make some adjustments with the context.

- I find that the word _membre_ is too literal a translation of the
English language and includes too many innuendos such as "member of a
community", "member of a clan", "member of a club", and frankly, it's
not relevant to many blogs. The word _abonné_ is more relevant, because
it doesn't imply a social affiliation. As for the discussion, I've even
taken the liberty of writing _discussion entre lecteurs_, because that's
essentially what it is. It's not a discussion between members or
subscribers, it's a discussion between _readers_.

- Some placeholders are completely American (Jamie Larson), so I've
replaced him with a French one (Jean Martin).

- Complimentary is a word that I didn't understand in the context of
Ghost. I have the impression that it means _offert_, but I don't
understand when it's used.
2024-11-07 15:39:12 +00:00