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.
ref
https://linear.app/ghost/issue/ENG-1956/redis-creates-new-anonymous-volume-each-time-it-boots
- Before this commit, the redis service in our docker compose setup
would create a new anonymous volume each time it boots, with a
non-descriptive, hash-based name. Over time these volumes accumulate and
become a pain to clean up, and it's not immediately obvious what they
are used for.
- This commit adds a persistent data volume for redis data, so it will
reuse the same volume, with a more descriptive title each time it boots.
This eliminates the annoying anonymous volumes, and also gives us data
persistence across boots for the redis service (which can be easily
cleared by deleting the volume).
ref
https://linear.app/ghost/issue/ENG-1785/consolidate-dev-container-composeyml-with-the-root-level-composeyml
- We currently have two compose.yml files:
- `.devcontainer/compose.yml`: used for the Dev Container
- `compose.yml`: used for local development with docker compose
- The Dev Container compose file does need some additional
configuration, but most of this code is duplicated from the root level
compose.yml file
- This commit removes this duplication by using both compose files in
the Dev Container setup, so it will base the compose configuration on
the root level, and then extend it with the Dev Container specific
configuration
- This way any updates to the root level compose file will also be
available and reflected in the Dev Container setup without having to
make the change twice.
closes https://linear.app/ghost/issue/DES-548/update-portal-notification-style
Portal popup notification styles look outdated and harsh. Also in-popup notifications have several visual design issues such as positioning, alignment, typography and so on. This PR fixes these issues by applying a much more standard design to Portal notifications.
ref ENG-745
- added permission related errors to list of error types to be handled
- previously, generic error messages were displayed when permission
errors are thrown
- this would make it possible to display the actual message returned
from the API in toasts
ref DES-898
- previously, the name field in Portal account settings used to be required which caused an issue users were not able to update their email address without adding name first
- now the name field is optional makes it possible to update the email address without adding name, or remove their name as well
- it was intended not to wire this up to "Display name in signup form" setting in Portal for the simplicity
ref DES-547
- when Portal popup is opened and the browser scroll bar is visible, it
used to make layout shift, because we were hiding the scrollbar
- now it applies right margin to body element and the trigger button by
calculating the scrollbar width only when the browser scroll bar is
visible
- it also preservers the current right margin for those elements and
makes the calculation based on that
ref DES-933
- when three dot buttons are clicked in the theme management modal, the
menu alignment was wrong
- this fixes the issue by aligning the button and the menu by the right
edge
Previously, if you had posts with very long titles, the layout of the
post list would break, causing the analytics button and the metrics to
shift from row to row.
These changes address that, and make the list render cohesively
regardless of the length of a post's title, across resolutions.
fixes
https://linear.app/ghost/issue/DES-610/post-list-breaks-with-really-long-titles
ref ONC-225
- Ensures newsletter preferences are hidden in the Portal when email functionality is disabled.
- Adds conditional logic in NewsletterManagement.js to check for the hasNewslettersEnabled prop.
- Updates tests in AccountEmailPage.test.js and AccountHomePage.test.js to cover scenarios where newsletters are disabled.
- Improves user experience by preventing the display of irrelevant settings when email is turned off.
ref https://linear.app/ghost/issue/AP-633/reader-view-customization-options, https://linear.app/ghost/issue/AP-631/estimated-reading-time-in-reader-view
- Improved typography, spacing and alignment.
- Improved selection of font sizes from the reader view customization popover.
- Added a button to reset reader view customization settings to default, in case user ends up in a state they’re not happy with and want to go back to a sensible default.
- Added preview to typeface selection component so it’s easier to see what you’re selecting.
- Disabled background clicks on all AP modals for a more consistent experience and to avoid accidental clicks.
- Changed the reading progress indicator increments from 1 to 5 to attract less attention while the user is reading.
no issue
- contains two edge-case bug fixes, one related to pagination when deleting a comment and another that works around issues arising from potentially unstable API sorting
closes https://linear.app/ghost/issue/PLG-305
- adds deduplication of comments when fetching top-level pages
- avoids problems where the underlying sort is unstable (e.g. "best" as likes are changing) resulting in an already loaded comment appearing on a later-loaded page
- doesn't solve for missing comments between pages but does prevent invalid local state that can lead to buggy UI
closes https://linear.app/ghost/issue/PLG-304
- added a refresh of the comments list when a top-level comment with no replies is deleted so the pagination resets and replies aren't missed when loading more due to a shift in the underlying paginated data
no issue
- contains two minor bug fixes for edit name/expertise buttons on the main form and incorrect replies-left-to-load counts after deleting replies
closes https://linear.app/ghost/issue/PLG-303
- when deleting a reply our "replies left" calculation was getting out of sync because the `count.replies` state on the parent comment wasn't being updated, the result was for each comment deleted we were displaying 1 more reply that was still to load
- updated the `deleteComment` action to also modify the parent comment's `count.replies` value when a reply was deleted ensuring our "replies left" calculation remains correct
closes https://linear.app/ghost/issue/PLG-302
- switching from `onClick` to `onMouseDown` allows the button events to fire and be picked up by the popup-opening handler before the click causes a blur event on the main form to fire which removes the expertise buttons
- we have a test for adding expertise via the main form which was giving us a false positive due to the way Playwright handles events, unfortunately I couldn't find a way to adjust that to match the real-world behaviour without ending up with a test that always fails
ref https://linear.app/ghost/issue/DES-1033/icon-implementation
The Storybook structure contained Lucide icons under "Components", but
it's an experimental component. This commit creates an Experimental
component group in Shade and updates the corresponding docs.
closes https://linear.app/ghost/issue/DES-1033/icon-implementation
In Shade right now there's no support for icons, which is a fundamental
building block in any design system. We use Streamline Icons which
unfortunately don't have an out-of-the-box React support like e.g.
Lucide Icons. This PR adds support for custom icons to be used directly
from Shade by importing SVG's from a directory and creating React
components dynamically. It also adds a grid view of all available icons
in Storybook so it's easy to get an overview of available icons and copy
their React component.
Fixes https://linear.app/ghost/issue/ENG-1855/fix-reset-password-flow-in-case-of-2fa
- User is getting stuck on reset password page and they receive a verify token on the mail and nothing happens on the UI.
- This is happening because the session is not verified in the case of the reset password flow. The backend is sending a code to verify the session, but we don't have the UI in place where the user can enter the code.
- Previously, the user would be redirected to the dashboard once they clicked on "Save new password."
- Now when 2FA is on, we should directly redirect to the dashboard as the reset password link was sent to the email address anyway. This is why we are creating an already verified session in this case.
ref DES-1012
- previously, when a member was deleted, they were displayed with an
avatar initial `NM`, the name was empty, and their list item wasn't
clickable, which led to user confusion
- now it's much clearer with a placeholder avatar and `Deleted member`
as name
ref
https://linear.app/ghost/issue/DES-1020/create-new-react-app-for-shade
Shade is our new design system that follows React best practices and
leverages third-party libraries extensively. It's built on ShadCN/UI
which is one of the most popular React UI libraries today. This commit
adds an (almost) empty React app, set up to be the a starting point of
Shade.
ref
https://linear.app/ghost/issue/CON-3/external-media-inliner-should-inline-more-file-types
The external media inliner requests each file as a buffer. Saving this
works well for images, but not media or files as the `saveRaw` method is
not available on those storage adapters.
This PR moves the `saveRaw` method from `LocalImagesStorage` to
the `LocalStorageBase` class so it is available to subclasses.