Commit Graph

7730 Commits

Author SHA1 Message Date
Kevin Ansfield
d63cfa472f Fixed design nav open/close icon misalignment
no issue

- icons seemed to disappear when sections above are opened, or they lost attachment when scrolling
- added `position: relative` to the nav item container so the `position: absolute` children are correctly contained
2021-10-13 12:47:33 +01:00
Kevin Ansfield
8e10d38d1f Added .active class to design nav items when open
no issue

- matches nav items that use `<LinkTo>`
- fixes sections headers going in and out of bold styling whilst interacting with the menu/forms
2021-10-13 12:42:25 +01:00
Kevin Ansfield
2476aff3d7 Forced close of design sections when clicking "Change theme" link
refs f9a2626ae4

- nav menu felt inconsistent where clicking a section nav item closes all other sections but clicking the change-theme nav item didn't
2021-10-13 12:33:15 +01:00
Kevin Ansfield
51efc0765d Improved rendering/re-rendering of <GhHtmlIframe>
no issue

There was noticeable flickering as content is loaded into the iframe or re-rendered because we show everything from the moment html is injected in, meaning the full loading and layout process is shown.

- changed to using two iframes with one being hidden
- when `@html` changes we inject the html into the hidden iframe
- once all loading finishes on the hidden iframe (or 500ms timeout occurs to account for slower connections) we swap the iframe visibility so we end up switching between two fully (mostly) rendered displays resulting in much less flicker
2021-10-13 12:21:53 +01:00
Sanne de Vries
34e4add038 Updated advanced section on new themes page 2021-10-13 12:59:49 +02:00
Kevin Ansfield
d8bdd45add Added current theme display to design screen nav sidebar
no issue

