no issue
- The publish and email post browser test was flaking often due to a
race condition — if the Publish button is clicked before the post has
saved, the slug isn't updated yet. When we then visit the published post
with the expected slug, we get a 404.
- This change will wait for the post to finish saving before publishing
the post, rather than arbitrarily waiting 100ms and hoping it's fully
saved by then.
no issue
- The browser tests for scheduling posts were flaking/failing because
the time was set to `00:00`, which is invalid and should reset the time
to "a few seconds from now", but the test was sometimes able to
"Continue" before the validation logic could run on blur. This left the
actual scheduled time set to `00:00`, which then caused the following
assertions to fail.
- I've tried to replicate this race condition manually to confirm it's
not a bug that a user could actually reach, but I haven't been able to.
I suspect that playwright's `.fill()` and/or `.click()` method behave
slightly differently than expected, which creates this race condition.
no issue
- The `yarn dev` command accepts dash-dash-args to conditionally build &
run other apps, like portal, comments, etc.
- Passing these flags to the docker compose setup directly doesn't work,
so the only way to run these apps in docker was to either change the
command in the Dockerfile or override the command in the `compose.yml`
file
- This commit extends `yarn dev` to also check for the
`GHOST_DEV_APP_FLAGS` environment variable for these flags, which can be
forwarded into the container and make it easier to run these apps using
docker compose.
no issue
- Ghost would sometimes crash because it was booting before the database
service was ready (even if the container had already started). This
commit tells `docker compose` to only start the ghost service once the
`mysql` and `redis` services have passed their health checks
ref https://linear.app/ghost/issue/AP-695/show-a-notification-when-someone-reposts-your-content
- When someone reposts your post or note, you’ll now receive a notification. If multiple accounts repost the same piece of content, those notifications will be grouped together, but only if they’re fetched as the same page of notifications.
- Converted functions to React components
- Bumped the package
- only some small micro-optimizations found whilst browing CPU profiles
- we can remove lodash from a sanitize plugin method (needs an empty object
fallback because Object.keys is less forgiving than _.keys and there are some
tests which don't fully initialize the model)
- also converts the data-manipulation plugins into for-loops because
there are more native than using lodash, and it means we can remove
lodash from this file too
- lodash is a bit of a perf burn on extreme hotpaths, so it's good to
clean it up where it's not needed, and native JS is often way faster
- adds a bit of JSDoc to help with editor autocomplete
no issue
- offers management has moved to the Admin-X-Settings app but the old Admin code was left hanging around
- removed all of the old offers screens related code and styles
ref https://linear.app/ghost/issue/AP-699
- wired the frontend to the new Create Repost API endpoint (POST
/actions/repost/:id)
- the UX/UI is yet to be worked on by Djordje
- the frontend activity-pub app is currently missing acceptance tests
altogether. A follow-up commit will set up and add a basic acceptance
test to the FE app, so that we can add tests as we ship new changes
no issue
- With the `package.json` commands specifying the `COMPOSE_PROFILES`
environment variable, this `env_file` block is no longer needed.
- Worse yet, it throws an error if the `.env` file it points to does not
exist, which is really annoying.
ref https://app.incident.io/ghost/incidents/137
- some sites make use of the Content API to fetch all posts in a single
request with high traffic volumes which results in a lot of data
processing to check for gated content that may cause higher CPU usage
and slowdown
- under an abundance of caution we're moving the related code behind a
labs flag whilst further performance testing is performed
- it should be noted that whilst this flag-conditional is in place, any
content that has already used gated blocks as part of alpha testing will
become visible if the flag is subsequently disabled
ref https://app.incident.io/ghost/incidents/137
- some sites make use of the Content API to fetch all posts in a single
request with high traffic volumes which results in a lot of data
processing to check for gated content that may cause higher CPU usage
and slowdown
- under an abundance of caution we're moving the related code behind a
labs flag whilst further performance testing is performed
- it should be noted that whilst this flag-conditional is in place, any
content that has already used gated blocks as part of alpha testing will
become visible if the flag is subsequently disabled
ref https://linear.app/ghost/issue/AP-697/add-ui-for-reposted-inbox-posts
- Updated activity filter to show posts reposted by accounts you're following in your inbox
- Updated UI to indicate when a post shown in the inbox is reposted
- Updated UI for showing reposted notes for better alignment
- Added onClick to the repost indicator so it's easy to see the details of the account that reposted the content
- Bumped the package
ref
https://linear.app/ghost/issue/ENG-1974/create-config-option-to-forcibly-disable-email-track-clicks
- With the ability to override a setting via configuration, we also need
to disable the setting's toggle in the UI to signal to the user that it
cannot be changed.
- This commit sets `disabled: true` on the `Newsletter clicks` toggle if
`is_read_only` is set to `true` on the `email_track_clicks` setting
returned from the API, and establishes a pattern that we can use for
other settings in the future, if desired.
ref
https://linear.app/ghost/issue/ENG-1974/create-config-option-to-forcibly-disable-email-track-clicks
- We want to have the ability to turn off click tracking for sites that
are adversely impacted by massive bursts of traffic from email link
checkers, but we don't currently have a pattern for this.
- This commit introduces a new configuration parameters
`hostSettings:settingsOverrides`, which accepts key/value pairs of
settings keys -> values. The value passed in here will override whatever
value is set for the associated setting key in the database
- It also adds an `is_read_only: true` property to any setting that is
overridden, which is included in the /api/admin/settings endpoint. This
value can be used by the frontend to disable the control to prevent a
user from trying to change the value.
- The value in the database is preserved, as the override is implemented
in the settings cache `get()` and `getAll()` methods.
- This commit only includes the backend changes — another commit will
follow to allow disabling the 'Newsletter clicks' toggle in Admin's
settings.
ref https://linear.app/ghost/issue/ENG-1260
ref https://linear.app/ghost/issue/ENG-1859
- names for uploaded files now include a 16-character alphanumeric hash,
that gets re-generated on every upload. This prevents original files to
be found, e.g. when redacting sensitive content in an image in the
editor
- if the filename length is higher than what most filesystem accept (255
bytes), we truncate the base of the filename, while keeping space for
the unique hash and the file extension. Example to illustrate
(non-accurate):
- input: long-name-for-an-image-imagine-255bytes-here-blablablablabla-and-a-bit-more.png
- output: long-name-for-an-image-1a2b3c4d5e6f7g890.png
ref https://linear.app/ghost/issue/PLG-327
- updated post output serializer's gating functions to add gating of specific content blocks
- uses regex to look for specific strings in the HTML for speed compared to fully parsing the HTML
- content gating blocks look like `<!--kg-gated-block:begin nonMember:true/false memberSegment:"status:free,status:-free"-->...gated content...<!--kg-gated-block:end-->`
- parsing of params is limited to `nonMember` with a true/false value and `memberSegment` with a string value containing a limited set of supported filters
- occurs at the API level so that content is correctly gated in Content API output and front-end website
- added `checkGatedBlockAccess()` to members-service content-gating methods to keep the underlying member checks co-located
ref https://linear.app/ghost/issue/AP-590/unable-to-unfollow-accounts
- Users can now unfollow accounts they’re following, which means that account will be removed from the user’s “following” list and any of the future posts or notes published by that account won’t appear in user’s inbox or feed.
- Refactored and simplified `FollowButton` so it only has 2 variants: primary (used on profiles, where it's the primary focus of the screen) and secondary (used in lists where there will probably be lots of `FollowButton`s next to each other.)
---------
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
ref DES-182
- adds `accept` parameter to the file uploads making it possible to
define a set of accepted file types
- allows only zip and json files for the universal importer