Commit Graph

19621 Commits

Author SHA1 Message Date
Fabien O'Carroll
2c6321472c Added endpoint for comments/post/:post_id
refs https://linear.app/tryghost/issue/ENG-676/

This is pretty simple as we can reuse the existing browse method
on the CommentsController, but we need to add support for the post_id
option to the endpoint, for it to be added to the frame.

We also need to update the browse method to enforce the post_id on the
NQL filter. I initially tried this with string concatenation, but ran
into way too many bugs, so we're using a mongo transformer instead.
2024-02-28 22:40:56 +07:00
Djordje Vlaisavljevic
f032f11d8a Added hrefs to paywall links for improved SEO
refs DES-150
2024-02-28 15:28:41 +00:00
Fabien O'Carroll
93263fa7be Ensured that endpoint header config is not modified in future
refs https://linear.app/tryghost/issue/ENG-674/

This will cause errors to be thrown if developers attempt to modify the shared
header config in future.
2024-02-28 21:31:04 +07:00
Fabien O'Carroll
ec697051dc 🐛 Fixed cache invalidation header race conditions
refs https://linear.app/tryghost/issue/ENG-674/

This ensures that all of our dynamic cache invalidation header logic
is applied on a per-request basis!
2024-02-28 21:31:04 +07:00
Fabien O'Carroll
a177600b30 Supported setting headers on a per-request basis
refs https://linear.app/tryghost/issue/ENG-674

This paves the way for us to have dynamic cache invalidation headers
without clobbering the shared headers config.
2024-02-28 21:31:04 +07:00
Fabien 'egg' O'Carroll
5fae212416
Ensured comment counts route doesn't load member (#19762)
refs https://linear.app/tryghost/issue/ENG-672/