- fetch themes in the background when sidebar is rendered in case they haven't been loaded so far (current screen design means the first time the nav bar is seen the themes are unlikely to have been loaded already)
- added `activeTheme` getter to grab the active theme from the live themes list
2021-10-13 10:39:23 +01:00
renovate[bot]
f08bf3cd7a Update dependency @tryghost/members-csv to v1.1.7 (#2100)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-13 09:12:34 +01:00
Kevin Ansfield
f9a2626ae4 Changed design menu to only show one open section at a time
no issue

- we want the menu to feel more like a typical navigation sidebar
2021-10-13 09:11:57 +01:00
renovate[bot]
852732b232 Update dependency @tryghost/limit-service to v0.6.4 (#2094)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-13 08:55:22 +01:00
Sanne de Vries
d4cb6d019e Updated design settings sidemenu 2021-10-12 19:14:17 +02:00
Kevin Ansfield
569e4576d5 Added install+activate process to view theme screen
closes https://github.com/TryGhost/Team/issues/1130

- migrated install theme process to new modal system and changed to install+activate
- added "Use theme" button that opens the new install+activate modal
- when the view theme screen opens the install modal, an `onSuccess` callback is passed which sets a property that will skip closing the install modal when the view theme modal is closed and transitions to the `settings.design` route leaving the "success" modal state on screen
- added a `skipErrors` option to `themeManage.activateThemeTask` so that it can be used from processes that already handle theme errors without opening extra modals on top
2021-10-12 16:47:44 +01:00
Kevin Ansfield
342d9a242c Converted <GhLoadingSpinner> to glimmer component
no issue

- allows for attributes such as class/style to be set on it's container for better display in varying situations
2021-10-12 16:47:44 +01:00
Sanne de Vries
5a048c105e Fixed color picker and image uploaders in design settings 2021-10-12 16:37:30 +02:00
Kevin Ansfield
3f7cdb34d9 Added auto-check of match helper flag when enabling custom theme settings
no issue

- custom themes settings isn't really usable without the `{{match}}` helper so to help avoid confusion we'll now enable it whenever the custom theme settings flag is enabled
- added `requires` array to the feature definition which when set will enable all flags in the array when the main feature is enabled
2021-10-12 15:33:03 +01:00
Kevin Ansfield
3477be5974 Removed hardcoded style from design settings index
no issue

- by using flex display on the outer container we can get rid of the hardcoded height calc style and let the browser handle the layout more naturally
2021-10-12 15:23:55 +01:00
Kevin Ansfield
8ec5b83097 Fixed save button on design settings screen
refs https://github.com/TryGhost/Team/issues/1130

- when moving the design settings screen from a modal to normal routes the save process was misplaced and the template not updated
- moved all the design settings behaviour over to the index controller where it belongs and updated the template to use `this.saveTask` rather than `@data.saveTask` as was used in the modal
2021-10-12 15:19:27 +01:00
Kevin Ansfield
265a19f550 Added initial view-theme modal for installing from themes list
refs https://github.com/TryGhost/Team/issues/1130

- added new route for viewing themes so back/forward buttons can be used
  - takes theme name as a parameter
  - opens a fullscreen modal with an iframe containing the theme demo
- changed installable themes list to link to new route
- swapped `previewUrl` in theme data to point at the real demo rather than the ghost.org demo page
2021-10-12 14:28:05 +01:00
Sanne de Vries
87c3a0a359 Fixed upload theme button style 2021-10-12 15:01:20 +02:00
Kevin Ansfield
c01c2b3c74 Fixed theme's list not auto-updating on upload
no issue

- the ember data live record array needs to live on a tracked property rather than a getter for the template to auto-update
2021-10-12 13:51:11 +01:00
Sanne de Vries
c721bb3b1f Updated design settings sidemenu 2021-10-12 14:30:12 +02:00
Rishabh
aefc762a20 Added offer urls to email cta card
refs https://github.com/TryGhost/Team/issues/1134

- allows site owners to easily include offer URLs in their email CTA
- will be updated to include active offers only
2021-10-12 17:03:45 +05:30
Naz
93893fe7f1 Fixed 'Publish & Send' CTA in page publish menu
https://linear.app/tryghost/issue/CORE-100/publishandsend-text-visible-on-page-publish-menu

- Page publish menu should not have any knowledge about "email-only" posts, the text in the publish menu should never show any variation of the "send" option.
2021-10-12 12:32:39 +02:00
Kevin Ansfield
924da56c94 Moved theme table to change-theme screen and dropped advanced screen
refs https://github.com/TryGhost/Team/issues/1130

- match latest design where the theme table is under an "advanced" toggle on the change-theme screen rather than a completely separate screen
2021-10-12 10:18:55 +01:00
Kevin Ansfield
4fa13bfa9f Fixed capitalization of API and CTA in theme setting labels
no issue

- added `{{humanize-setting-key}}` helper that uses the base `humanize` output but then forces capitalization for known acronyms
- updated `<CustomThemeSettings::Select>` to use the new helper
2021-10-12 10:11:24 +01:00
Kevin Ansfield
d3539655a0 Fixed empty setting groups showing in nav bar
refs bc5be1a808

- after removing duplication for groups in the template we were showing empty groups because the group construction wasn't considering there may be no settings for a group
2021-10-12 09:13:14 +01:00
renovate[bot]
d12090cc14 Update dependency @ember/render-modifiers to v2 (#2105)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-12 08:30:15 +01:00
Kevin Ansfield
fee190eb08 Removed unneeded customThemes limit check
no issue

- the first check when uploading a theme is the same as the second but without returning a specific error message so it shouldn't be necessary
2021-10-12 08:27:25 +01:00
Kevin Ansfield
bc5be1a808 Removed template duplication for custom theme setting groups
no issue

- added `settingGroups` array to the nav menu so that it can be looped over rather than having the same template duplicated for hard coded settings arrays
2021-10-12 07:54:34 +01:00
Kevin Ansfield
ddac463514 Fixed custom theme settings not showing in groups
no issue

- custom theme model was missing the `group` attr so the nav menu couldn't see it to assign to groups
- changed homepage group from `home` to `homepage` to match gscan
- added fallback to showing in the "Site-wide" group if an unknown group value is seen
2021-10-12 07:36:03 +01:00
Kevin Ansfield
b2177e636e Fixed enter key not triggering confirm action in delete theme modal
no issue

- added missing key handler
2021-10-12 07:26:18 +01:00
Kevin Ansfield
1d0cd80158 Added basic reset to design preview on nav bar interaction
refs https://github.com/TryGhost/Team/issues/1130

- when opening/closing sections or interacting with the general design or custom theme settings we want to switch back to showing the preview so the sidebar acts more like typical navigation and so form changes show their effect
2021-10-11 21:09:42 +01:00
Kevin Ansfield
870cf94b7a Fixed linting error
refs 13f9cb85fa

- `[i]` was left over after switching from `for` to `forEach()`
2021-10-11 19:36:58 +01:00
Kevin Ansfield
13f9cb85fa Refactored theme upload process and linked from design screens
refs https://github.com/TryGhost/Team/issues/1130

- copied theme upload modal to new modals system and refactored for Octane syntax
  -  updated to use `themeManagement` service rather than passed in actions so the modal-based process can be opened from any screen
  - added default `beforeClose()` for the modal to the modals service so it won't close if an upload is in-progress (defaults were moved directly into the class so it had access to services)
- added `themeManagement.upload` action for triggering the upload modal and providing a central place for limit checks
- added upload-triggering buttons to change-theme and advanced design screens
2021-10-11 19:30:58 +01:00
Kevin Ansfield
3345920f29 Removed unused beforeModalClose method on design route
refs 595018098d

- method removal was missed when switching from modal to standard route
2021-10-11 17:43:59 +01:00
Kevin Ansfield
42e493bb81 Initial pass at new change theme screen
refs https://github.com/TryGhost/Team/issues/1130

- added link to design sidebar
- dropped change-theme modal and associated route behaviour
- copied basic themes marketplace list into the change-theme controller/template
2021-10-11 17:14:18 +01:00
Kevin Ansfield
595018098d Switched design screen from modals to standard routes
refs https://github.com/TryGhost/Team/issues/1130

- added `ui.contextualNavMenu` property that when set will switch the main nav menu between components, if it's not set then it will show the default "main" menu component
- added `design` menu sub-component of `gh-nav-menu` ready for use via `contextualNavMenu`
  - moved sidebar contents from the design modal into this component
- updated design route to set/reset `ui.contextualNavMenu` to `design` on entering/leaving the route
  - all other design routes are sub-routes so this works across all other design screens
- moved base design modal preview into the `settings/design/index` controller/template
  - using index means that it's the default screen for `/settings/design` but will be automatically replaced by any other `design.x` routes
- moved `design/advanced` modal content into the `settings.design.advanced` controller/template and removed the modal handling from the route
2021-10-11 15:24:46 +01:00
Kevin Ansfield
7eda410dc3 Fixed html attributes not showing in design settings preview
no issue

- by using `innerHTML` we were missing the lang and class attributes on the `<html>` element that are added by themes, breaking things like dark mode
- switching to `outerHTML` includes the `<html>` element and is handled automatically by iframes when writing to the `contentWindow`
2021-10-11 15:03:49 +01:00
Sanne de Vries
de5674ebd4 Updated design page
Refs https://github.com/TryGhost/Team/issues/1130
2021-10-11 15:13:16 +02:00
Kevin Ansfield
717eb762f6 🐛 Fixed inability to re-schedule a scheduled post
closes https://github.com/TryGhost/Team/issues/1112

- when the scheduled post publish menu component was converted to a glimmer component one of the properties in a conditional was missed when changing from `this.x` to `this.args.x` meaning that every time the menu was clicked the published at time was reset as if the save type was being changed
2021-10-11 10:30:12 +01:00
renovate[bot]
0932abcb6d Update dependency ember-simple-auth to v4.0.2 (#2103)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-11 09:34:26 +01:00
renovate[bot]
9af08b2f39 Update dependency @sentry/ember to v6.13.3 (#2104)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-11 09:34:02 +01:00
Rishabh
b55ff582b8 Fixed offer tests
no refs

- adds new product fixtures
- allows loading of products data for offers page
2021-10-11 13:52:42 +05:30
Rishabh
0459a1ca23 Removed rogue unsaved change model for new offers
refs https://github.com/TryGhost/Team/issues/1126

- adds default properties of offer to a separate object to avoid unnecessary unsaved change modal on new offer and back
2021-10-11 13:33:30 +05:30
Rishabh
bfcd0b9ebd Removed unused interval field on offer modal
no refs
2021-10-11 13:03:38 +05:30
Daniel Lockyer
deef182bd2 v4.18.0 2021-10-08 16:00:25 +01:00
Rishabh
dd0ecf75b9 Added basic acceptance tests for offers
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085
2021-10-08 19:45:48 +05:30
Rishabh
1107465398 Added new enable labs flag helper for tests
no refs

- allows easily enabling alpha features for tests
2021-10-08 19:45:07 +05:30
Rishabh
756bd2bdb5 Fixed cadence selection for offers
no refs

- fixes double selection needed for cadence on offers detail screen
2021-10-08 19:24:28 +05:30
Rishabh
7ef2b08883 Fixed offer percentage amount not getting set
no refs
2021-10-08 19:15:56 +05:30
Rishabh
4bbbea29ed Refined fixed discount type amount UI
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085

- uses price helper to show Stripe amount instead of manual calculation
2021-10-08 18:50:18 +05:30