Commit Graph

1304 Commits

Author SHA1 Message Date
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
Sag
f8ad5fb2ea
Updated Portal to use calculated support and default email addresses (#19163)
fixes GRO-72

- added "default_email_address" and "support_email_address" to the
public settings
- when available, use these addresses in Portal. Otherwise, fallback to
current logic
2023-11-29 09:48:05 -03: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
Sodbileg Gansukh
614574a44d
Added a label to the SortMenu component to make it more explicit (#19171)
fixes ADM-21
2023-11-29 20:12:02 +08: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
renovate[bot]
d5f3b26e87 Update sentry-javascript monorepo to v7.83.0 2023-11-29 12:29:34 +01: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
Simon Backx
5d8d8cee0a Released @tryghost/portal@2.36.3 2023-11-28 16:18:01 +01:00
Simon Backx
57d43d2d72 🐛 Fixed Portal default page handling
fixes GRO-88

Instead of going to the previous page when visiting /#/portal, it will now go to the default page:
- Sign up if you are not signed in
- Account home if you are signed in

Previously, it had the same behaviour, with the difference that it would also go to the previous page if there was any.
2023-11-28 16:18:01 +01: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
Peter Zimon
8a5e9fb9f6
Admin X Design System docs (#19120)
refs. https://github.com/TryGhost/Product/issues/4169

- Added Layout documentation to design system
- Added note about usage of Toast component
2023-11-23 16:18:59 +01:00
Jono M
759848caad
Remove Toaster from AdminX demo (#19119)
no issue

It's already rendered by `DesignSystemApp` so we shouldn't need to add
it explicitly.
2023-11-23 14:59:36 +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
Peter Zimon
7f451b2627
Admin X demo detail page (#19105)
refs. https://github.com/TryGhost/Product/issues/4169

- the detail page for the Admin X proto app was empty
- the asc/desc selector of the SortMenu component in the design system needed a bit of refinement
- page toolbar was not set
2023-11-23 08:18:41 +01: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
Peter Zimon
82a775086c
Admin X design system updates (#19102)
refs. https://github.com/TryGhost/Product/issues/4169

- some of the new components were not prepared for mobile sizes and dark
mode
- Storybook settings had to be updated to include mobile sizes that
reflect the actual system
2023-11-22 15:53:23 +00:00
Jono M
9848469568
Added detail page routing to AdminX demo app (#19101)
refs https://github.com/TryGhost/Product/issues/4183
2023-11-22 15:43:03 +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
Peter Zimon
6b46c828e7
Admin X demo app content (#19079)
refs. https://github.com/TryGhost/Product/issues/4169

- Added demo content for POC AdminX demo app
2023-11-22 13:44:39 +01: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
renovate[bot]
56d18edf0e Update sentry-javascript monorepo to v7.81.1 2023-11-21 15:05:41 +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
Ronald Langeveld
3a68d78217
Fixed offers list not updating when adding offer (#19075)
no issue

- fixes an issue where the offers list doesn't get updated when a new
offer is added to the list.
2023-11-21 13:27:52 +02: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