Commit Graph

7749 Commits

Author SHA1 Message Date
Rishabh
b015ac4d42 Added price list to offer list screen
refs https://github.com/TryGhost/Team/issues/1162

- adds original and updated price for an offer in offer list table
2021-10-20 18:02:14 +05:30
Rishabh
27b7bcebac Updated price amount helper to return decimal values
no refs

- price amount helper was previously always returning whole numbers after rounding-off amount values
- this change updates the behavior to show decimal values upto 2 places when the amount is not a whole number, and a whole number otherwise
2021-10-20 18:02:14 +05:30
Rishabh
82470a723c Added guard for missing currency in currency symbol helper
no refs
2021-10-20 18:02:14 +05:30
Rishabh
ff4d0b8ce0 Removed Offer from sidebar when stripe is disconnected
closes https://github.com/TryGhost/Team/issues/1158

Offer feature doesn't make sense when paid memberships are disabled on a site, this change removes the Offer option from sidebar if Stripe is disconnected (no paid memberships)
2021-10-20 18:02:14 +05:30
Kevin Ansfield
8002309112 Fixed menu width jump after animating at tablet sizes
refs https://github.com/TryGhost/Team/issues/1149

- added fixed width of the main menu to the tablet-size media queries so it doesn't snap back to a smaller width after animating
2021-10-20 13:18:10 +01:00
Kevin Ansfield
8710f5f532 Added animation of sidebar between main and contextual menus
refs https://github.com/TryGhost/Team/issues/1149

