refs https://github.com/TryGhost/DevOps/issues/122
- this allows us to DRY up some of the other configuration we have
dotted around and fixes a niche bug with overlapping builds that we
were seeing before, because Nx should only allow one build at a time
refs PROD-60, PROD-222, PROD-223, PROD-89, PROD-94
- Indicator shows up in the monthly/yearly toggle if there are any paid
tiers with yearly discount, and shows the highest discount in order to
nudge visitors towards checking out yearly plan
- A couple of smaller portal improvements: typos, spacing, alignment
---------
Co-authored-by: Simon Backx <simon@ghost.org>
refs PROD-204, PROD-203
- Moved fallback value information from hints to placeholders for
consistency and cleaner layout
- Changed setting section label
fixes PROD-61
This adds a new default plan setting. It defaults to yearly, which is
the current default selected interval in Portal.
Behind the new portal improvements feature flag, the default plan can be
changed. It will also change automatically if the available intervals
are changed.
This PR also wires up passing the new setting to the Portal preview.
refs PROD-66
---------
Co-authored-by: Sag <guptazy@gmail.com>
Co-authored-by: Jono M <reason.koan@gmail.com>
Co-authored-by: Steve Larson <9larsons@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
Co-authored-by: Aileen Booker <AileenCGN@gmail.com>
refs.
https://linear.app/tryghost/issue/ADM-59/add-support-and-email-address-to-portal-keywords
Searching for "support email address" (or any combination of this) in
Settings resulted in an empty screen. The setting is availble under
Portal which is pretty hidden so it should at least be searchable. This
PR sets up new search keywords for support email address in Settings.
fixes GRO-105
The newsletter value is mapped to an empty value when shown to the
users, this matches the backend behaviour.
When entering an empty value, this is stored internally as 'newsletter'.
The replyToInput component now uses its own state for the input value.
This avoids weird issues when the rendered value changes, e.g. when
entering the text 'support' or 'newsletter' in the field.
no issues
- consistent spacing between modal and preview modal
- no action button jumping between the modals
- cleaner stats section in the edit screen
fixes ADM-43 https://github.com/TryGhost/Product/issues/4213
- The slash '/' search was firing when it wasn't suppose to, eg via the
URL editor inside the minimal koenig editors.
- this fix makes sure that if any input field has focus, that the slash
search function doesn't get fired.
fixes GRO-103
When a custom reply-to address was set using one of the new flags, and
those flags were disabled - the dropdown showed an empty value and
saving was broken because of this value.
This change automatically reverts back to 'newsletter' as a default
value when editing a newsletter with an invalid reply-to value.
refs ADM-37
- backdrop click should be disabled for modals, especially when modals
contain user editable fields
- to make things consistent, all offers related modals are not closeable
by backdrop clicking
fixes ADM-40
- removed layout switch feature, and made the list layout default
- removed the help link, because it will no longer be necessary on the
list screen
- fixed offers count in the table header
Google AMP is on the way out. In Ghost 5.0 we changed the integration's
default state to be `disabled`, and we have planned to remove it
completely in Ghost 6.0 for a while — but we haven't shared this
anywhere.
@gergelyorosz bumped into this today:
https://twitter.com/GergelyOrosz/status/1729778093777100973
This PR is to start communicating our intent to remove AMP in the next
major release of Ghost, by adding inline messaging to the integration
settings in Ghost Admin
no issue
When the from address of a newsletter is empty, and a custom sending
domain is setup the preview would display 'From: Sitename ()' instead of
'From: Sitename (default@address)'.
When a custom sending domain was setup, but a different from address was
saved, we'll also no longer display it in the input fields - as it will
also be ignored IRL.
refs GRO-76, GRO-90
- Reused `renderReplyToEmail` and `renderSenderEmail` from
`NewsletterDetailModal.tsx` like Simon suggested
- Changed Newsletter preview header in Newsletter settings to show
Reply-to address instead of the “To” mock placeholder
- When no custom sending domain is set, switched “Sender email address”
to disabled TextField for better visual rhythm
- Added a link to the help doc for (Pro) users without custom sending
domain set (the doc itself will still need to be updated though, but Sam
and the gang are already aware of this)
- When custom sending domain is set, added a hint about the default
value, which IMO is clearer than using a placeholder
no issues
- SortMenu component used to have only one global default direction
option, however, the sorting options needed individual default sorting
direction. e.g. desc for created data, or asc for name etc
- this adds an optional sorting direction option to sorting options, so
when they're defined, they'd override the global default sorting
direction
refs GRO-80
- added a new meta field "email_verified" to the /verification endpoint
for newsletters. This meta field contains which email has been verified,
"sender_email" or "sender_reply_to"
- updated copy in newsletter settings, based on which email has been
verified
no issues
- active/archived tabs are no longer hidden, they're always visible
regardless of if there's an offer or not
- same for the modal footer, it's always visible
- used a simple NoValueLabel component instead of custom no offers view
refs GRO-73
- fixed validation for reply-to address
- fixed rendering of default values for reply-to and sender-from fields
- added a temporary generic message for the verification confirmation,
so that it's compatible with both reply-to and from address changes. The
message will be improved in a follow-up commit (pending an API change).
fixes GRO-73
We need to avoid duplicating the complex logic for determining the
default email address and the support email address. So these are now
exposed as calculated settings.
refs GRO-59
refs GRO-56
refs GRO-52
- When email is managed without a custom domain, do not allow the Sender
Email address to be changed, but allow Reply-to address to be changed to
any address the publisher can verify
- When email is managed with a custom domain, allow both Sender and
Reply-to addresses to be changed without verification, but not their
domain names
---------
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
fixes GRO-34
fixes GRO-33
This is a revision of a previous commit, that broke the browser tests
because changes in the data generator (requiring bookshelf had side
effects).
This adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So
they surface tiny bugs in our codebase.
You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e
Removed some defensive logic that could be explained by this discovered
issue.
refs https://github.com/TryGhost/Product/issues/4152
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at a28462f</samp>
This pull request adds a new admin-x app called `admin-x-demo`, which
demonstrates how to use the shared packages `admin-x-framework` and
`admin-x-design-system` to create a simple app that renders a button and
a modal. It also improves the development workflow, the vite
integration, the dependency management, and the type checking for the
admin-x apps and packages. It modifies some files in the
`admin-x-framework` and `admin-x-design-system` packages to make the
modals prop optional, to introduce a new type for the props from the
Ember app, to fix the z-index of the modal backdrop, and to use
consistent file extensions and module syntax.
fixes GRO-34
fixes GRO-33
This also adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So they
surface tiny bugs in our codebase.
You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e
Also removed some defensive logic that could be explained by unquoted ids.
refs https://github.com/TryGhost/Product/issues/4159
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at 9e68f4d</samp>
This pull request refactors several components in the `admin-x-settings`
app to use common hooks from the `@tryghost/admin-x-framework` package,
which reduces code duplication and improves consistency. It also updates
the `package.json` file and adds unit tests for the `admin-x-framework`
package, which improves the formatting, testing, and dependency
management. Additionally, it makes some minor changes to the `hooks.ts`,
`FrameworkProvider.tsx`, and `.eslintrc.cjs` files in the
`admin-x-framework` package, which enhance the public API and the
linting configuration.
refs https://github.com/TryGhost/Product/issues/4051
- added a "List-Unsubscribe" header to emails, in compliance with the
RFC 8058 requirements
- Gmail, Apple Mail, Yahoo Mail, and other popular email clients offer
an option to unsubscribe in one-click, based on the "List-Unsubscribe"
header. Some require an HTTPS endpoint, some a mailto address; both
options are provided in the "List-Unsubscribe" header
Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
no issues
- currently there are urls and tabs as a toolbar option for the preview
modal
- as part of adding offers to AdminX, we needed a breadcrumbs option for
navigating between list and create/edit screens
- previewToolbarBreadcrumbs is used for passing an array with the type
BreadcrumbItem
- onBreadcrumbsBack is used for passing a function to be called when the
back button of the breadcrumbs is clicked
no issue
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at c7304ac</samp>
This pull request adds the `created_at` property to the `Offer` type and
displays it in the `EditOfferModal` component. This allows the admin to
see when an offer was created.
fixes GRO-25
Updated @tryghost/nql to 0.12.0 and other packages that depend on it
1. SQLite: when a filter string contains /.
When we use a NQL contain/starts/endsWith filter that contains a slash,
underlyingly the whole filter will get converted to a MongoDB query, in
which we just use a regexp to represent the filter. In here we will
escape the slash: \/ as expected in a regexp. Later when we convert this
MongoDB query back to knex/SQL, we use a SQL LIKE query. Currently we
don't remove the escaping here for a normal slash. MySQL seems to ignore
this (kinda incorrect). SQLite doesn't like it, and this breaks queries
on SQLite that use slashes. The solution here is simple: remove the
backslash escaping when converting the regexp to LIKE, just like we do
with other special regexp characters.
2. We don't escape % and _, which have a special meaning in LIKE queries
Usage of % and _ is now as expected and doesn't have the special SQL
meaning anymore.
refs https://github.com/TryGhost/Product/issues/4138
- we should follow the same pattern as change modal flow for the Offers modals
- with the change theme flow, only one modal is shown at a time to make it feel like navigating inside one container modal
- this removes the container modal from OffersContainerModal and puts back the Modal component to each screens, so there will be no modal on top of another
refs https://github.com/TryGhost/Product/issues/4138
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at b2390e4</samp>
Refactored the offers modal logic and routing in the admin-x-settings
app. Moved the offers modal components from `modals.tsx` to
`SettingsRouter.tsx` and `OffersContainerModal.tsx`. Replaced
`NiceModal` with `useModal` hook and simplified props and imports.
Enabled sub-routes for creating, editing, and viewing offers.
no issue
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a19dd1f</samp>
Refactored the email settings UI for default recipients by reusing and
adapting the Twitter settings UI. Removed an unnecessary prop from the
`ImageUpload` component.
no issue
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at b84f2a0</samp>
This change improves the offer creation modal by filtering the duration
options based on the tier's cadence. This avoids showing irrelevant or
invalid options to the user and simplifies the selection process.
refs https://github.com/TryGhost/DevOps/issues/104
- `info` is very verbose as it prints all files and their sizes
- we often don't care about this, so we can do away with `info` in favor
of `warn`
refs https://github.com/TryGhost/Product/issues/4148
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at e982c03</samp>
This pull request adds a new feature to create and share offers in the
admin-x-settings app. It fixes a bug in the `AddOfferModal` component,
and enhances the `OfferSuccess` component to show and copy the offer
link, and provide social sharing options. It also updates the
`SettingsRouter` component to handle the offer id parameter in the
success route.
refs https://vitejs.dev/config/build-options.html#build-reportcompressedsize
- this should make building a little bit quicker because it doesn't have
to calculate the gzip size (I don't think we're likely to hit this
because we don't have large projects, but it's still nice to clean up
the output)
refs https://github.com/TryGhost/Product/issues/4150
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at bced508</samp>
This pull request improves the offer modal UI and functionality by using
consistent values for discount amount types, adding a portal preview
feature, and fixing some bugs and syntax errors in the code. The changes
affect the files `AddOfferModal.tsx`, `EditOfferModal.tsx`, and
`getOffersPortalPreviewUrl.ts`.
refs https://github.com/TryGhost/Product/issues/4148
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at e683919</samp>
This pull request adds a new modal component for showing a success
message after creating or editing an offer in the growth settings. It
updates the `modals.tsx`, `SettingsRouter.tsx`, and `OfferSuccess.tsx`
files to implement the new component and its route.
refs https://github.com/TryGhost/Product/issues/4147
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at b18d725</samp>
This pull request adds the functionality to create new offers for
members in the admin-x-settings app. It uses custom hooks to handle the
form logic and the API mutation, and updates the type definitions and
the UI components accordingly. It also modifies the `offers.ts` file in
the admin-x-framework to support the new feature.
---------
Co-authored-by: Chris Raible <chris@ghost.org>
Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
refs https://github.com/TryGhost/Product/issues/4123
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a420f0b</samp>
This pull request moves most of the API-related types and functions from
the `admin-x-settings` package to the `admin-x-framework` package, which
is a new library of common utilities and hooks for the admin-x apps. It
also adds some configuration files, such as `.eslintrc.cjs` and
`.gitignore`, to the `admin-x-framework` package. Additionally, it
exports the `FetchKoenigLexical` type from the `admin-x-design-system`
package, which is used by the `HtmlEditor` component.
fixes https://github.com/TryGhost/Product/issues/4108
- Updates filters behind a new alpha feature flag so you can also filter
on members who have email disabled (because the email had a permanent
bounce, they reported spam or the email address is invalid)
- When returning members, we now also use the email_disabled flag to set
email_suppression.suppressed correctly (in case they are out of sync,
which should normally never happen).
refs https://github.com/TryGhost/Product/issues/4128
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 9e300ac</samp>
This pull request enhances the `SortableList` component and its related
hooks in the design system, and applies them to the newsletters and
tiers settings in the admin app. It also exports and imports some types
and constants to improve code reusability and consistency.
---------
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
refs https://github.com/TryGhost/Product/issues/4137
- separated logics to functions to use them on both card and list layouts
- added toggle buttons that switch between layouts
- created a very basic table for the list layout as a starting point
refs
https://www.notion.so/ghost/e0fd19a18fc449a68eddc0d692a20314?v=13f7ea775a5549d1b767bfdbe5dfa002&p=920d06c82eb94dba9b7eaabfa02c4e26&pm=s
- started adding input functionality
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at c2c9474</samp>
Improved the functionality and design of the offer modal in the
membership settings. Added dynamic data and state management for the
modal inputs and preview URL. Extracted reusable components, hooks, and
utility functions from the `Sidebar` and `AddOfferModal` components.
no issues
- the current combination of size and maxHeight attributes cover most of
the use cases, but not all of them
- this PR makes the size attribute have only named sizes (e.g. 'sm',
'md', 'full' etc.)
- removes the maxHeight attirbute and adds new width and height
attributes
- width and height attributes can be any number (acts as max width and
height in this situtaion) or 'full'
- if size and width/height are both set, width/height should be priority
refs https://github.com/TryGhost/Product/issues/4105
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 2edba98</samp>
This pull request introduces a new monorepo package called
`admin-x-design`, which contains components, design guidelines and
documentation for building apps in Ghost Admin. It also moves some
existing components and files from the deprecated `admin-x-settings`
package to the new `admin-x-design` package, and updates some styles and
rules to use TailwindCSS. The purpose of these changes is to improve the
consistency, maintainability and usability of the Ghost Admin UI.
refs
https://www.notion.so/ghost/Integrate-Portal-Offers-preview-920d06c82eb94dba9b7eaabfa02c4e26
- First phase of implementing the offers portal preview, we refactor the
existing portal renderer so we can keep things more dry and easier to
integrate.
- We add a `getOfferPortalPreviewUrl` to generate the URL.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5b45526</samp>
This pull request adds and refactors some components and utility
functions to improve the portal preview feature for membership offers.
It introduces a `PortalFrame` component to show a live preview of an
offer in the `AddOfferModal` component, and a `getOfferPortalPreviewUrl`
function to generate the preview URL. It also extracts the existing
`getPortalPreviewUrl` function from the `PortalFrame` component to a
separate file, and simplifies the props and logic of the `PortalPreview`
and `PortalFrame` components.
no issue
- added a function to generate links that takes you to a pre-filtered
list of members by redeemed offers.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at af3622c</samp>
Add dynamic links for filtering members by offer redemptions in the
`OffersModal` component. Use a placeholder function for generating the
URLs until the real offer IDs are available.
fixes https://github.com/TryGhost/Product/issues/4102
E.g. you recommend myghostsite.com, while that site redirects all
traffic to [www.myghostsite.com](#):
The redirect causes CORS issues, which means we cannot detect
one-click-subscribe support.
- This is fixed by moving the whole detection to the backend, which has
the additional benefit that we can update it in the background without
the frontend, and update it on every recommendation change.
- This change also fixes existing recommendations by doing a check on
boot (we can move this to a background job in the future).
refs https://github.com/TryGhost/Product/issues/4047
- Wired up Offers Modal hide / show toggling
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 42f000b</samp>
This pull request enhances the offers feature in the admin settings by
adding cancel buttons and navigation options to the modal components. It
also refactors the `OffersModal` component to use the `AddOfferModal`
component for creating new offers.
refs. https://github.com/TryGhost/Product/issues/4060
- the title of setting groups were not included in the searchable
keywords so it wasn't possible to list only a single group's settings
no issue
- Refactored the Pintura integration to be easier to implement and also
more accurately display whether it's enabled or not.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8480176</samp>
This pull request refactors the code related to the Pintura image editor
integration in the admin settings. It introduces a custom hook that
handles the logic of checking and updating the integration status and
settings, and simplifies the UI components that use the hook. It also
removes unnecessary variables and props from the components and the
hook. The affected files are `Integrations.tsx`, `UserDetailModal.tsx`,
`BrandSettings.tsx`, `usePinturaEditor.ts`, `Facebook.tsx`, and
`Twitter.tsx`.
closes https://github.com/TryGhost/Product/issues/4084
---
### <samp>🤖 Generated by Copilot at 9380e1f</samp>
This pull request adds a new UI for creating and managing offers for
members in the admin settings, which is controlled by an alpha feature
flag. It introduces new modal components for the offers UI, a new
sidebar item, new routes, and a new setting group. It also updates the
`labs.js` file to include the `adminXOffers` flag.
refs
https://www.notion.so/ghost/When-hitting-ESC-within-the-Pintura-editor-editing-cover-image-from-Design-Branding-it-would-e-b1c70064f2fd4f5cb830b095c2abd08e
- When escape was hit in within the Pintura editor in Settings, it
cleared the modal underneath it, causing the close button to become
unresponsive.
- A previous commit was made to disable the escape key altogether so
that users don't accidentally quit Pintura and having all their changes
discarded.
- This fixes a regression to make sure the background modal don't hide
and Pintura can only be closed by mouse clicking the actual close button
on the top left, if not saving it on the top right.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5ed7f7e</samp>
This pull request enhances the Pintura editor integration by adding
error reporting and escape key handling. It modifies the
`usePinturaEditor` hook in
`apps/admin-x-settings/src/hooks/usePinturaEditor.ts`.
refs https://github.com/TryGhost/Product/issues/4060
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 55149bc</samp>
Refactored various settings forms and modals in the admin app to use the
updated `useForm` hook, which simplifies the form state management,
validation, and saving logic. Improved the UI and UX of the modal ok
buttons by using the `okProps` object and the `saveState` from the hook.
Added options to save the forms without changes and to fake the saving
when unchanged. Fixed some bugs and removed unused code.
refs https://github.com/TryGhost/Product/issues/4073 &
https://github.com/TryGhost/Product/issues/4074
---
### <samp>🤖 Generated by Copilot at eb30d37</samp>
This pull request updates some dependencies and adds fallback values for
email customization settings in the `admin-x-settings` app. This
improves the color contrast and timezone detection of the email
newsletters and prevents rendering issues.
refs https://github.com/TryGhost/Product/issues/3831
The wrong logic was used to fetch the next page, making the remaining
users show twice after deleting. Also fixed the route not updating after
deletion.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 82a41fc</samp>
Refactor and improve `UserDetailModal` component with React Query,
TypeScript, and UX enhancements. Fix data bug and add navigation
feature.
refs. https://github.com/TryGhost/Product/issues/4060
The new settings screen is too dense, lacks hierarchy and hard to scan. This update addresses some of the problems of the initial version:
- clear hierarchy in typography and larger spaces between sections to make the overall structure is easier to scan
- using icons in the sidebar to strengthen the groups + help visual thinkers to remember settings better + just to be a bit less serious
- updated colors for better contrast + orientation (bg on the sidebar)
- updated input fields to help focus on filling forms
- other small improvements for more consistency and simplicity
---------
Co-authored-by: Jono Mingard <reason.koan@gmail.com>
refs https://github.com/TryGhost/Product/issues/4053
This adds the feature flag. If enabled, the list-unsubscribe header
should be set. The value currently is only for testing purposes and
probably won't work yet.
refs https://github.com/TryGhost/Ghost/issues/18718
---
### <samp>🤖 Generated by Copilot at 6fc7040</samp>
Refactored the `id` prop of the `ImageUpload` component in
`ThemeSettings.tsx` to avoid duplication and follow naming convention.
This is part of improving the theme settings UI and functionality.
no issue
- flag is no longer used in Admin so we can clean it up in Core too
- updated Post model to set blank document to `lexical` field rather than `mobiledoc` as a default value
- switched over to returning `mobiledoc,lexical` as default formats in Admin API
no issue
- the stripe value is saved under the `stripe_connect_display_name`
column, yet Admin X was querying `stripe_connect_account_name` causing
it to be undefined.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at f0e6cb6</samp>
Renamed `stripe_connect_account_name` setting to
`stripe_connect_display_name` in the admin-x-settings app. This improves
clarity and consistency for the Stripe integration in the membership
settings.
no issue
- Updated the readme document for AdminX, Settings.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 728a9a3</samp>
Improved the documentation of the `admin-x-settings` project by updating
the `README.md` file. Removed obsolete information and added new testing
options.
refs https://github.com/TryGhost/Product/issues/4044
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at ea09dec</samp>
This pull request improves the validation of suggested amounts for tips
or donations in the membership settings. It adds a constant `MAX_AMOUNT`
based on Stripe's limit and refactors the `validateCurrencyAmount`
function to make it more reusable.
no issue
- this adds a bit more logic to ensure the portal plans remain consistent with the tier's visibility in the portal preview.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 74fd5c4</samp>
Refactored the `Free` tier checkbox in the portal signup options
component to use the `portalPlans` array. This improves the consistency
and reliability of the portal plans settings.
refs https://ghost.slack.com/archives/CTH5NDJMS/p1697741715839159
- the visibility property of the tier wasn't toggled when updating the
settings in the Portal settings.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at af531a8</samp>
This pull request adds support for free tier visibility in the
membership portal settings, and refactors the components and tests to
use the new `allTiers` API data. It updates the `PortalModal` and
`SignupOptions` components, and the `portal.test.ts` and `acceptance.ts`
files.
refs https://github.com/TryGhost/Product/issues/4044
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at ea09dec</samp>
This pull request improves the validation of suggested amounts for tips
or donations in the membership settings. It adds a constant `MAX_AMOUNT`
based on Stripe's limit and refactors the `validateCurrencyAmount`
function to make it more reusable.
no issue
- this adds a bit more logic to ensure the portal plans remain consistent with the tier's visibility in the portal preview.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 74fd5c4</samp>
Refactored the `Free` tier checkbox in the portal signup options
component to use the `portalPlans` array. This improves the consistency
and reliability of the portal plans settings.
no issue
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 87456d8</samp>
Enable tier card text verification in `tiers.test.ts`. This change is
part of adding tiers support in the admin settings.
no issue
- The stripe connect modal had "dummy" hardcoded. This adds the
`stripeConnectAccountName` variable to the text output.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
refs https://ghost.slack.com/archives/CTH5NDJMS/p1697741715839159
- the visibility property of the tier wasn't toggled when updating the
settings in the Portal settings.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at af531a8</samp>
This pull request adds support for free tier visibility in the
membership portal settings, and refactors the components and tests to
use the new `allTiers` API data. It updates the `PortalModal` and
`SignupOptions` components, and the `portal.test.ts` and `acceptance.ts`
files.
refs https://github.com/TryGhost/Product/issues/3831
---
### <samp>🤖 Generated by Copilot at ea48006</samp>
Refactored the `CodeEditor` component to use Tailwind CSS and added a
`className` prop for custom styling. Applied the `className` prop to the
`CodeEditor` instances in the `CodeInjection` component to improve the
layout.
refs https://github.com/TryGhost/Product/issues/3831
---
### <samp>🤖 Generated by Copilot at f85ceff</samp>
This pull request adds drag and drop functionality and custom styling
options to the `FileUpload` and `ImageUpload` components, and uses them
to improve the user experience of uploading themes and user images in
the admin settings. It also fixes a minor issue with the background
color contrast in the `IntegrationHeader` component in dark mode, and
updates the corresponding tests.
fixesTryGhost/Product#4038
- When selecting a theme from the gallery view of official themes, the logic needs to be different for default/legacy themes (source & casper) vs other official themes. For default/legacy themes, they will already be installed so we just need to activate them, not install them.
- Previously this logic was applied only to the default theme (currently source) but was not applied to Casper, which led to errors when trying to install Casper, since it is protected from being overwritten
- This change treats default/legacy themes the same by skipping the install process and going straight to activating for casper and source
closes https://github.com/TryGhost/Product/issues/3955
- also, moved recommendations code to the "membership" folder for
consistency with the UI
- also, renamed "yarn test:slowmo" to "yarn test:acceptance:slowmo" for
consistency in the naming
- also, removed "limit: 1" when checking whether a recommendation URL
already exists. The limit defaults to 5 on the API side, and allowing
more than 1 result will lead to a more thorough check
refs
https://www.notion.so/ghost/Cannot-fetch-invites-error-shown-for-authors-edc00af822d844e7add114fd834fc8fc
- the problem is that certain users don't have permissions to make
certain API calls.
- This adds a new hook that validates the current user against
permissions before a query can be made.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 9d9cc07</samp>
Added a `usePermission` hook and a `permissions` option for custom API
queries to implement role-based permissions in the admin settings app.
refs https://github.com/TryGhost/Product/issues/3832
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8ad5f58</samp>
This pull request enhances the portal modal component in the admin
settings for membership. It improves how it handles errors, saves
changes, and communicates with the user.
refs https://github.com/TryGhost/Product/issues/3832
Hopefully the scrolling finally works consistently
- Fixed a bug where clicking the navigated section wouldn't scroll to it
- Fixed a bug where the first click after opening settings wouldn't
animate the scroll
- Fixed a bug where the sidebar would always animate scroll even on the
initial page load
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 0996b8b</samp>
This pull request improves the scrolling and navigation functionality of
the settings page by using a custom hook and a context provider. It
refactors the `RoutingProvider` and the `useScrollSection` hook to
handle the route and sidebar changes more efficiently, and simplifies
the code by removing unnecessary components and state. It also adds new
functions to the scroll section context data to update and scroll to the
desired section.
no issue
- the default theme (currently Source) showed Activate despite being
active already, which may lead to confusion.
- This fix checks whether it's already to more accurately display the
wording of the button
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 4fd443c</samp>
Fix theme preview button label for default theme. Hide the activate
button for the default theme if it is already active in
`ThemePreview.tsx`.
refs https://github.com/TryGhost/Product/issues/3832
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8ad5f58</samp>
This pull request enhances the portal modal component in the admin
settings for membership. It improves how it handles errors, saves
changes, and communicates with the user.
### Why this PR?
This PR adds back the current theme version in Design Settings screen
![image](https://github.com/TryGhost/Ghost/assets/8493007/88f475f6-9bba-4dda-8db7-0bddd2fee8a3)
- [x] There's a clear use-case for this code change, explained above
- [x] Commit message has a short title & references relevant issues
- [x] The build will pass (run `yarn test:all` and `yarn lint`)
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 2796daf</samp>
This pull request improves the code quality and user interface of the
design modal component for site settings. It applies code formatting
rules and shows the active theme version on the save button.
refs https://github.com/TryGhost/Product/issues/4018
---
### <samp>🤖 Generated by Copilot at 5c51ade</samp>
Fix modal scrolling bug in Safari by blurring active element and
delaying close. Affect `Modal.tsx` component.
no issue
- Fixed a bug where the Unsplash button in site design didn't hide if
the integration was disabled.
- Cleaned up Unsplash in preparation for moving it to it's own package
in future.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 4da5d12</samp>
Refactored and improved the Unsplash integration feature in the admin
settings app. Moved all files related to Unsplash to a separate
`unsplash` folder and renamed some classes and interfaces to avoid
confusion. Added a feature flag for Unsplash in the brand settings
component and a prop to customize the portal container for the Unsplash
search modal. Created a new class `PhotoUseCases` to handle the logic
for fetching, searching, and downloading photos from Unsplash.
no issue
- the link to the release has `-moya` added to it, which breaks the link
to the github release. This ensures it gets removed should it be there
to avoid broken links.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at f13886c</samp>
Refactored the `About.tsx` component to extract some utility functions
to separate modules. Added unit tests for the extracted functions in the
`test/unit/utils` folder. The refactoring improves code organization and
reusability, and the tests increase the code coverage and reliability.