Commit Graph

3595 Commits

Author SHA1 Message Date
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
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
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
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
Peter Zimon
a78afb5749 Added Staff as subpages of Settings
- The Admin is being restructured with Offers. This commit moves Staff under Settings.
2021-10-18 13:27:42 +02:00
Sanne de Vries
31182c4dcf Refined design settings navigation
Refs https://github.com/TryGhost/Team/issues/1149
2021-10-18 12:54:09 +02:00
Rishabh
bb575dbb87 Added portal preview to offer screen
refs https://github.com/TryGhost/Team/issues/1137

- adds new portal preview using portal offer url on offer screen
- adds new utility to calculate portal offer preview url from data
- fixed tiny bug with discount type currency not shown correctly
2021-10-18 14:31:29 +05:30
Sanne de Vries
9120f0d820 Updated design settings navigation 2021-10-15 17:59:52 +02:00
Kevin Ansfield
94c3163834 🐛 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-15 16:45:58 +01:00
Kevin Ansfield
847aabd5f4 Fixed error when calling hasOwnProperty on null/undefined when saving posts
refs 89a6bc683b

- `options` did not have a default value and it's always passed in. Added a default value of an empty object so we're not tripped up with null/undefined
2021-10-15 15:49:19 +01:00
Kevin Ansfield
89a6bc683b 🐛 Fixed incorrect publish type showing in publish menu after close/re-open
closes https://github.com/TryGhost/Team/issues/1151

The publish-type state was being set directly on the model in the publish menu rather than being internal to the menu until publishing. A previous attempt had been made to fix that but it wasn't complete and resulted in the menu showing that it would "Publish" after setting it and closing/re-opening when in fact it would "Publish and send".

- moved all state for the distribution type and email settings to be stored in the `<PublishMenu>` component rather than split across the the component and model
- when saving a post from the publish menu, we now pass `emailOnly` as an option to the editor's save task the same as `sendEmailWhenPublished` (corresponding to the `email_recipient_filter` query param) so that we're back to one place controlling email behaviour for a post
- when `emailOnly` is passed as an option to the editor save task it will set the property on the model before saving and reset it back if the save fails. That way the email-only flag behaves as close to the "send when published" flag as possible without it also being sent as a query param.
2021-10-15 15:42:32 +01:00
Peter Zimon
be5ef010a5 Offers archive/active refinements
- added empty archive screen
- added indication of archive offer on detail page
- set default dropdown style to non-selected
- removed archive button for new offers
2021-10-15 12:49:42 +02:00
Rishabh
7f2e32d9a5 Fixed incorrect cadence selection for offer details
no refs

Incorrect cadence was shown selected in dropdown for percent type offers as the `currency` for offer was saved as null.
2021-10-15 12:34:35 +05:30
Kevin Ansfield
53bdb5720f Added support for image custom theme settings
refs https://github.com/TryGhost/Team/issues/1109

- added `<CustomThemeSettings::Image>`  component that is displayed for any custom theme settings with the type `'image'`
2021-10-14 18:43:04 +01:00
Sanne de Vries
aeafe91ea1 Updated design settings page 2021-10-14 18:01:12 +02:00
Sanne de Vries
4684ee3cac Fixed Alto theme not displaying in directory 2021-10-14 17:58:44 +02:00
Kevin Ansfield
9eb2832cd2 Fixed all settings appearing in home and post groups
refs f4596a0add

- when extracting the groups code from component to service some variable names were changed but the assignment was missed meaning we were assigning all settings rather than specific group settings to each `group.settings` array
2021-10-14 16:58:17 +01:00
Peter Zimon
0b846e4909 Fixed spacing between offers list and footer 2021-10-14 17:15:40 +02:00
Peter Zimon
7a26051439 Moved offers active/archive filter to view actions bar 2021-10-14 17:14:27 +02:00
Peter Zimon
2234b04a56 Fix form group bottom margins 2021-10-14 17:11:29 +02:00
Kevin Ansfield
94ca66cde5 Fixed design settings browser preview missing site title and icon
no issue

- when copying the template parts out of `<GhSitePreview>` the template was left pointing to passed in arguments rather than pulling the data from the settings service
2021-10-14 15:58:29 +01:00
Kevin Ansfield
54ae6902b3 Removed support for empty colors in custom theme settings
refs https://github.com/TryGhost/Team/issues/1107

- allowing empty colors introduced some edge cases around theme usage and default values
- it makes more sense to force a color setting to always have a color, if a theme wants to make usage of that color optional then it should use a separate boolean or select setting to control that
2021-10-14 15:53:14 +01:00