- added `ember-css-transitions` library that provides a modifier that adds/removes classes used for animating elements in and out, automatically creating a clone for destroyed elements
- added a wrapper class around the `main` and `design` nav menu contents so they could be individually animated
- used the new `{{css-transition}}` modifier to animate the sidebar menus in/out
- ensured main menu doesn't animate on first render of the parent `<GhNavMenu>` component so there's no animation when Admin is loaded
2021-10-20 13:04:05 +01:00
Sanne de Vries
53ac7d2f6d Updated design settings side nav 2021-10-20 11:14:26 +02:00
renovate[bot]
65bfc5e7b9 Lock file maintenance (#2063)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:54:28 +01:00
Kevin Ansfield
09efe18b61 Fixed "calling .set on destroyed object" error in tests after lock file maintenance
refs https://github.com/TryGhost/Admin/pull/2063

- `<GhFileUploader>` was using `.set()` inside a browser-level event handler but wasn't checking that the component hadn't been destroyed
2021-10-20 09:38:06 +01:00
renovate[bot]
c6a8ca3561 Update dependency liquid-fire to v0.32.0 (#2115)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:26:35 +01:00
Peter Zimon
24b51d7f77 Copy updates for Offers 2021-10-20 10:10:09 +02:00
Kevin Ansfield
93768ef678 Added navigation back to design settings index after activating uploaded theme
refs https://github.com/TryGhost/Team/issues/1149

- added a `@data.onActivationSuccess` option to the upload-theme modal that if present is called when activation of a theme is completed as part of the upload process
- added a `startThemeUpload()` action to the `change-theme` controller so that we can pass in an `onActivationSuccess` which transitions to the `design.settings.index` screen
- removed unnecessary `@tracked` decorators on class properties that have `store.peekAll('theme')` assigned to them
2021-10-19 19:43:36 +01:00
Kevin Ansfield
a5475f1519 Fixed re-upload of theme not working after deleting
no issue

- if a theme was uploaded with the same name as a previously deleted theme it was not being shown in the themes list, and if activated could not be found/seen as active breaking the design menu
2021-10-19 19:35:03 +01:00
Kevin Ansfield
6c14e1ea71 Removed matchHelper labs flag toggle
refs 981f11da95

- `{{match}}` is GA now and the flag doesn't exist server-side so it was always auto-toggling off in Admin
2021-10-19 19:25:23 +01:00
Kevin Ansfield
1172267e55 Added sidebar grow/shrink animation
refs https://github.com/TryGhost/Team/issues/1149

- beginnings of full sidebar animation, adding early to gauge impact of animation that causes layout paints for each frame
2021-10-19 18:30:05 +01:00
Kevin Ansfield
10176087f8 Fixed syntax error
refs d9c9818c73

- trailing `}` was lost when deleting functionality from the `design.settings` route class
2021-10-19 16:25:37 +01:00
Kevin Ansfield
d9c9818c73 Fixed custom theme settings disappearing when confirming leave-without-save
refs https://github.com/TryGhost/Team/issues/1149

- `customThemeSettings.rollback()` was not performing the correct job, changed to rollback attributes on each model rather than resetting everything to empty
- moved leave confirmation handling to the `settings.design.index` route so that it's always called when moving to the change-theme route, previously with the behaviour on the main `settings.design` route the willtransition/deactivate was not called when expected because that route is still active when on `settings.design.change-theme`
2021-10-19 16:22:16 +01:00
Sanne de Vries
7534dbc7a6 Updated general and custom theme settings design 2021-10-19 16:26:27 +02:00
Peter Zimon
7e28e2f173 Offer details screen refinements
- changed order of URL and description
- added "Read only" indication to discount info
- added default placeholder for URL field
2021-10-19 15:58:22 +02:00
Kevin Ansfield
977e4d55f4 Fixed design settings preview losing scroll position when changing settings
refs https://github.com/TryGhost/Team/issues/1149

- replicated the visible iframe's `scrollTop` to the hidden iframe before swapping visibility between them so the scroll position remains consistent even though the contents and frames are fully reloaded and swapped
2021-10-19 13:52:47 +01:00
Peter Zimon
552412d323 Added static prices to offers list 2021-10-19 14:11:22 +02:00
Kevin Ansfield
2158237566 Fixed font weight on active nav links in design sidebar
refs https://github.com/TryGhost/Team/issues/1149

- changed `current-when` for the design settings title to only be active on the index screen which corresponds to the setting groups being active/usable
- updated styles to use the `.active` class rather than just `:focus`
2021-10-19 12:07:56 +01:00
Kevin Ansfield
fb9b4b7957 Fixed linting error
refs e9911d5e20

- unused import was left over from earlier experiment
2021-10-19 12:06:22 +01:00
Kevin Ansfield
e9911d5e20 Added ctrl/cmd+s save on design settings screen
refs https://github.com/TryGhost/Team/issues/1149

- use ember-keyboard's `{{on-key}}` modifier to attach keyboard event listener when the design settings index screen is shown - ensures that ctrl/cmd+s on the change-theme screen won't trigger an unexpected save
- blur active element when saving so the preview is updated and reflects what has just been saved (text fields only update preview on blur)
2021-10-19 11:59:34 +01:00
Rishabh
21847b822c Fixed offer ui updating offer values directly on input change
no refs

- without marking input fields in template as `readonly` value, it updates the value directly on any change which is undesirable and causes side-effects in actual update of property
2021-10-19 13:39:16 +05:30
Rishabh
87742482fa Updated copy for archive offer confirmation popup
no refs
2021-10-19 13:38:10 +05:30
Rishabh
96ec828d04 Fixed offer tests
no refs
2021-10-19 13:21:11 +05:30
Rishabh
452ee8c3aa Refined offer detail screen
refs https://github.com/TryGhost/Team/issues/1162

- fixes decimal value for fixed type discount not working
- updates offer name placeholder to Display title
- removed default offer description value in portal preview
2021-10-19 13:08:31 +05:30
Rishabh
bab977c55c Fixed broken offer detail navigation on list screen
refs https://github.com/TryGhost/Team/issues/1162

- fixes link for offer detail on last column of offer row in list screen
2021-10-19 13:06:22 +05:30
Rishabh
eddeb07a52 Added error handling and validation for offer
closes https://github.com/TryGhost/Team/issues/1159

- validates offer fields before save client-side
2021-10-19 13:05:18 +05:30
Rishabh
54f5f659f7 Fixed preview iframe communication error messages
no refs
2021-10-19 13:03:23 +05:30
Rishabh
d88914ac0a Updated default offer duration as once
no refs
2021-10-19 00:19:32 +05:30
Rishabh
4e128a0bd0 Updated repeating duration offer for monthly cadence only
closes https://github.com/TryGhost/Team/issues/1126

- Offer duration can only allow multiple months for the monthly Cadence
2021-10-19 00:19:14 +05:30
Rishabh
b94bb836f5 Added redemption count for offers in list screen
closes https://github.com/TryGhost/Team/issues/1136
2021-10-18 23:46:45 +05:30
Kevin Ansfield
eda694b69f Add close of open section when clicking "Site design" nav heading
refs https://github.com/orgs/TryGhost/projects/51

- always reset the open section when the header link is clicked to collapse any open setting groups
2021-10-18 17:37:56 +01:00
Sanne de Vries
d7fefd70cc Animated design settings tabs open/close in side nav
Refs https://github.com/TryGhost/Team/issues/1149
2021-10-18 18:27:50 +02:00
Kevin Ansfield
6dd1d058e5 Added open/close animation for design settings sidebar groups
refs https://github.com/TryGhost/Team/issues/1149

- basic switch to `{{liquid-if}}` for animating the expand/collapse interaction
2021-10-18 17:24:17 +01:00
Kevin Ansfield
3f0dbb0e8b Added desktop/mobile toggle to view-theme screen
refs https://github.com/TryGhost/Team/issues/1149

- re-used same desktop/mobile toggle that the main design settings screen uses
2021-10-18 17:22:45 +01:00
Sanne de Vries
e0842183c0 Updated design settings and theme directory
Refs https://github.com/TryGhost/Team/issues/1149
2021-10-18 17:43:06 +02:00
Kevin Ansfield
8b5f62439d Fixed error when saving design settings when theme has no custom settings
no issue

- if there are no settings loaded then we shouldn't try to save an empty `custom-theme-setting-list` record because it will result in an invalid API request
2021-10-18 16:40:06 +01:00
Daniel Lockyer
d5448262e2 Merged v4.19.1 into main
v4.19.1
2021-10-18 15:10:55 +02:00
Daniel Lockyer
a5e6f934e9 v4.19.1 2021-10-18 14:09:16 +01:00
Peter Zimon
737db37175 Added Integrations as a subpage of Settings
- Restructured Admin so that Integrations becomes a subpage of Settings.
2021-10-18 14:47:59 +02:00
Kevin Ansfield
6a447a1598 🐛 Fixed "Send" publish type not being reset when closing publish menu
refs https://github.com/TryGhost/Team/issues/1151

- we were setting `emailOnly` on the publish menu component but not resetting it meaning when you re-opened the menu after previously selecting "Send" the menu would still show "Send" but the state was inconsistent because the underlying `distributionAction` property _was_ reset
- dropped setting `emailOnly` directly in favour of making it a computed property based on `distributionAction === 'send'` so we only have to worry about changing distribution action and everything else updates for us automatically
2021-10-18 13:24:59 +01:00
Rishabh
b8d1dc8deb Fixed offer screen portal preview height
refs https://github.com/TryGhost/Team/issues/1137

- adds dynamic height calculation based on portal events for offer portal preview
2021-10-18 17:54:33 +05:30
Kevin Ansfield
0619b10720 Added scroll-to-top when advanced theme settings is opened
refs https://github.com/TryGhost/Team/issues/1149

If you were part way scrolled through the themes list and you clicked the "Advanced" button, the installed themes list was displayed at the top of the scrollable element but the browser kept the scroll position so it looked like nothing happened.

- updated `toggleAdvanced()` action to scroll the main container to the top so that the installed themes list is immediately viewable when you use the button to open/navigate to it
2021-10-18 13:19:30 +01:00
Kevin Ansfield
db0fc23dee Animated "advanced" table open/close on change themes screen
refs https://github.com/TryGhost/Team/issues/1149

- switched to using `{{liquid-if}}` to get our standard open/close animation when the `showAdvanced` property is changed
2021-10-18 13:05:18 +01:00
Kevin Ansfield
9a0a98e64a Added "active" indicator and list themes in "active, default, ...rest" order
refs https://github.com/TryGhost/Team/issues/1149

- built a secondary list of themes that's decorated and sorted for display purposes
2021-10-18 13:02:35 +01:00
Kevin Ansfield
8e648420e8 Added Casper to the themes list
refs https://github.com/TryGhost/Team/issues/1149

- added Casper to the hardcoded official themes list with a ref of `'default'` so that the install theme process knows to process it differently
- updated the install-theme modal
  - removed the `willOverwriteDefault` getter because it's a path that can't be reached and is now handled differently
  - changed `installThemeTask` to only perform an activation when a default theme is passed in
2021-10-18 13:02:35 +01:00
Peter Zimon
4b9a6f59d8 Cleaned up router 2021-10-18 13:39:09 +02:00