Commit Graph

7687 Commits

Author SHA1 Message Date
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
Kevin Ansfield
0b267098ea Added support for text custom theme settings
refs https://github.com/TryGhost/Team/issues/1109

- added basic `<CustomThemeSettings::Text>`  component that is displayed for any custom theme settings with the type `'text'`
2021-10-14 15:40:22 +01:00
Kevin Ansfield
f4596a0add Fixed design menu re-rendering and losing input focus on first change
no issue

- `get settingGroups()` was always returning a new object which meant the template was re-rendering unexpectedly which created issues with form fields that lose their focus when re-rendered
- moved group handling into the `customThemeSettings` service as it makes more sense to keep it centralized, that gave us the ability to create a new `settingGroups` array only when the settings list changes keeping the tracked invalidation easier to reason about
2021-10-14 14:15:11 +01:00
Kevin Ansfield
122e9869ad Removed erroneous uploader error blocks in non-upload form groups
no issue

- looks like a copy/paste mistake, the code wouldn't do anything in those positions as there is no `uploader` variable present
2021-10-14 11:41:35 +01:00
Sanne de Vries
e4c10cbe6c Updated theme directory and theme preview 2021-10-14 12:39:54 +02:00
Kevin Ansfield
a6a9ecad22 Fixed double error message shown for site title when it's too long
no issue

- removed the duplicated `<GhErrorMessage>` that is shown when the site title is too long
- removed confusing double `class` attribute on general settings form field, browsers were only respecting the latter class attribute
2021-10-14 11:39:07 +01:00
Kevin Ansfield
869cc9d47a Added support for color type custom theme settings
refs https://github.com/TryGhost/Team/issues/1107

- uses the same type of color picker used elsewhere in Admin with some minor changes to allow blank values
  - when value is blank it adjusts the background color block to have a border and a diagonal red line to represent no color being present and makes the native color picker that sits on top transparent because native color pickers _always_ have a color
  - has it's own invalid handling/display because we're not dealing with a model that has our typical validation at the moment
2021-10-14 10:36:02 +01:00
Kevin Ansfield
19d6d3f9e5 Fixed selection of latest post in design settings preview
no issue

- we were sorting by `created_at` when fetching an individual post rather than the intended `published_at` column
- `.sortBy('publishedAtUTC')` didn't work as intended because the raw values are not directly comparable, switched to a manual sort by using `.valueOf()`
2021-10-14 10:36:02 +01:00
Rishabh
2645bb895c Updated copy for archive/reactivate offers
refs https://github.com/TryGhost/Team/issues/1148
2021-10-14 00:53:31 +05:30
Kevin Ansfield
9d38a0a1e1 Added support for boolean custom theme settings
refs https://github.com/TryGhost/Team/issues/1106

- removed `'string'` from the `attr()` definition for `customThemeSetting.value` so that we're not coercing the value from the API into something that doesn't work when applied to the `checked` attribute on checkbox inputs
- added initial `<CustomThemeSettings::Boolean>` component and used it for display in theme setting forms when `type === 'boolean'`
2021-10-13 17:55:17 +01:00
Rishabh
88049f1692 Updated offers list to filter on archived offers
refs https://github.com/TryGhost/Team/issues/1136

- adds dropdown for active/archived offers selection
- wires active/archived offers on list screen to API
- filters offers list on archived/active based on selection
2021-10-13 21:23:30 +05:30
Rishabh
667a4b6e78 Added (un)archive button to offer detail screen
refs https://github.com/TryGhost/Team/issues/1136

- adds option to archive/unarchive an offer
- adds new modals for confirmation of archive or unarchive of offer
- wired (un)archiving of offers to API
2021-10-13 21:23:30 +05:30
Kevin Ansfield
2f5db5721d Added all official themes to the new change theme screen
no issue

- added details to the `marketplaceThemes` array in the `change-theme` controller
- added theme images obtained from https://ghost.org/themes/
2021-10-13 16:36:26 +01:00
Kevin Ansfield
a339f4d6be Fixed linting error
no issue

- removed random editor-inserted import
2021-10-13 16:13:41 +01:00
Kevin Ansfield
24507ac5cc Added preview page selector to design settings screen
closes https://github.com/TryGhost/Team/issues/1103

Custom post settings can be grouped by homepage or post, when set to `'post'` it makes sense to be able to preview a post page rather than the homepage.

- added preview type selection to `themeManagement` service
  - `.availablePreviewTypes` is useful for populating selects or other page selection elements
  - `.previewType` is set to the currently selected preview type name
  - `.setPreviewType()` is for setting the preview type and re-generating the preview html if necessary
- updated `themeManagement.updatePreviewHtmlTask` to fetch the latest published post if we don't already have a published post reference in the store, that post's `url` is then used when fetching the preview html if the preview type is set to `'post'`
- added a select element to the design index header that uses the themeManagement properties/actions to list types and update the preview on change
- updated the design nav menu to switch preview types when different sections are opened so the preview automatically switches to the post preview when making changes to the "post" custom theme settings group
2021-10-13 16:07:01 +01:00
Sanne de Vries
ede7ef12fa Added footer link to Marketplace in theme directory 2021-10-13 16:40:46 +02:00
Sanne de Vries
917d96efcb Fixed double scrollbar on mobile preview 2021-10-13 16:06:49 +02:00
Sanne de Vries
5767fe0f43 Fixed responsive icons in theme preview not displaying in Chrome 2021-10-13 15:59:14 +02:00
Sanne de Vries
67fa946bff Updated theme preview page 2021-10-13 15:33:53 +02:00
Sanne de Vries
2c173e6212 Updated copy for theme-install modals 2021-10-13 14:57:39 +02:00
Kevin Ansfield
7c2ba1c242 Wired up desktop/mobile toggle on design settings screen
no issue

- ensured that we're only swapping classes on existing elements or inserting/removing elements around the iframe to avoid re-rendering and the associated loading+layout flash
2021-10-13 13:22:49 +01:00
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