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.
ref
https://linear.app/ghost/issue/ENG-1968/get-browser-tests-working-in-docker
- When running browser tests in docker compose, the `stripe listen`
command was not outputting the API key from the environment, because
it's expecting that you've already run `stripe login` to authenticate
with stripe. It only outputs the API key in the command line in CI.
- This isn't convenient/practical to do in docker, and it's much easier
to supply the API key as an environment variable, so this changes the
logic to use the API key from the command line when running in docker
_or_ CI.
ref
https://linear.app/ghost/issue/ENG-1957/add-ghost-service-to-base-docker-compose-setup
- Currently our `compose.yml` file only runs Ghost's supporting
services, and it's expected that you'll run Ghost locally on your host
machine. This commit adds a `ghost` service to our `compose.yml` file,
so you can optionally run Ghost itself in a container using docker
compose.
- The `ghost` service is opt-in using [docker compose
profiles](https://docs.docker.com/compose/how-tos/profiles/), to
maintain the current behavior of only running supporting services as the
default.
- This commit also fixes an issue in the Dockerfile: the `WORKDIR` arg,
which is used to optionally specify an alternative working directory, is
not propagated from one build stage to the next, so it has to be
manually added as an `ARG` in each stage. This was necessary to use the
same Dockerfile for devcontainers (which require the WORKDIR to be
`/workspaces/ghost`) and docker compose, where we use `/home/ghost` in
alignment with the production image.
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
ref https://linear.app/ghost/issue/ENG-1235
- we currently have three different messages when signup is not
available (this site is invite-only, this site only accepts paid
memebers, membership unavailable); the first two offer a link to sign
in, whereas the third one does not as all membership features are
disabled
- this PR fixes the logic to render the correct message, given the
reason why signup is not available
- also removes the usage of `allowSelfSignup` in Portal, as 1) the
naming is poor and 2) `allowSelfSignup` is computed based on the
existing `membersSignupAccess` and is therefore redundant
no issue
- fixed a couple of glaring typos and generally improved the translation.
---------
Co-authored-by: Cathy Sarisky <42299862+cathysarisky@users.noreply.github.com>
no issue
- this Portal browser test was relying on a 1-1 text match with text
generated in Portal
- this makes changing copy in Portal difficult, as publishing a new
version of Portal with copy changes can break browser tests
ref https://linear.app/ghost/issue/ENG-1235
- problem: today, when a publisher removes the "free" tier from the
Portal settings, it doesn't disable free signups entirely. It removes
the free tier from the Portal UI, but free signup is still possible via
other avenues (signup form in themes, embeddable signup form on another
site, direct API call). This creates confusion/frustration for
publishers who thought they disabled free signups, but are still getting
unwanted free signups (spam). There is no way to disable free signups
entirely.
- solution: introduced a new "paid-members only" subscription access
setting, which blocks all free signups at the API level. If chosen, the
free tier is hidden in Portal and all free signup are blocked at the API
level with a readable error message (`This site only accepts paid
members.`)
![CleanShot 2024-12-10 at 09 09
28@2x](https://github.com/user-attachments/assets/c71b38b4-0d23-429c-a743-00772e82c787)
ref https://linear.app/ghost/issue/DES-1041/auto-refresh-post-analytics
At the moment have a Refresh button in Post analytics which requires
users manually clicking to see how data updates on the page. This PR is
about automatically trigger this "click" every [10 seconds] so that the
refresh happens without users having to click.
- We've got a lot of stuff we didn't get to hanging around
- One year seems like long enough, if we didn't get to it, it's unlikely the person who did it even remembers at that point.
- If they do, re-raising a PR is better than trying to keep an old one open
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
- Also changed the i18n test to set the language back at the end of the test, to ensure no conflicts
closes https://linear.app/ghost/issue/PLG-300
- we're not planning on making any more comments improvements behind this flag so it can be removed
- all conditionals using it have been cleaned up previously when feature went GA
refs
[AP-627](https://linear.app/ghost/issue/AP-627/sanitising-note-content)
Adding client side filtering of the notifications in
`admin-x-activitypub` - This is a stop-gap until we have a dedicated
endpoint for returning notifications. Filtering includes:
- Do not show our own likes
- Only show `like` notifications when it is on our own posts
- Only show replies to our own posts
ref https://linear.app/ghost/issue/DES-1021/create-posts-app
Part of establishing React patterns in Ghost is to build a well-defined
and fairly self-encapsulated app through which we can test assumptions
and define best practices. Our guinea pig is Post analytics for this
purpose. This PR creates a new React app (posts) using Shade (the new
design system).
ref
bb9a69edfe
- We promoted i18n to GA several weeks ago now, and it's going fine
- Removing the UI first to reduce confusion
- This is before clearning up all the other references to the flag
no issue
This reverts commit 040b290fbd.
- the commit has broken browser tests, reverting to get back in a green state
- will be re-introduced in a follow-up PR
refs
[AP-629](https://linear.app/ghost/issue/AP-629/notes-say-they-error-but-post-correctly)
Fixed intermittent error when posting a note in `admin-x-activitypub`
The error was intermittent due to it only occurring when a specific set
of steps occurred, and the query cache being periodically cleared.
The error itself was due to incorrectly expecting the `outbox:${handle}`
query to be an array when it was in fact an object.
This PR also resolves and issue where the reply count for new notes
would display `NaN` (because the `replyCount` property was not present
on newly created notes)
ref https://linear.app/ghost/issue/ANAL-120/bounce-rate-data-seems-to-mix-units
closes https://linear.app/ghost/issue/ANAL-119/visit-duration-metric-inaccurate
closes https://linear.app/ghost/issue/ANAL-118/charts-are-empty-with-only-1-data-point
- The original [web analytics starter kit KPI endpoint](ad1efb766e/tinybird/pipes/kpis.pipe (L122)) had this simpler endpoint, but as I've messed around adding features, I've unintentionally overcomplicated it and introduced a tonne of bugs.
- This reverts the KPI endpoint back towards the original structure, and moves all the calculations and where statements up to the data node
- This means that the left join at the end works and pulls in all the dates from the timeseries node correctly, without the need for using `WITH FILL STEP 1` which generated a result for every second when looking at a single days data.
- Moving the where clause handling up to the `data` node, rather than being on the endpoint still works as expected, which confused me when I first started working with tinybird
- This should resolve several bugs we've experienced with the visit duration, with missing data points and empty charts, and perhaps even the bounce rate (but need to look at that more closely)
- This case works significantly differently to the normal KPIs and was
untested, so we didn't spot that we broke it.
- This adds a test, and brings in the fix by @FGonzalezLopez from
41029a4476
- This fixes the charts in so much as they no longer error
- However, the test result is indicating another bug as we're getting a row per second, instead of one row per hour which is what we actually expect to happen
---------
Co-authored-by: Paco Gonzalez <paco@tinybird.co>
ref
https://linear.app/ghost/issue/DES-1047/video-ratio-is-off-on-frontend
- When a video card is rendered on the frontend, the aspect ratio was
not correctly calculated and displayed. This commit fixes the issue by
calculating the aspect ratio based on the video's width and height.
ref https://linear.app/ghost/issue/ENG-1958/rewrite-cleansh-in-js
- This script removes all node_modules, clears the yarn cache, nx cache,
and deletes all build artifacts to provide a "fresh start". It's
particularly useful for switching back and forth between local vs docker
development environments because some of the node_modules (and therefore
the caches) are built specifically for the architecture of whatever
"host" they are built on.
- The script works fine, but it's written in bash which isn't super easy
to extend/modify and most of this repo is in JavaScript, so
this commit just rewrites the bash script in JS for easier
maintainability.