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
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
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
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
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
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
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
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
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
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
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`
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
refs https://github.com/TryGhost/Team/issues/1084
- updates shareable offer link UI to to open directly instead of route
- calculates offer url from code and updates in link modal
- wires copy button on link modal
- removes route based link code for modal
refs https://github.com/TryGhost/Team/issues/1125
-- Email-only is not considered a general availability feature and can be used without special flags.
- It allows to publish a new post type "email only" that only goes out as an email newletter and is available through an undescoverable URL (does not appear anywhere publicly similarly to preview posts) on the site.
- The new "send" option in the post publishing menu allows to send this new type of post.
no issue
- CSS that was used to fix positioning of the dropdown menus on the labs theme list was too liberal. Fixed by adding a specific class for the theme list dropdowns
refs https://github.com/TryGhost/Team/issues/1111
- on saving, `customThemeSettings.settings` was set to the `hasMany` reference on the `customThemeSettingsList` model instance but the model is then immediately unloaded and the reference goes with it
- switched to using `.toArray()` on the hasMany so that we get a stable reference to the `customThemeSetting` model instances
refs https://github.com/TryGhost/Team/issues/1111
We now have a situation where we have modals on modals and we've lost the straightforward built-in "Data down, actions up" communication methods that we'd have workaround across nested routes/controllers. The upshot of that is we didn't have a way to trigger a refresh of the preview when a new theme was activated.
- moved the task responsible for fetching preview html from the design modal onto the `theme-management` service and adjusted it to set a tracked `previewHtml` property rather than updating an iframe directly
- added a `<GhHtmlIframe>` component that renders a basic iframe element and updates it's contents each time the `@html` argument changes
- updated design modal preview to use the new iframe component
refs https://github.com/TryGhost/Team/issues/1111
Extracted functionality for listing, downloading, activating, and deleting from the theme controller/template into separate components and services so that they are more composable/reusable in different situations.
- moved theme activation to a new `theme-management` service that uses the `modals` service to open the theme warnings modal or limits upgrade modal as required
- the activate process is a task so that consumers can store a reference to the task instance and cancel it to close any related warning/limit modals (eg, when navigating away from the route or closing the modal that kicked off the process)
- created new-pattern modals for custom theme limit upgrade, theme errors, and delete confirmation so that we can treat them as promises and close where needed from parent
- duplicated theme table component as `<GhThemeTableLabs>` with an actions redesign and a refactor to handle download, activation, and deletion itself making use of the new theme-management service and modals
- fixed some oddities with design modal's transition/modal close handling by simplifying the async behaviour and being more explicit
- added advanced design modal that contains the new theme table component and linked to it from footer of design modal's sidebar
no issue
- the method we used for copying text to the clipboard for older browsers has broken on some newer browsers
- the more modern `navigator.clipboard.writeText` API is now universally supported by our target browsers so we're able to switch to that instead which is working across the board
no issue
- pattern of downloading a file by creating an iframe and setting the `src` attribute was repeated throughout the codebase and was using a mix of native and jQuery patterns
- added a `utils` service for housing one-off utility methods like this to avoid repetition and mixed patterns becoming more widespread (we want to get rid of jQuery usage)
refs https://linear.app/tryghost/issue/CORE-71/email-only-posts-hand-off
- The piece of code was commented out with an intention of keeping an existing pattern of only calling post's save's when edits are done in the editor or PSM. The changes in the publishmenu should not effect the model and have a need to save it
- The side-effect that still needs to be sorted is the change to the 'saveType' is effecting a model and causes a confirmation modal when leaving the post screen
no issue
- appears to be left-over from copy/paste of an earlier screen re-structure
- cleaning up for easier extraction of functionality to new screens / modals
refs 37f721d76a
- change was missed from the previous commit 🤦🏻♂️ without it we don't get a modal reference back for managing confirmation and closing behaviour
refs https://github.com/TryGhost/Team/issues/559
When modals are re-used across the app it's annoying to have to remember the class names that it uses in every location it's used.
- added a `DEFAULT_MODAL_OPTIONS` object to the modals service that's keyed on the modal to be opened and contains any options that are repeated across every instance
- overrode the `modals.open()` method to merge in the default options before calling `super()`
- updated invocation points of shared modals to remove duplicated class name options
no issue
- opened modal was assigned to `this.customizeModal` but the rest of the code expected `this.offerModal` so correct closing behaviour wasn't gauranteed
refs https://github.com/TryGhost/Team/issues/1102
- we're not sure this should be a built-in default setting at the moment so dropping the (non-working) color picker from the template for now
- same feature can be implemented by themes via custom settings if they want to use a secondary color
refs https://github.com/TryGhost/Team/issues/1111
- added override of the `ember-promise-modals` container component so that it doesn't render the background element when `omitBackground` is passed as an option when opening the modal
- fixes the flicker by not having a dark background transition in whilst the white overlay modal is also transitioning in from transparent->opaque
refs https://github.com/TryGhost/Team/issues/1111
refs https://github.com/TryGhost/Team/issues/1103
- moved customize modal from a link on the design screen to the main design screen
- changed modal design to be a full-screen overlay with side bar that emulates standard Admin design
- added toggled groups of settings in sidebar
- added `{{set-has}}` helper for use in conditionals matching when a Set contains an object
- added grouping of theme settings
- dropped unfinished advanced/change theme modals
no refs
- selecting a tier in post access for a published post was also triggering a save which is not intended
- save should happen only for a draft post when changing tier for post access
no-issue
This adds the ability to apply complex filters to members, as well as to
perform bulk actions on the filtered set, including unsubscribing,
adding & removing labels.
no issue
- copy pasta for the general settings form meant that unsaved settings changes were rolled back when the form was destroyed meaning settings were lost when switching across to the theme settings tab
- rollback is handled higher up at the custom design modal so we don't need to handle it in the form
no issue
- `customThemeSettings.settings` was not being updated with the latest models after saving so `customThemeSettings.isDirty` was still reporting `true` even though the save had completed
closes https://github.com/TryGhost/Team/issues/1101
- added `d` param with the description value to the preview header
- updated description input to trigger preview update on blur
no issue
- using an `<a>` instead of a `<button>` meant that the anchor link's default behaviour was being triggered when clicked leading to the browser navigating back to the dashboard
no issue
- Overdue subscriptions: when a subscription is in overdue state, we'd like to inform the customers so that the owner is aware and can take action
- Exceeded limits:
- Show a warning when the members limit is exceeded so users are aware before trying to publish a post and hitting the limit
- Allow to redirect directly to a child route in the Ghost(Pro) app, so plan updates get easier
refs https://github.com/TryGhost/Team/issues/1097
- added `customThemeSettings.keyValueObject` which returns a plain object with setting values assign to the setting keys on the object
- updated customize modal's preview data generation to use `customThemeSettings.keyValueObject` to assign a JSON-stringified version to the `custom` param on the `x-ghost-preview` header
- updated theme settings `<Select>` component to call the passed through `updatePreview()` action when the value changes
closes https://github.com/TryGhost/Team/issues/1100
- fixes unsaved changes popup which was triggered due to incorrect price comparison on membership screen
- issue only happened if the stripe price entered translated to a decimal value as the price change check was parsing it as integer
refs https://github.com/TryGhost/Team/issues/1070
- split select form component into it's own component so it's cleaner when we get to additional setting types
- added change handler that updates the setting record's value when a new option is selected
- added `.isDirty` to the custom-theme-settings service so we can warn of unsaved changes and revert any changed values when needed
- added save of custom theme settings to the customize design modal's save routine
- added missing `notifications` service import to customize design controller
refs https://github.com/TryGhost/Team/issues/1070
- adds a `customThemeSettings` service that handles overall setting loading and saving to avoid components having to know any of the intricacies of the model setup
- adds `custom-theme-setting-list` model so that we can save multiple setting records as embedded relations
- custom adapter ensures requests go to the `/custom_theme_settings` base route as a `PUT` request
- custom serializer drops the default `models: []` wrapper in the save request data so the format matches the `PUT /settings` endpoint, then converts the response to look like a `custom-theme-setting-list` response
refs https://github.com/TryGhost/Team/issues/1045
- update of the preview was being triggered by the general settings tab rendering (copy/paste from branding setup) meaning the iframe reloaded when switching between general/theme tabs
- moved the preview update task into the `customize` modal so that it can be called by the general/theme settings components as needed
- moved initial preview rendering to the iframe registration method
no issue
After publishing and sending a post, if it was unpublished then scheduled again the post status would show "published and sent to x members" where `x` is the current number of members but that's incorrect because a post can only be sent by email once
- removed the "and sent to x members" message if a scheduled post has already been sent via email
refs https://github.com/TryGhost/Team/issues/1045
If the customize modal is open and you manually changed the URL, on navigating the modal would close and a transition to the manually entered URL would start but then you'd be transitioned back to `settings.design`.
The problem occurs because `beforeModalClose` is always called when the modal closes causing the redirect.
- added a `hasConfirmed` boolean that is set to `true` when leaving the customize route if there are no unsaved changes or the changes have been confirmed
- skipped the unsaved changes check and redirect in `beforeModalClose` when `hasConfirmed` is true
refs https://github.com/TryGhost/Team/issues/1045
- added tabs to the the customise design modal's sidebar for general settings and theme settings
- copied settings from the existing branding modal plus site description from general settings screen into the general settings tab
- theme settings tab left blank ready for static design
- `saveTask` put on the controller so that we can access it from the route, allowing us to pause modal closing when navigating away (implementation left for later)
refs https://github.com/TryGhost/Team/issues/905
- benefits were overridden with a secondary products query for segment select which did not have proper includes
- fixes includes for products when fetched for member segments
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Team/issues/1045
- removed need for `{{will-destroy}}` in the modal template by using `willTransition()` in the route that opened the modal instead
- used the property of new modals acting as promises to implement an unsaved changes confirmation modal
- added `confirmUnsavedChanges()` method that opens a "are you sure you want to leave?" modal that is treated as a promise. If the modal is closed by the "Leave" button the promise returns true in which case we rollback the unsaved changes. The modal is returned so that other behaviour can use this method and wait for the confirmation result
- added `willTransition()` route hook that calls `confirmUnsavedChanges()` when there are unsaved changes and will only continue to transition if the "Leave" button is pressed
- added `beforeClose()` hook to the customize modal when opening so that we can prevent the customize modal from closing when "Stay" is clicked in the confirmation modal
- updated `activate()` hook to store the modal instance so it can be closed later
- updated `deactivate()` hook to call `.close()` on the modal instance rather than using private data/methods on the modals service
refs https://github.com/TryGhost/Team/issues/559
Click-to-close and escape-to-close functionality in `ember-promise-modals` was deferred to `focus-trap`. For some of our use-cases that wasn't ideal because there was nowhere to hook in if we wanted to abort modal closing for any reason (eg, to show an unsaved changes confirmation)
- bumped the custom fork version of `ember-promise-modals` to allow all focus-trap close-inducing behaviour to be disabled
- also adds a `beforeClose()` option when opening modals for future use
- changed modals service options that are passed through to `focus-trap` so that all close-inducing behaviour is disabled
- when the first modal is opened add event handlers for clicks and <kbd>Escape</kbd> key presses that should close modals and manually call `.close()` on the top-most modal in the stack
- remove event handlers when the last modal is removed
refs https://github.com/TryGhost/Team/issues/1045
- added new `settings.design.customize` route
- used the route's `activate` and `deactivate` hooks to trigger and close the customize modal
- added `modals/design/customize` component that uses the existing branding modal design without it's contents as a base
- has `{{will-destroy}}` hook that transitions back to the settings screen so the route will update when the modal gets closed
refs https://github.com/TryGhost/Team/issues/1045
- added blank `/settings/design` route and associated screen
- redirects to settings index if associated labs flag is not enabled
- when custom theme settings labs flag is enabled, replaced Branding and Theme links with single Design link
refs https://github.com/TryGhost/Team/issues/1032#issuecomment-918554923
- the email recipient menu in publish menu was not correctly translating the tiers in specific tier selection when matching post level access
- in case of specific tier, visibility type on post is `filter` and the visibility filter data is in a separate field on post - `visibilityFilter`, so it got missed
refs https://github.com/TryGhost/Team/issues/559
- moved the modal component class, template, and sub-components into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to full glimmer syntax
refs https://github.com/TryGhost/Team/issues/559
- moved the modal component class and template into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to glimmer syntax
- moved route transition behaviour directly into the class to avoid weird route-action indirection
refs https://github.com/TryGhost/Team/issues/559
We want to get rid of our existing modals implementation because it doesn't play well with Glimmer compoments and the animation library it uses is now unmaintained and blocking our Ember.js upgrades.
- installed addon using customised fork
- fork allows passthrough of `allowOutsideClick` to `focus-trap` so we can allow clicks on dropdowns and other wormholed content inside of a modal
- extended the `modals` service locally so we can customise click-outside-to-close behaviour and tie in with our `dropdowns` service
- set up styles in `modals-new.css`, mostly copied from `modals.css` with a few specific overrides
- once all modals are converted we can drop the old `modals.css` and rename `modals-new.css`
closes https://github.com/TryGhost/Team/issues/1039
- we had duplicate components for members setting form, `gh-members-settings-form` and `gh-members-settings-form-cp`, with the `-cp` version added as part of original tiers changes
- since are only using the "-cp" version now, the old form is now removed and cp version renamed to the original naming
closes https://github.com/TryGhost/Team/issues/1032
- fixes the selected default access value for specific tier not shown correctly on admin
- the value was correctly saved and fetched, but the value shown got overridden by default product selection and only the first product was shown as selected value
- Update dependency ember-simple-auth to v4
- Removed `setup-session-service` initializer as it's no longer needed/present in v4
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
refs https://github.com/TryGhost/Team/issues/873
When we updated the UI to handle the default subscriptions for
Complimentary subscriptions, we didn't update it to use any of the data.
This updates the UI to share as much as possible for the display of
subscriptions information, and only diverges for the menus which have
different actions based on complimentary or not.
This should ensure that we keep the UI in sync for both types of Member.
* Hid Complimentary subscription CTA for members with one.
no issue
- Clicking on the Ghost(Pro) item in the navigation would always reload the billing management app and enforcing to fetch all data again, even tho it has been fetched and cached before
- This commit removed loc that replaces the iframe content every time we click on the button
- Renamed `setBillingWindowOpen` to `toggleProWindow` as it's more accurate in its description
- Removed `closeBillingWindow` as it's unused throughout the app
no issue
Pages can not be sent by email so by hiding email-specific cards when editing pages we can reduce confusion and clutter.
- added a `@postType` argument to editor components that can be passed through to sub components
- set `@postType` to `post.displayName` which is either `post` or `page`
- updated `{{card-is-available}}` helper to compare a `postType` property on card menu items to the passed in `postType`
no refs
- when a site has no labels, the bulk action on labels - add/remove - was throwing an error
- fixes the bug and adds disabled state for add/remove label bulk action UI
no refs
- resets filter columns on list when query params are removed from the url via sidebar click transition
- reloads the updated list on new bulk actions on the filtered list
refs https://github.com/TryGhost/Team/issues/963
- when changing the filter block to a filter type which has default value, previously the members list was not reloaded
- updates members list on switching filter types with default value
closes https://github.com/TryGhost/Team/issues/1026
Tiers are now moved up to beta features in the labs section on Admin via early-access opt-in flow, so there is no need for it anymore in alpha section.
refs 107ed0e1f3
- save shouldn't be happening here as it means unexpected changes could be saved to published posts without the user's consent
- save is related to a labs feature so it should have been behind a labs flag
no issue
- Grammarly is a suspect in some reported editor errors but it's usage hasn't been available inside of Sentry to know for sure
- when the grammarly extension is present it adds a `data-gr-ext-installed` data attribute to the `body` element, we now use that to add a `grammarly: true/false` tag to error reports so we can more easily track down the cause of editor bugs
refs https://github.com/TryGhost/Team/issues/1026
Tiers is being released as a beta feature with an early-access opt-in flow. Site owners can now opt-in for early access to Tiers feature in Ghost by enabling it from the Beta features section, but note it's a one way door and its not possible to switch it off once enabled. This is to ensure that sites don't break in any unexpected ways once the tiers feature is enabled by switching it off.
Refs.
7394df6137e52bdf88f9
We have temporarily disabled Stripe disconnect for Administrators to avoid hitting an API endpoint.
Now that the API is updated, disconnect is re-enabled for Owner and Admins.
refs https://github.com/TryGhost/Team/issues/972
If a filter is applied in the new members list then the URL gets updated and the filter dropdown contains the filters that have been created. When refreshing the page while a filter is applied, the URL remains the same, the filter is still applied but the UI in the filter dropdown resets and doesn't show the appropriate filter fields and values.
This change parses the nql filter from URL using `nql-lang` library and rebuilds the filter UI blocks based on current filter in URL. It also ignores any invalid or unexpected filters in the UI.
closes https://github.com/TryGhost/Team/issues/977
A new label input dropdown was added behind filtering labs flag along with new filtering UI on members list screen, which includes member editing directly via the dropdown. This adds the same editing function to the members detail screen too behind the flag
Updated empty state of members detail screen.
- Added appropriate messaging to Analytics, Events and Subscriptions blocks about what's supposed to be in them once there's sufficient data.
- Updated tooltip for average open rate when there isn't significant data yet.
no issue
- wrapped dropdown options in an options group so the heading can provide more context
- fixed styling so there isn't double padding around grouped options
closes https://github.com/TryGhost/Team/issues/1028
Bulk operations - add/remove label, unsubscribe - were added to filtered members list behind filtering labs flag as part of introducing filtering on members list. This handles the success/error response on bulk operations and shows them in the popup similar to delete bulk operation.
closes https://github.com/TryGhost/Team/issues/975
Clicking on label edit in filtering menu was also causing label to be selected in the dropdown, which also caused members list to live reload. This change fixes the edit behavior by not selecting the label to be edited in the dropdown
closes https://github.com/TryGhost/Team/issues/971
reverts abe5c6d681
We use vertical-collection to allow infinite loading + scrolling for members list instead of loading and rendering all members at once. The behavior was not working correctly with updated list for filtering feature, as we dynamically update columns. This change fixes the scroll behavior and members loading together by updating the containerSelector for vertical collection.
closes https://github.com/TryGhost/Team/issues/976
Dropdown's `onClose` action was previously fired from the `close` function instead of when the actual close happened when animation ended for dropdown close. Also, the `close` action of dropdown is fired irrespective of dropdown is open, as we close all dropdowns and menus whenever a new transition happens, so it caused flicker on the screen.
refs https://github.com/TryGhost/Team/issues/963
- updates the list when either the relation or value changes for a filter row.
- only filter rows with value are used
- consistent behavior for "apply all" and "reset all"
- `Enter` and `onFocusOut` behavior for rows with text values
refs https://github.com/TryGhost/Team/issues/993
The new editor card allows you to add styled content along with an optional button that will only be visible to free or paid members when the post is emailed. Useful for encouraging free members to sign up to a paid account for example.
- removed labs flag and conditionals to make the feature is available by default
- cleaned up CSS that re-used the `.email-card` class or was referencing `labs`
refs https://github.com/TryGhost/Team/issues/874
- when hit with focus on last non-empty benefit field, previously the new benefit automatically showed error for empty field. This change refines behavior to only show error when user tries to click "Enter" again when already on last empty benefit
- also cleans up the duplicate add benefit call
- Updated Portal preview in Membership settings and Portal settings so that the preview is scrollable in all browsers.
Note: Only when Tiers is turned on.
refs https://github.com/TryGhost/Team/issues/1008
To update a snippet, select the content in the editor that you want as your snippet text and click the snippet icon as per creating a snippet. Once the snippet name input shows, start typing the name of an existing snippet to be able to select it for update.
- replaced main snippet input component with the labs component
- removed the feature flag and associated labs screen toggle
- removed original/labs snippet input conditional in the editor
refs https://github.com/TryGhost/Team/issues/954
- When an email-only post with a "sent" status was edited, it's status changed to "draft", which is an incorrect behavior. This change is causing the "sent" status to persist and removes the transition error.
refs https://github.com/TryGhost/Team/issues/884
Drop-to-upload functionality was lost in the first version of the new feature image uploader inside the main editor area, this adds it back in.
- fixed dropzone flickering issue by switching the event listeners to the capture rather than bubble phase so we can indicate a drag is occurring on the body without each individual drag/drop handler needing to know about it
- moved the event handler init/cleanup to the `ui` service
- moved the event handler init call to the application service as it no longer requires auth to have occurred for access to the labs flag setting
- removed the `featureImgDragDrop` labs flag