Commit Graph

7830 Commits

Author SHA1 Message Date
Daniel Lockyer
f28769014c Added codecov.io coverage uploader to CI
refs https://linear.app/tryghost/issue/CORE-74/improve-the-test-situation

- this commit:
  - adds the `ember-cli-code-coverage` dependency to collect
    coverage from ember tests
  - enables the `COVERAGE` env variable in CI
  - merges coverage data because tests are run in parallel
  - adds the codecov GitHub Action into CI so we can upload
    coverage reports
2021-10-21 10:37:03 +02:00
Rishabh
e69ac92967 Added offer details in member detail subscription box
refs https://github.com/TryGhost/Team/issues/1087

- associates a member with their offer redemptions by highlighting offer used for their subscription
2021-10-21 12:56:43 +05:30
Kevin Ansfield
1593eed79a Closed advanced theme settings when leaving change-theme route
refs https://github.com/TryGhost/Team/issues/1149

- uses `willTransition` action rather than `deactivate` hook because we also want to close the table when navigating to the theme demo child routes
2021-10-20 20:54:15 +01:00
Rishabh
7f221b4474 Fixed 2 decimal places for fractional offer amounts
refs https://github.com/TryGhost/Team/issues/1162
2021-10-21 00:34:02 +05:30
Kevin Ansfield
09fcdc3629 Reset homepage/post and mobile/desktop selects when leaving design screen
refs https://github.com/TryGhost/Team/issues/1149

- it felt unexpected for state to be remembered when moving around the design/settings screens
2021-10-20 17:35:03 +01:00
Sanne de Vries
31b6c9d4c9 Fixed image-delete icon margin bug 2021-10-20 17:07:22 +02:00
Kevin Ansfield
86c5d14145 Fixed re-render (+ potential jump) of theme settings menu on save
refs https://github.com/TryGhost/Team/issues/1149

- `customThemeSettings.{settings,settingGroups}` are arrays with references to Ember Data model instances, those instances will automatically have updated properties on save so there's no need to completely re-build the settings and settingGroups lists that were forcing a re-render of the same data
2021-10-20 16:06:21 +01:00
Sanne de Vries
2c648fda34 Added dropdown arrow to custom settings select component 2021-10-20 16:57:37 +02:00
Sanne de Vries
3f642eeb7c Updated design settings page
- Changed modal copy
- Increased menu transition speed
- Updated sidenav tabs visually
2021-10-20 16:44:54 +02:00
Rishabh
01afeaa90e Fixed offer tests
no refs

- adds default tier to a offer factory
2021-10-20 18:44:38 +05:30
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