2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

1401 commits

Author SHA1 Message Date
renovate[bot]
07d8152da8 Update dependency @types/validator to v13.11.7 2023-11-21 07:31:00 +01:00
Sodbileg Gansukh
f3aadab613
Added a type for the sorting direction of SortMenu component (#19062)
refs https://github.com/TryGhost/Product/issues/4162
2023-11-21 03:52:12 +00:00
Sodbileg Gansukh
ccd1e355e1 Added static design of sorting to offers in AdminX
refs https://github.com/TryGhost/Product/issues/4162
2023-11-21 11:39:36 +08:00
Sodbileg Gansukh
6316680127 Hide SVG icon titles globally
no issues

- when svg icons include title tag, the titles are displayed on hover
- this adds a global tailwind class pointer-events-none to the Icon component to hide the titles globally
2023-11-21 09:52:34 +08:00
Sodbileg Gansukh
63f0265e28
Added SortMenu component to the design system (#19045)
refs https://github.com/TryGhost/Product/issues/4162

- this component is based on the existing PopOver component, and
customized for sorting function
2023-11-21 09:48:41 +08:00
Steve Larson
a398067159
Added TK reminders labs feature (#19057)
refs TryGhost/Product#4156
2023-11-20 23:30:16 +00:00
renovate[bot]
17dec5a749 Update dependency typescript to v5.3.2 2023-11-20 20:11:26 +01:00
renovate[bot]
7a3ae4ab75 Update sentry-javascript monorepo to v7.81.0 2023-11-20 16:57:32 +01:00
Simon Backx
d5492bd63c
Revert "Removed usage of unquoted ids in filter strings" (#19052)
Reverts TryGhost/Ghost#19031

Browser tests are failing with an unknown cause
2023-11-20 13:50:07 +00:00
Jono M
a93c665d20
Created a skeleton AdminX demo app (#19005)
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.
2023-11-20 13:30:15 +00:00
Simon Backx
320eaac4c4
Removed usage of unquoted ids in filter strings (#19031)
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.
2023-11-20 14:00:31 +01:00
renovate[bot]
ff863e175a Update storybook monorepo to v7.5.3 2023-11-20 12:59:31 +01:00
Djordje Vlaisavljevic
72f273ae47 Fixed issues with wrong button color in dark mode
refs https://github.com/TryGhost/Product/issues/4166
2023-11-20 11:12:50 +00:00
Jono M
5e057dee11
Added tests to AdminX framework package (#19022)
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.
2023-11-20 11:00:51 +00:00
renovate[bot]
2b90d4b9dc Update dependency @dnd-kit/core to v6.1.0 2023-11-20 10:42:55 +00:00
renovate[bot]
fa51b1b3dd Update dependency @vitejs/plugin-react to v4.2.0 2023-11-20 09:42:07 +01:00
Sag
69ee4a5ff5
Added option to unsubscribe in one-click from emails (#19032)
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>
2023-11-16 14:50:24 -03:00
Sodbileg Gansukh
63b2b439a7 Show the archived offers tab only when there's some 2023-11-16 19:37:22 +08:00
Sodbileg Gansukh
8377bd8410
Added Breadcrumbs toolbar option to PreviewModal in AdminX (#19016)
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
2023-11-16 19:26:25 +08:00
Ronald Langeveld
17f8844134
Wired up date-created to Offer Analytics (#19018)
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.
2023-11-16 18:05:24 +07:00
Simon Backx
e5f644c27f
🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015)
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.
2023-11-16 09:35:20 +00:00
Sodbileg Gansukh
6de3e85bd0 Fixed duplicate modals issue in offers AdminX
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
2023-11-16 17:26:31 +08:00
Ronald Langeveld
9016d76d42
Unified Offers modals to a single modal (#19011)
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.
2023-11-16 06:56:06 +00:00
Sodbileg Gansukh
c88f4f24d3 Added static design of stats to offers edit screen in AdminX
refs https://github.com/TryGhost/Product/issues/4153
2023-11-16 11:04:06 +08:00
Sodbileg Gansukh
3d945e539b
UI improvements for Offers in AdminX (#19008) 2023-11-16 10:09:09 +08:00
Simon Backx
75bb53f065
🔒 Added support for logging out members on all devices (#18935)
fixes https://github.com/TryGhost/Product/issues/3738
https://www.notion.so/ghost/Member-Session-Invalidation-13254316f2244c34bcbc65c101eb5cc4

- Adds the transient_id column to the members table. This defaults to
email, to keep it backwards compatible (not logging out all existing
sessions)
- Instead of using the email in the cookies, we now use the transient_id
- Updating the transient_id means invalidating all sessions of a member
- Adds an endpoint to the admin api to log out a member from all devices
- Added the `all` body property to the DELETE session endpoint in the
members API. Setting it to true will sign a member out from all devices.
- Adds a UI button in Admin to sign a member out from all devices
- Portal 'sign out of all devices' will not be added for now

Related changes (added because these areas were affected by the code
changes):
- Adds a serializer to member events / activity feed endpoints - all
member fields were returned here, so the transient_id would also be
returned - which is not needed and bloats the API response size
(`transient_id` is not a secret because the cookies are signed)
- Removed `loadMemberSession` from public settings browse (not used
anymore + bad pattern)

Performance tests on site with 50.000 members (on Macbook M1 Pro):
- Migrate: 6s (adding column 4s, setting to email is 1s, dropping
nullable: 1s)
- Rollback: 2s
2023-11-15 17:10:28 +01:00
Jono M
99765206c1
Fixed small UI bugs from the AdminX design system migration (#18991)
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.
2023-11-15 11:57:55 +00:00
renovate[bot]
4651ef3d9b Update sentry-javascript monorepo to v7.80.1 2023-11-15 12:31:56 +01:00
Rene AHONBO
c404784573
Added missing semicolons (#18670)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-11-15 12:19:50 +01:00
Ronald Langeveld
44b4b169a9
Fixed duration options for yearly cadence (#18989)
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.
2023-11-15 16:36:55 +07:00
renovate[bot]
4aa8faa70d Update dependency @tailwindcss/forms to v0.5.7 2023-11-15 10:28:04 +01:00
Daniel Lockyer
ee804fc7af Hidden "info" Vite output unless in CI
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`
2023-11-15 10:11:22 +01:00
Ronald Langeveld
ec5b766aaa
Wired up success modal to Admin X (#18987)
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.
2023-11-15 08:29:01 +00:00
renovate[bot]
ab4a21db49 Update babel monorepo to v7.23.3 2023-11-15 09:23:45 +01:00
Daniel Lockyer
53157f3c40 Disabled reporting compressed gzip size
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)
2023-11-15 09:11:12 +01:00
Ronald Langeveld
fb3eb3ac5c
Added Portal Preview to Edit Page - Offers X (#18985)
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`.
2023-11-15 14:52:32 +07:00
Sodbileg Gansukh
a083ce35b9 Added static design to success screen to offers in AdminX
refs https://github.com/TryGhost/Product/issues/4149
2023-11-15 14:58:19 +08:00
Sodbileg Gansukh
0a3db4cab6
Design details for the offers list layout in AdminX (#18983)
refs https://github.com/TryGhost/Product/issues/4137
2023-11-15 05:31:25 +00:00
Ronald Langeveld
49e96e1c18
Added basic offers modal for design (#18982)
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.
2023-11-15 05:19:48 +00:00
Ronald Langeveld
452e702530
Wired up DB to new Offers Modal (#18980)
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>
2023-11-15 04:52:58 +00:00
Sodbileg Gansukh
3bec13774b Separated Membership and Growth settings
refs https://github.com/TryGhost/Product/issues/4126
2023-11-15 11:39:26 +08:00
Princi Vershwal
33c2f0169f
Added logic to activate/archive offers 2023-11-14 19:05:10 +00:00
renovate[bot]
e437d5e420 Update dependency vite-plugin-commonjs to v0.10.1 2023-11-14 15:04:56 +01:00
Jono M
94a181ce2a
Separated common AdminX logic into a reusable package (#18919)
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.
2023-11-14 13:50:08 +00:00
Simon Backx
370c6b465b
Filter members by email disabled (#18884)
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).
2023-11-14 14:37:01 +01:00
Jono M
7e5cad8e11
Added sorting to newsletters list (#18963)
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>
2023-11-14 09:09:31 +00:00
Sodbileg Gansukh
5eb4e3330c Added basic layout switch to the offers list in AdminX
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
2023-11-14 12:18:08 +08:00
Simon Backx
14927ee24b
Added quotes to NQL filters with ids (#18958)
refs https://github.com/TryGhost/Product/issues/4120

Updated some places where we don't add quotes around ids in NQL filters,
which can be an issue when the id is a number
2023-11-13 12:00:20 +01:00
Ronald Langeveld
660f5fef6f
Wired up Add Offers modal portal rendering in settings (#18923)
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.
2023-11-13 10:35:07 +00:00
Princi Vershwal
c26b5256cf
Added tests for edit offer
Ref:
https://www.notion.so/ghost/Implement-edit-modal-7c4f1930d40243e887b37f2cb4701a1f
2023-11-09 23:58:49 +05:30
Michael Barrett
bcfb8e1291
Misc Sentry tweaks (#18900)
no refs

- Removed redundant duplicated `save_revision` tag when capturing slow
saves
- Standardised Sentry tags casing (`snake_case`)
- Renamed tag `adminX settings component-` to
`adminx_settings_component`
2023-11-09 14:10:53 +00:00
Sodbileg Gansukh
c490fb0940
Added width and height attributes to the Modal component in AdminX (#18926)
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
2023-11-09 12:06:52 +01:00
Princi Vershwal
15d74b2840
Fixed offer Code url 2023-11-09 08:00:56 +00:00
Princi Vershwal
1e8176f596
Wired up Offer update Page 2023-11-09 05:54:29 +00:00
Jono M
67251e6e1d
Renamed admin-x-design to admin-x-design-system for clarity (#18914)
refs https://github.com/TryGhost/Product/issues/4105
2023-11-08 15:10:43 +00:00
Simon Backx
395c109c67 🐛 Fixed UI glitch on unsubscribe page in Portal
refs https://ghost.slack.com/archives/C02G9E68C/p1699391515110759

When the unsubscribe page first showed, member is set to `undefined`. This cause the normal NewsletterManagement page to be visible, but with the wrong settings. This caused the switches to quickly change between on/off state, making it look like some setting was changed when it was not.

To fix this, I added a loading page to the unsubscribe page.

Apart from this, the current error page now will get shown correctly when the uuid in the url is invalid. And the toast message on the top will be hidden if the newsletter uuid in the url is missing or invalid.
2023-11-08 15:05:47 +01:00
renovate[bot]
85979df33d Update sentry-javascript monorepo to v7.78.0 2023-11-08 14:06:32 +01:00
Jono M
048dac30ed
Extracted AdminX design system to a separate package (#18878)
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.
2023-11-08 12:33:18 +00:00
Princi Vershwal
d88934938c
Wired up offer edit page 2023-11-08 11:52:50 +00:00
renovate[bot]
cc43a311c2 Update Types packages 2023-11-08 12:29:48 +01:00
renovate[bot]
2ca1083de7 Update Types packages 2023-11-08 12:13:12 +01:00
Ronald Langeveld
76727b28e4
Added Portal Preview for Offers (#18905)
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.
2023-11-08 12:54:38 +07:00
Sodbileg Gansukh
186f8a7f81 Added sticky footer to the offers modal in AdminX
no issues
2023-11-08 11:29:15 +08:00
Princi Vershwal
13b9ba9627
Handling archived tiers for offer list 2023-11-07 12:32:45 +00:00
Princi Vershwal
1d8adc6e86
Added tests for offer list 2023-11-07 17:41:32 +05:30
Djordje Vlaisavljevic
7e01bdbf18 Removed unnecessary spacing
refs https://github.com/TryGhost/Product/issues/4106
2023-11-07 11:39:32 +00:00
Sodbileg Gansukh
d68fa7d424 Switched to left-align design for the offer cards in AdminX
no issues
2023-11-07 19:35:26 +08:00
Princi Vershwal
71d84c6a05
Passed correct offerId to Offer Modals (#18893) 2023-11-07 14:52:46 +05:30
Princi Vershwal
bf855e88fd
Wired up Offer list (#18889) 2023-11-07 14:02:27 +05:30
renovate[bot]
eb0c335fc4 Update dependency react-select to v5.8.0 2023-11-07 09:19:10 +01:00
renovate[bot]
74bd6ecc17 Update dependency @types/react to v18.2.35 2023-11-07 09:18:52 +01:00
Steve Larson
ae53464cac
Enabled emoji picker in editor (#18880)
closes TryGhost/Product#4107
- emoji picker is now available for inline emoji insertion
- open the menu with typing a : (colon), e.g. 
2023-11-06 16:07:55 +00:00
Peter Zimon
5dc48758cb
🐛 Fixed links being invisible in Portal settings (#18881)
Refs. https://github.com/TryGhost/Ghost/issues/18879

- Links were covered by textfield background in Portal settings
2023-11-06 16:54:21 +01:00
Daniel Lockyer
7b9ecd6056 Released Comments-UI v0.13.3 2023-11-06 10:54:58 +01:00
Ronald Langeveld
c9914674b6
Wired up redemption filter to OfferCards (#18870)
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.
2023-11-06 14:49:28 +07:00
Simon Backx
fee402a340
🐛 Fixed adding recommendation with URL redirect breaking one-click-subscribe (#18863)
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).
2023-11-03 15:02:45 +01:00
Djordje Vlaisavljevic
cce3d12f45 Made expertise and comment body text wrap when necessary
refs https://github.com/TryGhost/Product/issues/4045
2023-11-02 20:02:34 +00:00
Steve Larson
1c710e2410
Enabled emoji picker in various admin-x fields (#18850)
closes TryGhost/Product#4097
- enabled in announcement bar
- enabled in signup (portal) description
- enabled in newsletter footer
2023-11-02 19:45:49 +00:00
renovate[bot]
8d324a6257 Update dependency @vitejs/plugin-react to v4.1.1 2023-11-02 09:51:00 +01:00
Ronald Langeveld
a81d803324
Added offers modal toggle functions (#18839)
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.
2023-11-02 08:36:16 +00:00
renovate[bot]
e2bf61c03e Update dependency @types/react to v18.2.34 2023-11-02 07:35:38 +01:00
Sodbileg Gansukh
c1d52c3d23 Fixed theme action icon color in dark mode
no issues
2023-11-02 14:10:58 +08:00
Sodbileg Gansukh
11c5658a44 Added static design of the Offers edit screen in AdminX 2023-11-02 13:31:13 +08:00
Peter Zimon
9259d0cc01
Updated settings keywords (#18815)
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
2023-11-01 10:25:36 +00:00
Sodbileg Gansukh
7904d1c832
Added static version of Offers list and new screens to AdminX (#18812) 2023-11-01 18:19:14 +08:00
renovate[bot]
62ecb1ebd8 Update sentry-javascript monorepo to v7.77.0 2023-11-01 09:14:38 +01:00
Ronald Langeveld
39c568b0b9
Refactored Pintura integration hook configuration (#18813)
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`.
2023-11-01 13:06:24 +07:00
renovate[bot]
057d9599f5 Update TryGhost packages 2023-10-31 20:54:17 +01:00
Susheel Thapa
2e5fdffe32
Fixed typos (#18648)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:21:44 +00:00
renovate[bot]
df8eeb2249 Update Types packages 2023-10-31 14:40:32 +01:00
Jono M
3711260f9d
Added feature flag for AdminX Offers (#18801)
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.
2023-10-31 08:41:35 +00:00
Ronald Langeveld
2e53d9985a
🐛 Fixed escape handling for Pintura in Settings (#18800)
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`.
2023-10-31 11:31:21 +07:00
Jono M
48b90e4253
Improved modal save handling in Admin X (#18794)
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.
2023-10-30 17:57:19 +00:00
Jono M
67992d941a
Updated timezone-data and color-utils to use built in type definitions (#18795)
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.
2023-10-30 16:40:54 +00:00
Jono M
80392500bb
🐛 Fixed user list behaviour after deletion (#18738)
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.
2023-10-30 09:43:37 +00:00
Daniel Lockyer
1ad6af6f54 Released Comments-UI v0.13.2 2023-10-26 15:42:15 +02:00
Peter Zimon
aa3ed24049
Fixed site description input field bug in settings (#18771)
refs. https://github.com/TryGhost/Product/issues/4060

- site description input field in design settings had a transparent
background
2023-10-26 07:57:59 +00:00
Djordje Vlaisavljevic
807e613386 Added Beta label to recommendations settings
refs https://github.com/TryGhost/Product/issues/4068
2023-10-25 18:29:15 +01:00
Peter Zimon
6691f0da26
AdminX Settings UX improvements (#18741)
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>
2023-10-25 16:37:58 +02:00
renovate[bot]
bf15f86f13 Update dependency tailwindcss to v3.3.5 2023-10-25 16:35:53 +02:00
Daniel Lockyer
14104f8f74 Released @tryghost/announcement-bar v1.1.8
fixes https://github.com/TryGhost/Ghost/issues/18715
2023-10-25 15:19:15 +02:00
Princi Vershwal
0a2b8cdbd3
Added autoFocus to AddNewsLetter and AddIntegration Modal (#18751) 2023-10-25 15:15:14 +05:30
renovate[bot]
f6a8100d48 Update dependency tailwindcss to v3.3.4 2023-10-25 07:43:24 +02:00
Sag
1e1821fdb3
Fixed undefined css class in the Link component (#18745)
no issue
2023-10-24 16:50:31 +00:00
Jannis Fedoruk-Betschki
1af8d588f9
Added individual settings fields to search keywords (#18704)
- this builds upon #18608
- related to a discussion in the Ghost forum here: https://forum.ghost.org/t/searching-the-new-ui-bug/42043/2
2023-10-24 17:30:12 +02:00
Sag
1b82efe5d2
Added Recommendations feature (#18743)
refs https://github.com/TryGhost/Product/issues/3744


Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-24 11:00:11 -03:00
Kevin Ansfield
125b09324c
Added editorEmojiPicker labs flag (#18739)
closes https://github.com/TryGhost/Product/issues/4056

- adds new flag with UI and passes it through to the editor so it can conditionally enable the relevant plugins
2023-10-24 12:44:29 +00:00
Simon Backx
c8f71e8504
Added list-unsubscribe feature flag and header (#18736)
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.
2023-10-24 10:35:47 +00:00
Princi Vershwal
78d43a1b1e
Using browser local to display time format (#18734)
Ref:
https://www.notion.so/ghost/Localise-formatting-of-Timezone-e12b49ed84a74dfeb4fe922514a08832
2023-10-24 13:27:13 +05:30
renovate[bot]
5844e5c9f1 Update dependency vite to v4.5.0 2023-10-24 09:13:06 +02:00
Jono M
29d3089dce
🐛 Fixed custom setting image upload not working for multiple images (#18728)
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.
2023-10-24 08:10:20 +01:00
Kevin Ansfield
9b1f79f601
Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607)
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
2023-10-23 17:51:34 +01:00
Ronald Langeveld
ee4ef4438e
Fixed Stripe connect display name key (#18725)
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.
2023-10-23 08:56:41 +00:00
Ronald Langeveld
84a9a7dacc
Updated Admin-X settings readme (#18721)
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.
2023-10-23 10:22:03 +07:00
renovate[bot]
f18287eb9b Update dependency concurrently to v8.2.2 2023-10-22 12:25:35 +02:00
Djordje Vlaisavljevic
5ccb0887cb Added shorter label for button on narrow screens
refs https://github.com/TryGhost/Product/issues/4045
2023-10-20 14:51:07 +02:00
Ghost CI
16c5e6e2f9 Merged v5.69.4 into main 2023-10-20 11:41:03 +00:00
Jono M
838e315336 Fixed max currency amount to only apply to donations (#18711)
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.
2023-10-20 12:25:28 +01:00
Ronald Langeveld
a08e5ef324 Changed checked value to use portal plans on toggle (#18708)
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.
2023-10-20 12:25:28 +01:00
Ronald Langeveld
375be17737 🐛 Fixed free tier not updating in Portal settings (#18705)
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.
2023-10-20 12:25:28 +01:00
Jono M
36c78054f2
Fixed max currency amount to only apply to donations (#18711)
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.
2023-10-20 11:48:59 +01:00
Ronald Langeveld
7f2818c091
Changed checked value to use portal plans on toggle (#18708)
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.
2023-10-20 17:02:08 +07:00
Princi Vershwal
4bf3c6c98c
Adding timezone label on UI and Updated @tryghost/timezone-data for Admin-X Settings (#18702)
Ref.
https://www.notion.so/ghost/Kyiv-Kiev-timezone-issue-https-ghost-slack-com-archives-C0568LN2CGJ-p1697467598549909-cc0a8b6388df45018f48e0a917490bf4
2023-10-20 15:19:04 +05:30
Ronald Langeveld
d94d9ad6ba
Cleaned up tiers test in settings (#18707)
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.
2023-10-20 08:40:32 +00:00
Ronald Langeveld
e72f2369bf
🐛 Fixed Stripe modal not showing Account name (#18706)
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
2023-10-20 15:32:07 +07:00
Ronald Langeveld
b12c26aa4b
🐛 Fixed free tier not updating in Portal settings (#18705)
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.
2023-10-20 15:09:41 +07:00
Michael Barrett
094ea1d2b0
🐛 Fixed plan upgrade not cancelling trial (#18699)
closes https://github.com/TryGhost/Product/issues/4036

Fixed a bug where a member on a trial plan would not have their trial
cancelled when they upgraded to a paid plan
2023-10-20 08:52:08 +01:00
Jono M
678ee99e87
Updated AdminX CodeMirror styles to work better in dark mode (#18701)
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.
2023-10-19 14:12:54 +01:00
Jono M
2debf686e6
Updated AdminX file upload to support drag and drop (#18691)
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.
2023-10-19 11:42:00 +01:00
Chris Raible
b5631241c5
🐛 Fixed bug preventing Casper from being activated from gallery (#18697)
fixes TryGhost/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
2023-10-18 15:40:58 -07:00
Sag
96065f9c94
Added more acceptance tests for Recommendation settings (#18696)
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
2023-10-18 18:56:34 +00:00
Sag
5c43945b94
Revert "Added Recommendations feature (#18664)" (#18694)
refs https://github.com/TryGhost/Product/issues/3744

- this reverts GA commit 4e338114de, as
launch has been postponed by a week
2023-10-18 17:03:35 +00:00
Ronald Langeveld
a9ad08cf89
Fixed API Query permissions in User Settings (#18680)
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.
2023-10-18 17:04:59 +07:00
Peter Zimon
ea076fac6a Fixed viewport width bug in AdminX (#18681)
refs. https://github.com/TryGhost/Product/issues/3949

- the viewport was getting really wide because of the whitespace
property of newsletter descriptions
2023-10-18 16:30:46 +07:00
Jono M
bc8c9b78e6 Fixed bugs with saving in portal modal (#18649)
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.
2023-10-18 16:30:23 +07:00
Peter Zimon
e8768f040c
Fixed viewport width bug in AdminX (#18681)
refs. https://github.com/TryGhost/Product/issues/3949

- the viewport was getting really wide because of the whitespace
property of newsletter descriptions
2023-10-18 10:55:09 +02:00
Sag
4e338114de
Added Recommendations feature (#18664)
refs https://github.com/TryGhost/Product/issues/3744

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-17 13:04:35 +00:00
Jannis Fedoruk-Betschki
40a2bdad20
🎨 Improved search keywords in Admin-X Settings (#18608)
fixes https://github.com/TryGhost/Ghost/issues/18661
2023-10-17 13:57:43 +02:00
Djordje Vlaisavljevic
fe90778816 Updated copy
refs https://github.com/TryGhost/Product/issues/4030
2023-10-17 10:50:15 +01:00
Jono M
422f486de4
Improved AdminX scrolling behaviour (#18640)
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.
2023-10-17 09:05:10 +01:00
Ronald Langeveld
a562cc7c7f
Fixed default theme button in theme settings (#18656)
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`.
2023-10-17 10:15:58 +07:00
Sag
4911a73979
Released Portal v2.36.2 (#18654)
no issue
- this version contains minor improvements and bug fixes for the Recommendations feature
2023-10-16 17:27:37 +00:00
Djordje Vlaisavljevic
0271928d1c Removed import
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
95978bbffa Removed recommendations table header
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
08f81dbf90
Updated recommendations design (#18614)
refs https://github.com/TryGhost/Product/issues/4024, https://github.com/TryGhost/Product/issues/3938

- Improved email notification template
- Added `for you` next to the click/subscribe stats

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-10-16 18:04:15 +01:00
Jono M
ce9f6ec69a
Fixed bugs with saving in portal modal (#18649)
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.
2023-10-16 16:06:38 +01:00
MC Naveen
59d3882c9f
Added theme version in design settings (#18623)
### 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.
2023-10-16 15:37:04 +01:00
Jono M
c2f3721e41
Fixed page jump on modal close in Safari (#18624)
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.
2023-10-16 09:53:49 +01:00
Daniel Lockyer
39848883df Fixed Mailgun API key link
fixes https://github.com/TryGhost/Ghost/issues/18630

- the previous link was incorrect/outdated
2023-10-16 08:27:17 +02:00
Jono M
31b3905f8d
Fixed "delete all content" modal not closing in AdminX (#18620)
refs https://github.com/TryGhost/Product/issues/3831

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-10-13 17:50:44 +00:00
renovate[bot]
3a7de860e2 Update dependency @types/validator to v13.11.3 2023-10-13 16:11:49 +02:00
Adarsh Shrivastav
d47863940c
Fixed dark header issue for Admin-X (#18584)
closes #18579

* added the bg-black class for the header div conditionally for dark mode
2023-10-13 09:38:53 +02:00
Ronald Langeveld
7d493d61db
Cleaned up Unsplash component in Admin (#18603)
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.
2023-10-13 14:15:14 +07:00
renovate[bot]
b3116aaa4f Update react monorepo 2023-10-13 09:07:09 +02:00
renovate[bot]
64fd510711 Update babel monorepo 2023-10-13 08:12:20 +02:00
renovate[bot]
ee0bb283da Update tiptap monorepo to v2.1.12 2023-10-13 06:08:29 +00:00
Djordje Vlaisavljevic
ddf8cd1fdc Improved recommendation preview in dark mode
refs https://github.com/TryGhost/Product/issues/3948
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
45239fcc37 Added header to Recommendations table
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
d96eca7aaf Made cells only take up as much space as they need
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
3bc6d331e9 Added colspan support to TableHead
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
e7b1d7afa9 Made it easier to override TableCell padding
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Ronald Langeveld
f4a36ecba4
Fixed link to release in About modal (#18588)
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.
2023-10-12 08:37:56 +07:00
Sag
e0f9d2cd26
Fixed Explore link in the AddRecommendation modal (#18583)
closes https://github.com/TryGhost/Product/issues/4019
2023-10-11 18:29:31 +00:00
Djordje Vlaisavljevic
8822725c01 Improved recommendations stats design
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Djordje Vlaisavljevic
f917cf91ef Fixed Table wrapper overflow issue
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Djordje Vlaisavljevic
e025ffa085 Fixed Hint margin regression
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Jono M
704b041202
Fixed handling of null URLs in tier add form (#18575)
refs https://github.com/TryGhost/Product/issues/3832

Updates to match the old admin, where nothing in the text field means
null and the URL is not formatted until you enter something.
2023-10-11 15:21:16 +01:00
Peter Zimon
586efd1f60
Added "about" modal to AdminX
refs. https://github.com/TryGhost/Product/issues/3949

Added an about modal to the new admin x settings.
---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-10-11 16:09:56 +07:00
renovate[bot]
0e85fdf49f Update dependency vite-plugin-commonjs to v0.10.0 2023-10-11 10:57:27 +02:00
Sag
9e51a8be88
Updated sorting in the recommendations settings (#18560)
closes https://github.com/TryGhost/Product/issues/4020
- show most recently created recommendations first
2023-10-10 16:36:00 +00:00
Djordje Vlaisavljevic
17c0e3ee60 Updated "Show all" button design
refs https://github.com/TryGhost/Product/issues/3936
2023-10-10 16:10:25 +01:00
Michael Barrett
cfa5caaec5
🐛 Fixed theme demo when multiple themes with variants (#18558)
no refs

When multiple themes had variants, the theme demo functionality was not
working correctly and triggering the demo for all themes at once
2023-10-10 13:37:28 +00:00
Michael Barrett
9a18d43ea6
Refactored theme demo selector functionality (#18541)
refs https://github.com/TryGhost/Product/issues/3999

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme.
2023-10-10 09:19:08 +01:00
Jono M
81d2fa09da
Redesigned Admin settings (#18545)
refs https://github.com/TryGhost/Product/issues/3832

Last piece of cleanup, removing the old feature flag. See
https://github.com/TryGhost/Ghost/pull/18360 for the commit that
actually switched over the routes.
2023-10-10 07:37:01 +01:00
Jono M
4b07de885a
Restored newsletter email verification flow (#18548)
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 8a40cbc</samp>

This pull request adds a feature to verify the sender email address for
a newsletter in the admin settings app. It implements a UI component, a
custom hook, and a server-side service to handle the verification
process. It also fixes a minor typo and a navigation issue in the
newsletters module.
2023-10-10 07:34:48 +01:00
Jono M
7f2dc6e5fa
Fixed popover "right" position in AdminX (#18549)
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 babb461</samp>

This pull request enhances the popover component in the
`admin-x-settings` app. It fixes a bug with the alignment of the popover
and refactors the style object for better readability and
maintainability.
2023-10-10 07:34:35 +01:00
Peter Zimon
e6f4144909
AdminX storybook updates (#18503)
refs. https://github.com/TryGhost/Product/issues/3949
2023-10-09 17:04:01 +02:00
Simon Backx
9abd466397
Renamed reason to description in recommendations table (#18527)
fixes https://github.com/TryGhost/Product/issues/4005

We no longer use the 'reason' of a recommendation, but allow a flexible
description instead. Because this is a breaking change in the API, we do
this before making this feature GA.
- Added new database utils for renaming a column
- Added new migration to rename the column
- Updated all references in code
2023-10-09 11:19:44 -03:00
renovate[bot]
a2dd0ea1ca Update react monorepo 2023-10-09 15:08:48 +02:00
Ronald Langeveld
00cfecadf4
Fixed subscription access route in Admin settings (#18538)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696844453572279

- we renamed the access route to members route and never updated the
link. 
- This adds the correct link in the newsletter sending setting.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a62962d</samp>

Fixed a navigation bug in the email settings UI and refactored the
settings UI for better usability. Updated the `onClick` handler of the
`Banner` button in `EnableNewsletters.tsx` and other related files.
2023-10-09 10:16:41 +00:00
Ronald Langeveld
71a8df9f52
Fixed toasts not disappearing after settings reload (#18535)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=d8bb2da9a6534494ad5baf840bbfd785&pm=s

- The error state remains visible after navigating away from settings
- this fix resets the toast on initial load to ensure it doesn't persist
if not needed
---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5c91fe7</samp>

Improved notifications on settings page using `toast` function. Cleared
old notifications on initial load to avoid confusion.
2023-10-09 15:12:33 +07:00
Daniel Lockyer
8a4e81fadd
Fixed splitting string into characters (#18480)
- quite funny because it's such a sneaky thing to discover
- this code actually results in looping over
`'xxxxx<,t,e,s,t,f,o,o,t,>'` and not an array of characters
- adding brackets fixes that

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 584ab6c</samp>

Fix a bug in the code injection test case for the admin settings app.
Ensure that the test code is properly padded and split by using
parentheses in the string concatenations.

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-10-09 09:07:34 +01:00
Michael Barrett
bc3ad1a798
Refactored theme demo functionality (#18525)
refs https://github.com/TryGhost/Product/issues/3998

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme. This also ensures the demo images are correctly referenced in
pro.
2023-10-09 09:05:43 +01:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00
Ronald Langeveld
741a00fe05
Fixed confirmation modals on Integrations - Admin X (#18534)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=39e45d28cd2643888b82d5e9cc0901a3&pm=s

- The logic was correct, but the string value from the API passed in
null when
  empty instead of an empty string.
- this takes a potential null into account to be able to make the
  condition comparison more reliable.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at eac36f4</samp>

Fixed some issues with the state management and input handling of the
`AmpModal` and `FirstPromoterModal` components in the admin settings
app. These changes prevent errors and warnings when the integrations are
null, disabled, or unconfigured.
2023-10-09 11:52:56 +07:00
renovate[bot]
ac3714dee3 Update dependency @tanstack/react-query to v4.36.1 2023-10-09 02:02:14 +00:00
Simon Backx
b868dd263d
Added plausible events to the recommendation modal (#18526)
fixes https://github.com/TryGhost/Product/issues/3841

- Wired up the trackEvent method in admin-X
- Send an event when a recommendation is added
2023-10-06 15:41:33 +02:00
Simon Backx
92b57b4bdf
Improved error handling in recommendation modals (#18524)
fixes https://github.com/TryGhost/Product/issues/3990

- Show errors on blur
- Show toast on submit (final modal only)
- Do an initial validation on mount
2023-10-06 12:23:18 +00:00
Jono M
3680c16362
Fixed AdminX CSS scoping to prevent overriding old admin styles (#18523)
refs https://github.com/TryGhost/Product/issues/3832

Tailwind raises errors if you try to use `important:
'.admin-x-settings'` and have custom styles for `.admin-x-settings`,
hence adding a new base class. We should sort these out when we extract
the design system.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 1ddddf1</samp>

Scoped base and theme styles to the `admin-x-settings` app by adding a
class to the app root element and updating the `index.css` file. This
improves the app's isolation and reduces code duplication.
2023-10-06 13:02:21 +01:00
Daniel Lockyer
07e603a5cd Reverted "Update sentry-javascript monorepo to v7.73.0"
- this reverts commit ec5e2cef20
2023-10-06 13:46:17 +02:00
renovate[bot]
ec5e2cef20 Update sentry-javascript monorepo to v7.73.0 2023-10-06 11:12:32 +02:00
Jono M
fb7bf6d01e
Improved AdminX test coverage based on old admin tests (#18502)
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 7eda74c</samp>

This pull request improves the validation, customization, and feedback
of various form components and modals in the admin-x-settings app. It
also adds new components for user detail modal sections and modifies the
user type to allow null values for social accounts. Additionally, it
adds `dirty` props to some integration modals and a `data-testid`
attribute to the exit settings button. It also deletes an unused file.
2023-10-06 10:06:05 +01:00
renovate[bot]
caf104dbb4 Update dependency @types/validator to v13.11.2 2023-10-06 11:01:24 +02:00
renovate[bot]
5b46f246ef Update dependency @ebay/nice-modal-react to v1.2.13 2023-10-06 08:56:57 +00:00
renovate[bot]
b2cebdc9b0 Update dependency vite to v4.4.11 2023-10-06 07:55:29 +02:00
Ronald Langeveld
d0cd7f040d
Added Recommendations Acceptance tests - Admin X (#18513)
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 ebcfe42</samp>

This pull request adds acceptance tests for the recommendations feature
in the `admin-x-settings` app. It also updates the test utils module to
use the appropriate type and fixture for the recommendations API.
2023-10-06 10:52:18 +07:00
Kevin Ansfield
d812781888
Prevented Escape from closing the image editor (#18505)
no issue

`Escape` can often be hit when attempting to cancel or undo an action
through muscle memory despite it not doing anything in Pintura except
closing the modal and losing all changes

- added `willClose` option to the Pintura modal settings which only
returns `true` when we've detected a click on the close button
2023-10-05 17:30:56 +01:00
Ronald Langeveld
e82f845d5c
Added flags helper for Acceptance Tests in AdminX (#18500)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696495250115289

Adds a new helper function `toggleLabsFlag` that allows toggling of lab
flags within tests. This function can be used directly inside a test
case or within `beforeEach` or `beforeAll` hooks to set the initial
state before tests run.

Usage:
- To toggle a flag within a test: `toggleLabsFlag('recommendations',
false);`
- To set initial state in a hook: 
  ```javascript
  beforeEach(() => {
    toggleLabsFlag('recommendations', true);
  });

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at e138d58</samp>

This change adds a utility module for acceptance testing of experimental
features in Ghost. It allows tests to mock and change the labs settings
using `defaultLabFlags` and `toggleLabsFlag`.
2023-10-05 20:12:54 +07:00
Nick Moreton
8122f02f17
Added resize option to Pintura (#18504)
Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this
list, thanks!

- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-10-05 13:08:23 +00:00
Simon Backx
7b3a0c6863
🐛 Fixed outboundLinkTagging setting affected whether member sources are tracked (#18498)
no issue

- During the one click subscribe flow, the outboundLinkTagging should
affect whether we send a history or not to the signup endpoint. But for
internal history this is the members_track_sources setting. This happens
in the backend normally.
- Do not send a (constructed) history to external sites (= one click
subscribe flow in recommendations) if outboundLinkTagging is false
- Do always send a history internally for local signups (backend handles
whether to store it based on the members_track_sources setting that is
currently not exposed in the frontend). The history is not built if this
setting is disabled, but we could have an old history entry if this
setting was enabled in the past.
2023-10-05 12:25:21 +02:00