Commit Graph

1209 Commits

Author SHA1 Message Date
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