Commit Graph

959 Commits

Author SHA1 Message Date
Ronald Langeveld
e2a4724792
🐛 Fixed links in History (#19551)
refs
https://linear.app/tryghost/issue/PROD-331/post-and-offer-links-404-in-history

- Links were using Ember route instead of absolute routes, causing 404s.
2024-01-23 11:32:46 +00:00
Ronald Langeveld
db5d2d0329
🐛Fixed primary_name crashing Settings history (#19550)
fixes
https://linear.app/tryghost/issue/PROD-329/history-modal-crashes-the-app

- Added optional chaining operator to avoid null or undefined crashes
when the condition doesn't meet and should rather just move on.
- It now aligns with the other conditions where chaining is used.
2024-01-23 10:05:12 +00:00
Princi Vershwal
363fbd1d9b
Added delay to avoid preview flashing (#19548) 2024-01-23 09:29:55 +00:00
Ronald Langeveld
dc1bba781b
Fixed Offers redemptions preselection (#19541)
fixes
https://linear.app/tryghost/issue/PROD-319/offer-is-not-preselected-in-filter-dropdown-after-navigating-to

- fixes the URL builder for when Redeemed offers are selected to ensure
the selected tier is preselected in the members filter
2024-01-22 15:14:08 +00:00
Princi Vershwal
73fb5a3e84
Added loader for preview (#19536) 2024-01-22 14:45:06 +00:00
renovate[bot]
3575102462 Update dependency vite to v4.5.2 [SECURITY] 2024-01-22 09:25:09 +01:00
Djordje Vlaisavljevic
c4a800e97d
Fixed logic for displaying toast notifications when updating email address PROD-215
refs PROD-215

- Showing toast notification instead of modal to all users (even
self-hosted and legacy (Pro)) now
- More compact toast notification message
- Updated tests
2024-01-18 19:00:49 +00:00
Ronald Langeveld
b4fc45008a
Added hasLoaded state in Portal Frame (#19524)
no issue

- added an additional state that keeps track on whether the iFrame
content has loaded, before checking whether Portal has loaded.
2024-01-18 16:42:52 +00:00
Djordje Vlaisavljevic
501b1a2640
Updated design for sender and reply-to email address flow PROD-215 PROD-216
refs PROD-215 PROD-216

- Added toast notifications for successful sender and reply-to email
address change behind the flag, instead of the modal
- Updated email template for verifying new sender or reply-to email
2024-01-18 15:21:48 +00:00
Ronald Langeveld
3e67544331
Removed onLoad from iFrame element (#19522)
no issue

- removed the onLoad function from the iFrame element and only rely on
the listener waiting for 'portal-ready' before showing Portal
2024-01-18 15:09:52 +00:00
Daniel Lockyer
57c5f92770 Reverted "🎨 Added Offers to the new Settings (#19493)"
This reverts commit c7d7b883cc.
2024-01-18 15:04:59 +01:00
Sag
0f17f9a937
Updated design of the reply-to field for custom sending domains (#19515)
fixes PROD-205
fixes PROD-219

- removed the right placeholder complexity
- the preview renders the current sender / reply-to address in
real-time, regardless of whether it's valid
- if the reply-to address does not match the custom sending domain, show
an inline error
2024-01-18 14:39:43 +01:00
Ronald Langeveld
c7d7b883cc
🎨 Added Offers to the new Settings (#19493)
no issue

- Removes flags for the new Offers in Admin X (Settings)
- Removes old Offers from the sidebar.
- See a new version of Offers in Settings. 🎨
2024-01-18 12:56:08 +00:00
Ronald Langeveld
14bf2df834
Made offers iframe init load async (#19516)
no issue

- ensures it waits for event data to load before rendering the iframe
which sometimes causes an undesired flashing experience.
2024-01-18 12:38:41 +00:00
Ronald Langeveld
66238c7ccf
Added default string to href to Offers Portal iFrame (#19514)
no issue

- potentially fixes a small performance issues to avoid the homepage of
your publication from being loaded should an href from Portal not exist
when loading Offers, that could cause flashing.
2024-01-18 09:42:46 +00:00
Sodbileg Gansukh
8f4f013ed2
Design details on Offers cards and list (#19513) 2024-01-18 08:24:28 +00:00
Djordje Vlaisavljevic
4abcd17184 Added static design for banners
refs PROD-215 PROD-322
2024-01-17 21:09:24 +00:00
Sag
5ddd90a244
Updated Portal settings to render paid plans options only when relevant (#19507)
fixes PROD-300
- hides "Prices available at signup" and "Price preselected at signup"
options in Portal settings, if no paid tier is active/visible
2024-01-17 15:08:15 +00:00
Kevin Ansfield
100e7b70c6
Added TK Reminders feature (#19491)
no issue

- keep an eye on on https://ghost.org/changelog/ for full details
2024-01-17 08:57:35 +00:00
renovate[bot]
a1158a5595 Update Types packages 2024-01-15 21:04:04 +01:00
Michael Barrett
ed0762fb51
Removed usage of yg when using NQL (#19287)
refs https://github.com/TryGhost/NQL/pull/73

The referenced PR removes `yg` from the parsed NQL output, so we also
need to remove any usage of it in Ghost
2024-01-15 14:40:01 +00:00
Ronald Langeveld
3c4b981674
🐛 Fixed outside click exiting Code Injection modal (#19424)
no issue

- fixed a bug causing the full screen code injection to close when
clicking out side of it, which could cause the loss of unsaved changes.
2024-01-05 10:53:57 +00:00
Sodbileg Gansukh
3e98dd9edf
Simplified offers table UI (#19439)
fixes PROD-283
2024-01-04 10:45:44 +00:00
Sodbileg Gansukh
3611e99422
Close offer modal after archiving/reactivating (#19437)
fixes PROD-284
2024-01-04 02:17:53 +00:00
Sodbileg Gansukh
af1551bf8f
Moved learn more link to a separate line in Offers setting group (#19428)
fixes PROD-281
2024-01-03 06:57:32 +00:00
Jono M
51ee276e97
Updated files with mixed named/default exports to use only named exports (#19385)
no issue

Fixes a warning in yarn dev
2023-12-14 16:01:28 +00:00
Princi Vershwal
62a5b7d61a
Removed onBlur error feedback in Recommendation edit modal (#19382)
Fixes
[PROD-266](https://linear.app/tryghost/issue/PROD-266/remove-onblur-error-feedback-in-recommendation-edit-modal)
2023-12-14 13:09:55 +00:00
Princi Vershwal
e0aca1c2fb
Removed onBlur error feedback in Custom Integration/Webhook modal (#19384)
Fixes
[PROD-269](https://linear.app/tryghost/issue/PROD-269/remove-onblur-error-feedback-in-custom-integration-webhook-modal)
2023-12-14 12:46:37 +00:00
Princi Vershwal
82d9e3a978
Removed onBlur error feedback in Custom Integration edit modal (#19383)
Fixes
[PROD-268](https://linear.app/tryghost/issue/PROD-268/remove-onblur-error-feedback-in-custom-integration-edit-modal)
2023-12-14 12:30:07 +00:00
Princi Vershwal
8d3f3d60f7
Removed onBlur error feedback on Tier detail modal (#19381)
Fixes
[PROD-265](https://linear.app/tryghost/issue/PROD-265/remove-onblur-error-feedback-on-tier-detail-modal)
2023-12-14 11:53:35 +00:00
Princi Vershwal
bb42faf694
Removed onBlur error feedback in Newsletter General settings (#19379)
Fixes PROD-267
2023-12-14 11:44:05 +00:00
Ronald Langeveld
0dc4ac380c
Portal Iframe Improvements in Admin X (#19377)
refs PROD-4

- removed unnecessary props passed into the PortalFrame component.
2023-12-14 09:42:30 +02:00
Princi Vershwal
3fef668394
Validation fix: Corrected fields should revert back from error-state (#19376)
Fixes PROD-278
2023-12-14 07:03:20 +00:00
Princi Vershwal
7b0ec35a1f
Fixed validation error: Corrected fields should revert back from erro… (#19374)
Fixes
[PROD-272](https://linear.app/tryghost/issue/PROD-272/corrected-fields-should-revert-back-from-error-state)
2023-12-14 05:32:50 +00:00
Ronald Langeveld
275cdd4db9
Added performance adjustments to Portal iFrames (#19373)
refs PROD-4
2023-12-14 06:54:39 +02:00
Djordje Vlaisavljevic
69a8f71bd1 Switched checkbox to a hint showing status
refs PROD-276
2023-12-13 16:58:50 +00:00
Djordje Vlaisavljevic
b0ac1e9afd Hid price preselect dropdown when only monthly or yearly are shown
refs PROD-275
2023-12-13 16:58:50 +00:00
Djordje Vlaisavljevic
b97f91f408 Changed portal settings to show free tier name instead of "Free"
refs PROD-255
2023-12-13 16:58:50 +00:00
Sodbileg Gansukh
f00b342e83
Fixed number formatting of offer redemptions count (#19365)
fixes PROD-274

- corrected plural form of the label
- added number formatting
2023-12-13 15:38:53 +00:00
Sodbileg Gansukh
6462f8f2ab
Fixed minor design issues in offers (#19363)
fixes PROD-271, PROD-273
2023-12-13 15:26:28 +00:00
Peter Zimon
58d9b8e382
Update migration in settings (#19278)
refs.
7b40393d77

We're improving the usability and possibilities for publishers to
migrate from other platforms such as Substack, Medium or Mailchimp. This
PR applies changes to Ghost Settings to support the new flows, more
specifically:

- moves import and export functions out of Labs to its own setting,
directly available from search and the menu
- adds direct access to various platform migrations
- moves "Delete all content" to a dedicated setting group at the bottom
of all setting

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-12-13 16:25:29 +01:00
Ronald Langeveld
f23767fe12
Fixed offers asc/desc sorting not updating in component (#19361)
refs
https://linear.app/tryghost/issue/PROD-8/when-i-sort-by-name-→-click-into-an-offer-→-go-back-to-the-list-it
2023-12-13 13:46:11 +00:00
Princi Vershwal
f29d7975a8
Removed validation onBlur (#19358)
Fixes
[PROD-209](https://linear.app/tryghost/issue/PROD-209/when-an-input-is-focused-and-a-modal-is-closed-error-messages-are)
2023-12-13 11:07:15 +00:00
Daniel Lockyer
a9c9202b5c Added defaults to Nx build step
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
2023-12-13 11:54:31 +01:00
Daniel Lockyer
efec8b5fba Enabled concurrent execution of tsc and Vite build
refs https://github.com/TryGhost/DevOps/issues/122

- this runs the Vite build and Typescript type checking concurrently,
  which will speed up the total time to build
2023-12-13 11:54:31 +01:00
Ronald Langeveld
286194d61a
Added global state to avoid losing sorting state in Offers (#19355)
refs
https://linear.app/tryghost/issue/PROD-8/when-i-sort-by-name-→-click-into-an-offer-→-go-back-to-the-list-it


- we now handle the state via a global state to ensure we aren't resetting the sorting options after each rerender.
2023-12-13 12:25:06 +02:00
Sodbileg Gansukh
be47817ca0
Dark mode improvements for offers success screen (#19356) 2023-12-13 10:20:47 +00:00
Daniel Lockyer
fc02ca8bbb Reverted "Update Vite packages"
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1702454781859679

- this reverts commit cf60db85d8 as we've
  seen issues with the `vite-plugin-css-injected-by-js` dependency
2023-12-13 09:24:29 +01:00
renovate[bot]
9f9f6d0526 Update dependency @types/react to v18.2.45 2023-12-13 08:59:33 +01:00
Sodbileg Gansukh
3713273560
Dark mode improvements for offers (#19352)
fixes PROD-262, PROD-261
2023-12-13 07:40:40 +00:00
renovate[bot]
981b8fc814 Update dependency @types/react to v18.2.44 2023-12-13 08:23:09 +01:00
Princi Vershwal
830967d2ed
Edit cancle button fix (#19350)
Fixes:
[PROD-213](https://linear.app/tryghost/issue/PROD-213/cancelling-should-act-two-ways-when-the-modal-is-opened-from-the-list)
2023-12-13 07:16:26 +00:00
Sodbileg Gansukh
b7648e7bc2
Added design improvements to the Portal preview in offers (#19349)
fixes PROD-251, PROD-252, PROD-254
2023-12-13 06:17:12 +00:00
Princi Vershwal
7d530406f6
Add offer cancel button fix (#19348)
Ref
[PROD-213](https://linear.app/tryghost/issue/PROD-213/cancelling-should-act-two-ways-when-the-modal-is-opened-from-the-list)
2023-12-13 05:48:48 +00:00
renovate[bot]
cf60db85d8 Update Vite packages 2023-12-12 18:23:37 +01:00
Sodbileg Gansukh
03fd494e84
Hide copy link feature when there's no offer code (#19335)
fixes PROD-253
2023-12-12 15:57:55 +00:00
Sodbileg Gansukh
0a5c61acb2
Removed linking when there's no redemptions (#19332)
fixes PROD-250
2023-12-12 15:37:50 +00:00
Djordje Vlaisavljevic
5c19249473
Added yearly discount indicator to monthly/yearly toggle PROD-60 PROD-222 PROD 223 (#19276)
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>
2023-12-12 09:32:56 +00:00
Princi Vershwal
c1c3775748
Revert "Add offer cancle button fix" (#19324)
Reverts TryGhost/Ghost#19297
2023-12-12 07:27:17 +00:00
Sodbileg Gansukh
c932e9d60e
Updated copy of the add offer link in the settings group (#19323) 2023-12-12 12:28:53 +07:00
Sodbileg Gansukh
742a743a6b
Removed extra div when there's no offers to show in the settings group (#19322) 2023-12-12 05:03:43 +00:00
Daniël van der Winden
8c5c773398
Fixed white icon bg's in tier list in dark mode (#19310)
Closes issue https://github.com/TryGhost/Ghost/issues/18872

Solves the problem of the bg-white class showing a white background
behind the checkmark icons in the tier list.
2023-12-11 17:13:46 +01:00
Jono M
9ff482f985
Updated AdminX routing to work with and without a leading slash (#19312)
no issue
2023-12-11 14:43:06 +00:00
Ronald Langeveld
4c09a96a3c
Changed request type to fetching iframe content in previews (#19307)
refs PROD-227

- Swapped out the request type from `POST` to `GET`.
2023-12-11 14:28:35 +00:00
Jono M
8ab693d74d
Fixed wrong credentials usage in AdminX previews (#19281)
refs PROD-227
2023-12-11 14:01:53 +00:00
renovate[bot]
29f9322cf3 Update dependency @types/react to v18.2.43 2023-12-11 09:49:06 +01:00
Princi Vershwal
5cb3ec6e0b
Add offer cancle button fix (#19297)
Fixes PROD-213
2023-12-11 04:40:35 +00:00
Ronald Langeveld
181c5c0920
Changed code injection to full screen editor. (#19259)
fixes PROD-7
https://ghost.slack.com/archives/C0568LN2CGJ/p1701690959138659

- Changed the code injector editor to only use the full screen editor in
its own modal.

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-12-08 09:11:52 +02:00
Sag
a5dcae80e7
Updated copy during email verification in newsletter settings (#19265)
fixes PROD-202
2023-12-06 19:56:25 +00:00
Djordje Vlaisavljevic
813abb06e2
Moved hint content to placeholders for consistency PROD-204, PROD-203 (#19261)
refs PROD-204, PROD-203

- Moved fallback value information from hints to placeholders for
consistency and cleaner layout
- Changed setting section label
2023-12-06 17:06:21 +00:00
Simon Backx
3bc068123c
Wired up checkbox to toggle tier visibility (#19260)
fixes PROD-200
2023-12-06 17:36:18 +01:00
Simon Backx
3f6ea04c43
Added portal default plan setting (#19238)
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.
2023-12-06 11:39:58 +01:00
Princi Vershwal
a38aef7522
Validation fix (#19256)
Fixes PROD-208
2023-12-06 10:38:05 +00:00
Princi Vershwal
60d142202b
Remove validation error once user start typing (#19251)
Ref
[PROD-15](https://linear.app/tryghost/issue/PROD-15/validation-issues)
2023-12-06 13:32:21 +05:30
Princi Vershwal
5a4d98e90d
Show Add offer button on settings screen if no offer is present (#19215)
Ref
[PROD-3](https://linear.app/tryghost/issue/PROD-3/settings-group-navigation-handling)
2023-12-06 04:31:48 +00:00
Djordje Vlaisavljevic
9eed858e8e
Added static design for toggling showing new tier in portal PROD-66 (#19242)
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>
2023-12-05 18:53:05 +00:00
Sag
545cf8c258
Updated logic to allow a different name for the free tier (#19229)
fixes PROD-69
2023-12-05 18:05:16 +00:00
Jono M
960fde80db
Fixed missing link on upgrade modals (#19237)
refs PROD-5
2023-12-05 14:59:49 +00:00
renovate[bot]
5811dcaa41 Update Types packages 2023-12-04 22:05:57 +01:00
renovate[bot]
a1c292b683 Update dependency @vitejs/plugin-react to v4.2.1 2023-12-04 19:41:11 +01:00
Djordje Vlaisavljevic
f1511e6081 Added logic for disabled state for the dropdown
refs GRO-141
2023-12-04 18:16:23 +00:00
Djordje Vlaisavljevic
7026b28e17 Added static dropdown for selecting default price plan
refs GRO-141
2023-12-04 18:16:23 +00:00
Djordje Vlaisavljevic
36294c6482 Added feature flag for portal improvements
refs GRO-154
2023-12-04 18:16:23 +00:00
Jono M
ede2d9c1b7
Fixed loading and error handling bugs in portal settings (#19225)
fixes ADM-31
2023-12-04 15:25:58 +00:00
Peter Zimon
be925251b8
Added "support email address" keywords (#19224)
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.
2023-12-04 14:15:10 +00:00
Jono M
d77d31a2d0
Updated to refocus settings search field upon clearing it (#19220)
fixes ADM-48
2023-12-04 12:16:22 +00:00
renovate[bot]
3267eb9843 Update dependency vite to v4.5.1 2023-12-04 12:56:21 +01:00
renovate[bot]
72ed1cdec2 Update Types packages 2023-12-04 11:06:28 +01:00
Ronald Langeveld
24ab28a8fc
Hide Offers when Stripe is disabled in AdminX (#19217)
refs ADM-56

- Hides Offers from setting menus when Stripe is disabled on Admin X settings.
2023-12-04 10:10:36 +02:00
Djordje Vlaisavljevic
21a1dd6b8d Updated newsletter settings form
refs GRO-111, GRO-110
2023-11-30 18:46:14 +00:00
Djordje Vlaisavljevic
26d89d421c Updated reply-to address in newsletter preview
refs GRO-110
2023-11-30 18:46:14 +00:00
Jono M
cc4176f0bf
Updated AdminX error handling to display validation errors correctly (#19210)
fixes ADM-44
2023-11-30 16:47:59 +00:00
Simon Backx
2809703c76
Added hint to Reply-To field in newsletter detail modal (#19209)
ref GRO-110
2023-11-30 17:09:11 +01:00
Simon Backx
226900f040
Allow custom reply-to addresses for self-hosters and allow empty values (#19200)
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.
2023-11-30 16:14:36 +01:00
Jono M
642c7f39cd
Fixed bugs with newsletter creation in admin (#19201)
refs ADM-4
2023-11-30 15:07:02 +00:00
Sag
4cc615a5d3
Updated wording in the support email verification process (#19187)
fixes GRO-87

- also updated logic to use the calculated "support_email_address" in Portal settings
2023-11-30 11:58:12 -03:00
Jono M
1b75747ca0
Fixed hardcoded private RSS URL in settings (#19199)
refs ADM-16

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-11-30 14:45:37 +00:00
Djordje Vlaisavljevic
4284e4bcdc
Fixed default address in the hint (#19202)
fixes GRO-101
2023-11-30 15:22:41 +01:00
Sodbileg Gansukh
77e9ea987b
Design details for offers modal (#19208)
no issues

- consistent spacing between modal and preview modal
- no action button jumping between the modals
- cleaner stats section in the edit screen
2023-11-30 14:08:25 +00:00
Sodbileg Gansukh
9edffbffee
Renamed offer stat label (#19206)
fixes ADM-34
2023-11-30 12:45:33 +00:00
Jono M
4b2c4dd2b3
Updated offers summary to find the latest three with active tiers (#19177)
fixes ADM-19
2023-11-30 10:21:16 +00:00
Ronald Langeveld
6983699e1a
🐛 Fixed slash not working in Koenig link editor (#19198)
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.
2023-11-30 12:16:05 +02:00
Simon Backx
c07218dff4
Fixed reply-to dropdown when custom address was set (#19197)
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.
2023-11-30 09:58:27 +00:00
Sodbileg Gansukh
d6e535d3b0
Moved the action buttons to top on offers list screen (#19195)
fixes ADM-42
2023-11-30 09:25:23 +00:00
Simon Backx
ab21b8ae1d
Allowed custom/empty replyTo for newsletters with managed sending domain (#19183)
fixes GRO-75
fixes GRO-100

And allow them to be empty
2023-11-30 09:16:03 +00:00
Sodbileg Gansukh
79081686b1
Disabled backdrop click for offers modals (#19194)
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
2023-11-30 08:56:29 +00:00
Sodbileg Gansukh
cdfe3843c3
Simplified offers modal navigation (#19193)
fixes ADM-36

- removed the breadcrumbs from the preview modals
- fixed spacing of button group
2023-11-30 07:49:58 +00:00
Sodbileg Gansukh
9914eb753b
Offers modal and preview improvements (#19192)
fixes ADM-20

- increased the width of the modals
- smaller width for the portal preview for better balance
2023-11-30 05:43:37 +00:00
Sodbileg Gansukh
63774463ce
Simplified offers list screen in AdminX (#19190)
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
2023-11-30 04:23:48 +00:00
Sodbileg Gansukh
49eaee40f2
Settings overview improvements for offers in AdminX (#19189)
fixes ADM-38
2023-11-30 03:17:17 +00:00
Sodbileg Gansukh
d318093f55
Reorganized add and edit forms of offers in AdminX (#19188)
refs ADM-33, ADM-34, ADM-35
2023-11-30 10:35:55 +08:00
Sag
22c6527c49
Moved helpers for newsletter emails into a separate util (#19185)
no issue
2023-11-29 18:35:33 +00:00
Djordje Vlaisavljevic
57e767860d
Put newsletter preview header changes behind newEmailAddresses flag GRO-102 (#19184)
refs GRO-102
2023-11-29 16:57:51 +00:00
John O'Nolan
440c804213
Added notice of upcoming removal of AMP (#19178)
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
2023-11-29 15:22:33 +00:00
Sodbileg Gansukh
e33fe08469
Fixed amount off dropdown selector position during validation error (#19176)
fixes ADM-29
2023-11-29 14:29:13 +00:00
Ronald Langeveld
9a6d71884b
Set negative pricing in Offers index to 0 (#19174)
fixes ADM-24

- sets a negative amount to 0
- this usually occurs if the tier amount was changed after the offer has
been created.
2023-11-29 16:10:10 +02:00
Sodbileg Gansukh
babbca1c19
Design improvements for offers success screen (#19172)
fixes ADM-25

- added an input field above the copy link button for more explicity
- consistent text for social media sharing
2023-11-29 12:43:57 +00:00
Ronald Langeveld
2f43f58010
Fixed flaky Offers tests (#19170)
refs https://ghost.slack.com/archives/C02G9E68C/p1701258027793649

- missing an `await` before the `expect` in the test causing it to be potentially flaky.
2023-11-29 13:55:54 +02:00
Simon Backx
3ef427a504
Fixed displaying empty from address in newsletter preview (#19169)
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.
2023-11-29 10:59:53 +00:00
Ronald Langeveld
d3b0a26e4d
Updated Acceptance Tests for Offers in Admin X (#19167)
no issue

- Updated acceptance testing for offers in AdminX
2023-11-29 10:32:31 +00:00
Djordje Vlaisavljevic
494e0918fd
Updated newsletter settings GRO-76 GRO-90 (#19155)
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
2023-11-29 09:53:08 +00:00
Ronald Langeveld
adace14beb
Added v-param to portal base URL in Offers-X (#19166)
no issue

- fixed the double `/` slash that's parsing the href url.
- also added a v-param.
2023-11-29 08:02:25 +00:00
Sodbileg Gansukh
9ae45adda1
Added sorting direction option to individual sort option (#19154)
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
2023-11-28 09:32:13 +00:00
Ronald Langeveld
9f3c644e2a
Added validation to Offers X input fields (#19153)
refs https://github.com/TryGhost/Product/issues/4206

- added validation to input fields when creating a new offer
2023-11-28 07:59:53 +00:00
Sag
54ee8d3389
Updated newsletter email verification to render the verified address (#19148)
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
2023-11-27 18:28:57 +00:00
Sodbileg Gansukh
2f0cd97011 Added a message to offers tied to an archived tier 2023-11-27 21:48:17 +08:00
Sodbileg Gansukh
b9de456026
Better no offers handling in offers list screen (#19138)
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
2023-11-27 09:01:47 +00:00
Ronald Langeveld
b9d7c2d3a5
Fixed portal not loading on deep linking to Add new Offer (#19137)
no issue

- fixed an issue that caused the portal iframe embed not to load when
visiting the `offers/add` url directly.
2023-11-27 10:51:05 +02:00
Sodbileg Gansukh
c2ee21a345 Added frontend validation to the offers add/edit modals in AdminX 2023-11-27 15:08:32 +08:00
Sodbileg Gansukh
b111b7c719 Improved mobile styles for the offers in AdminX 2023-11-27 14:17:58 +08:00
Ronald Langeveld
d729e7aa21
Fixed exit route on offers modal (#19126)
no issue

- when clicking outside the Edit or Add modal, it would clear the modal,
but not the route. This modifies the route to clear as well.
2023-11-24 12:18:50 +00:00
Ronald Langeveld
62b71fb4c0
Fixed offers index pricing decimals (#19125)
no issue

- changes the price tags on the offer cards to two decimal places.
2023-11-24 14:06:19 +02:00
Ronald Langeveld
41ee387af2
Fixed Offers portal preview edge cases (#19124)
no issue

- cleaned up offers portal preview.
- fixes a few logic errors and potential edge cases and making it easier
to maintain.
2023-11-24 12:32:45 +02:00
Sag
819ddccc72
Fixed validation and edge cases for managed email UI (#19121)
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).
2023-11-23 22:30:28 +00:00
Simon Backx
a037ce3dde
Added calculated email address settings (#19115)
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.
2023-11-23 13:07:15 +00:00
Jono M
a8083960d8
Added test examples to AdminX demo (#19116)
refs https://github.com/TryGhost/Product/issues/4182

Updated framework to include shared test config for easier app setup.
2023-11-23 12:59:48 +00:00
Sodbileg Gansukh
17804dd3ac Various design fixes for offers in Adminx 2023-11-23 17:15:03 +08:00
Princi Vershwal
876f13c075
Fixed no offer screen and tab view
Ref: https://github.com/TryGhost/Product/issues/4188
2023-11-23 07:01:53 +00:00
Sag
ff70ffec67
Updated newsletter settings UI for managed email (#19082)
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>
2023-11-23 02:07:14 +00:00
Princi Vershwal
4f518153aa
Fixed offers for archive tiers 2023-11-22 18:42:24 +00:00
Jono M
f19f32b132
Moved AdminX test config to framework package (#19096)
refs https://github.com/TryGhost/Product/issues/4180
2023-11-22 13:39:32 +00:00
Ronald Langeveld
cc6e881342
Wired latest offer cards to Offers settings group in Admin. (#19095)
refs https://github.com/TryGhost/Product/issues/4176

- wired up Offer data points to the offer cards in the grouped setting.
2023-11-22 13:18:04 +00:00
renovate[bot]
8d0b9cd269 Update Types packages 2023-11-22 12:24:36 +01:00
Princi Vershwal
0a20df65b5
Added fix for no offer screen (#19092) 2023-11-22 10:35:40 +00:00
Sodbileg Gansukh
2cd248b5bf Added no offers view to the offers list screen in AdminX
refs https://github.com/TryGhost/Product/issues/4177
2023-11-22 18:00:45 +08:00
Sodbileg Gansukh
d76b739f1e Added latest offer cards to the Offers setting group
refs https://github.com/TryGhost/Product/issues/4176
2023-11-22 17:05:32 +08:00
Princi Vershwal
5587192644
Wiring up sorting to offers in AdminX
Ref: https://github.com/TryGhost/Product/issues/4162
2023-11-22 14:14:44 +05:30
Jono M
32dacd9ff7
Fixed provider ordering to prevent bugs loading modals on refresh (#19089)
refs https://github.com/TryGhost/Product/issues/4174
2023-11-22 07:51:10 +00:00
Ronald Langeveld
8038c5854e
🐛 Fixed About modal dev experiments info in Settings (#19087)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1700617587979039

- Fixes an issue where dev experiments data shows up in the settings
About modal while it's disabled. Now it will only shows that info when it's
enabled.
2023-11-22 06:28:31 +00:00
renovate[bot]
b275450bec Update Types packages 2023-11-21 15:06:56 +01:00
Ronald Langeveld
b5c3def92b
Fixed Offers not saving fixed amount discount (#19077)
no issue

- Offers with a fixed amount wasn't saving due to the type not updating
from percent to fixed.
2023-11-21 12:31:28 +00:00
Simon Backx
b6519e0f1f
Removed usage of unquoted ids in filter strings (#19070)
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.
2023-11-21 09:45:36 +01:00
Ronald Langeveld
dca11d0eeb
Added last redeemed UI (#19069)
refs https://github.com/TryGhost/Product/issues/4153

- wired up the last redeemed date to the Offers edit stats
- added the direct link to the pre-filtered list members by offered
used.
2023-11-21 10:31:06 +02:00
Sodbileg Gansukh
820a7c664f Fixed offer amount select width issue 2023-11-21 16:02:23 +08:00
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
Steve Larson
a398067159
Added TK reminders labs feature (#19057)
refs TryGhost/Product#4156
2023-11-20 23:30:16 +00: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
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]
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
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
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
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
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
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
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
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
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
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
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
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]
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
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
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
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