The comment counts endpoint does not need member authentication.
This saves us a bunch of db queries for each request
2024-02-28 07:36:35 +07:00
Fabien 'egg' O'Carroll
7f392c305b
Added output to the get helper when the timeout is exceeded (#19761)
refs https://linear.app/tryghost/issue/ENG-670

We keep running into issues with a sites content not being correct,
and slow get helpers being the suspect - but it's difficult to prove.
The idea behind this it to give us concrete evidence, which will allow
us to diagnose the problem faster.
2024-02-28 07:35:16 +07:00
renovate[bot]
0c5f1daf96 Update dependency newrelic to v11.11.0 2024-02-27 22:55:16 +00:00
Kevin Ansfield
f3e36bcd4e
🐛 Fixed extra whitespace in plaintext transactional member emails (#19736)
closes ENG-660

- added tagged template function to strip leading whitespace from our plaintext email strings without making the source file harder to read
2024-02-27 16:24:38 +00:00
Kevin Ansfield
89ab3b26d2
🐛 Fixed pasting into HTML card editor replacing the card with a paragraph (#19757)
closes ENG-657

- bumps `@tryghost/koenig-lexical` to include fix for preventing default Lexical behaviour when we detect a paste event inside a nested CodeMirror editor
2024-02-27 12:38:26 +00:00
Ghost CI
536f67398c Merged v5.79.6 into main 2024-02-26 17:18:43 +00:00
Ghost CI
3b0d0934eb v5.79.6 2024-02-26 17:18:41 +00:00
Kevin Ansfield
ab7c1cfa92
Fixed incorrect cache invalidation headers for slugs Admin API endpoint (#19753)
closes ENG-666

- the Admin API `GET /slugs/{type}/{slug}/` endpoint is used by Admin to check when a potential slug needs de-duping by adding a `-{x}` suffix. Most often this occurs when setting a draft post title
- the endpoint was returning a full-site cache invalidation header meaning hosting services could be blowing away their site caches and needlessly hurting performance because this endpoint is purely a read operation and makes no changes to the site
- updated the endpoint to return no cache invalidation header
2024-02-26 17:02:09 +00:00
Kevin Ansfield
ca9c0a4055
Fixed incorrect cache invalidation headers for slugs Admin API endpoint (#19753)
closes ENG-666

- the Admin API `GET /slugs/{type}/{slug}/` endpoint is used by Admin to check when a potential slug needs de-duping by adding a `-{x}` suffix. Most often this occurs when setting a draft post title
- the endpoint was returning a full-site cache invalidation header meaning hosting services could be blowing away their site caches and needlessly hurting performance because this endpoint is purely a read operation and makes no changes to the site
- updated the endpoint to return no cache invalidation header
2024-02-26 16:59:29 +00:00
renovate[bot]
65a9a04959 Update dependency mysql2 to v3.9.2 2024-02-26 16:25:50 +00:00
Ghost CI
3a0fd45958 v5.79.5 2024-02-26 06:26:13 +00:00
renovate[bot]
afe1350008 Update dependency terser to v5.28.1 2024-02-23 17:18:29 +00:00
renovate[bot]
e1bc7c555a Update dependency terser to v5.28.0 2024-02-23 11:29:11 +00:00
renovate[bot]
49fc876fe1 Update dependency sanitize-html to v2.12.1 2024-02-22 19:17:35 +00:00
Alexandre "Lekler" Rodrigues
fd3192281a
Updated Brazilian Portuguese translations (#19724)
<!--
copilot:summary
-->
2024-02-22 14:05:27 -05:00
renovate[bot]
211016210e Update dependency i18next to v23.10.0 2024-02-22 14:10:30 +00:00
Steve Larson
02edc5ad4f
Updated browser tests to be less flaky (#19701)
no refs

- Offers browser tests were subject to a race condition. I'm guessing
this dates back to when we moved to Settings X (and React), as it seems
the url for the offer is not present on the first render of the page -
despite being returned in the `POST` request of the offer creation, the
component does a `GET` on render to get the link. This is now awaited.
- The Publishing timezone test also seemed to suffer from a race
condition. This is less sure of a fix as it's a much less frequent
failure. The date time picker input is now validated in the test before
continuing.
- Offers browser tests often timed out so the timeout has been moved to
90s for these tests.
- All tests were bumped to 75s timeout as we generally would
occasionally hit the timeout.
2024-02-21 17:47:44 +00:00
renovate[bot]
bcbd3fbcc8 Update dependency sanitize-html to v2.12.0 2024-02-21 16:47:38 +00:00
Kevin Ansfield
a3f8aa110d
🐛 Fixed explicit HTML entities being decoded when rendering HTML cards (#19728)
closes ENG-608

- bumps Koenig rendering packages to include fix for HTML entities in HTML card content being decoded during rendering which could result in unexpected/broken output
2024-02-21 16:36:04 +00:00
Nick Moreton
7c407af642
Added Posthog event sending to trackEvent function (#19716)
refs PA-37

As we add Posthog to the stack we want to send the existing events we
track to it, as well as opening up the method to teams to use in their
initiatives.

---------

Co-authored-by: Chris Raible <chris@ghost.org>
2024-02-20 14:32:56 -08:00
Chris Raible
f49b5ab78d
Added reusable isPosthogLoaded function (#19722)
no issue

- We were checking if Posthog was loaded in a few separate places using
the same logic — this PR consolidates that logic into a simple utility
function so we can ensure consistency and change this logic more easily
if we need to in the future
2024-02-20 14:08:35 -08:00
Chris Raible
fbeecd58e6
Fixed issue with calling Posthog functions before it is loaded (#19721)
refs PA-36

- Since Posthog is loaded outside of the main Admin app bundle, we need
to check to make sure it exists before calling it. This way it will only
run on Pro and not locally or on self-hosted instances
- Previously we were checking that `window.posthog` existed, but there
are some cases where `window.posthog` may exist, but the `posthog`
object is not fully loaded yet.
- This change fixes this by checking for `window.posthog.__loaded`
instead, which is set to `true` once the `posthog` object is fully
loaded — at this point, we should be able to call whatever functions we
need to on `window.posthog`
2024-02-20 13:57:42 -08:00
Sag
034df3714e
Removed leftover alpha flag (#19717)
no issue
2024-02-20 14:07:03 +01:00
Sag
ba3ea9b36c
Fixed browser tests (#19719)
no issue
2024-02-20 14:03:36 +01:00
Sag
e9f5af110c
🎨 Added option to change the name of the free tier (#19715)
ref ENG-607

- also added the option to show the monthly pricing by default during
signup

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2024-02-20 12:54:41 +01:00
renovate[bot]
cc46406eb9 Update dependency terser to v5.27.2 2024-02-19 13:13:50 +00:00
Ghost CI
8be7f7c528 Merged v5.79.4 into main 2024-02-19 11:26:02 +00:00
Ghost CI
98b5992f63 v5.79.4 2024-02-19 11:26:01 +00:00
Kevin Ansfield
d1ce0ad34a
🐛 Fixed wide + full-width cards not displaying correctly inside the editor (#19711)
closes ENG-651

- bumps `@tryghost/koenig-lexical` to include fix for styling regression
  - https://github.com/TryGhost/Koenig/pull/1161
2024-02-19 11:06:32 +00:00
Kevin Ansfield
ef66cd0433
🐛 Fixed wide + full-width cards not displaying correctly inside the editor (#19711)
closes ENG-651

- bumps `@tryghost/koenig-lexical` to include fix for styling regression
  - https://github.com/TryGhost/Koenig/pull/1161
2024-02-19 11:05:37 +00:00
renovate[bot]
6b19637566 Update dependency i18next to v23.9.0 2024-02-19 00:18:33 +00:00
Ghost CI
0c4d62880e v5.79.3 2024-02-16 18:20:06 +00:00
Ghost CI
49bf6d2754 v5.79.2 2024-02-16 16:06:40 +00:00
renovate[bot]
3437e26bc9 Update dependency webpack to v5.90.2 2024-02-15 15:57:41 +00:00
renovate[bot]
25f744ccea Update dependency terser to v5.27.1 2024-02-15 12:19:15 +00:00
renovate[bot]
fa89379474
🐛 Fixed editor card panels being positioned under post settings menu (#19635)
closes DES-112

- bumps `@tryghost/koenig-lexical` to include a few card settings panel improvements
  - initial panel positioning now takes sidebar into consideration
  - panels re-adjust position when opening/closing sidebar
  - panels can no longer be dragged off-screen or under the sidebar
2024-02-14 17:16:47 +00:00
renovate[bot]
c0325da0e7 Update dependency newrelic to v11.10.4 2024-02-13 21:27:42 +00:00
Chris Raible
7dafefbfa7
Added PostHog identify calls in admin using hashed email address of user (#19685)
refs PA-24

- Added PostHog identify() calls using the user's hashed email address
when a user is logged into admin
- Added PostHog reset() calls to reset PostHog's distinct_id when a user
logs out of admin
- These events will only be sent in Admin running on Ghost(Pro), and won't impact self-hosted instances.
2024-02-13 13:23:03 -08:00
Kevin Ansfield
8a6a35851e
🐛 Fixed editor feature image caption not expanding to show long content (#19688)
closes DES-6
refs https://github.com/TryGhost/Ghost/issues/19545

- changed fixed height to min-height so the input expands when content wraps over multiple lines
2024-02-13 13:06:09 +00:00
Peter Zimon
ba9b695626
Update "Customize" link on Setup screen (#19686)
refs.
https://linear.app/tryghost/issue/DES-113/clicking-customize-design-on-setup-page-lands-you-on-top-level

On the setup screen 60% of people choose "Customize your site" which ATM
just take people to the top level Settings screen. This is very
confusing as with all the settings people don't know where to click to
actually get to customizing their site.

This PR fixes it by showing the design settings when clicking on
"Customize your site" and to the Dashboard after closing it.
2024-02-13 11:16:01 +01:00
Zeit08
92451e9bc2
Small adjustments italian (#19673)
I refined some translations, and I wrongly translated a line, which I
commented. I hope it is understandable.

---------

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
Co-authored-by: Ryan Feigenbaum <ryan.feigenbaum@gmail.com>
2024-02-12 16:32:09 -05:00
renovate[bot]
cd8b5f3ab3 Update dependency yjs to v13.6.12 2024-02-12 02:16:00 +00:00
Ghost CI
300563eb95 v5.79.1 2024-02-09 16:04:10 +00:00
Chris Raible
59076d1bca
Reverted "Fixed PostHog toolbar in admin (#19675)" (#19680)
This reverts commit c32ee3ca40.

- I found another way to fix this, making this change unnecessary
2024-02-08 16:58:46 -08:00
Chris Raible
c32ee3ca40
Fixed PostHog toolbar in admin (#19675)
refs PA-32

- The PostHog toolbar relies on a value that is passed via a hash in the
URL to launch successfully
- Admin overwrites the hash (since it uses hash based routing) before
the toolbar has a chance to read the value
- This change checks for the hash and if it exists, it launches the
toolbar using the hash value
2024-02-08 13:40:03 -08:00