refs https://github.com/TryGhost/Team/issues/609
There's a 3 second timeout before a background save is triggered after the last edit, if the preview modal is opened in that timeframe it would show outdated content.
- added a task that is triggered when the preview modal is opened
- if a save task is already running it will wait for it to finish
- otherwise if the post is a draft and the editor has dirty attributes it will trigger a save
- modal shows a loading spinner whilst waiting for the save to finish so the preview contents always match the latest editor changes
no issue
- when switching from the user-specific `feature.launchComplete` flag to the global `settings.editorIsLaunchComplete` there was a missed replacement of `feature`->`settings` in the dashboard logic for showing "start creating content" CTA, resulting in it being always shown
- removes `launchComplete` feature flag setup on user which was used earlier for launch complete behavior
no issue
- when switching from the user-specific `feature.launchComplete` flag to the global `settings.editorIsLaunchComplete` there was a missed replacement of `feature`->`settings` in the dashboard logic for showing the members activity feed
refs https://github.com/TryGhost/Team/issues/1121
- adds error reporting for `notifications.showAlert()` in addition to `notifications.showAPIError()` because the former is used for some handled errors but will still show the undesired red error bar
- adds `shown_to_user` tag to all reported errors. Only errors that result in the red error bar will be reported with the tag as `true`, there may still be cases where we display errors outside of the red error bar but those wouldn't make it to Sentry either, we'll need a full audit of Admin source to find those situations and handle the reporting manually
- adds `ghost` context to errors that are shown in the red bar
- `ghost_error_code` - code returned from the API or passed manually through the `notifications.showAPIError()` options argument. Will be filled in once the error message has been audited+approved
- `displayed_message` - the full error message displayed to the user. Admin combines multiple attributes from the error details so it's useful to see what we actually show
- `full_error` - the actual API error response or a client-side generated error object
- `source` - whether the red bar came from `.showAlert()` or `.showAPIError()`, useful for tracking down where errors originated
no issue
- updating the preview is done asynchronously in the background as it's not essential to the theme activation process being complete, however it was kicked off before we had waited for the custom theme settings to be re-fetched from the API. The front-end _has_ successfully swapped themes and settings at this point but when we preview we send a full set of custom settings meaning we were sending settings for the previous theme rather than the current theme because the local settings cache in Admin hadn't finished updating
no issue
- added a `yield` to the fetch theme settings request when activating a theme so that settings are loaded before we switch back to the design index screen. Previously the load would happen async and the design menu didn't collapse because at the time of transition it looked like no custom settings were present
no issue
- moved lifecycle hooks to top of file as they are framework-provided and control creation/destruction
- changed code order for `dragStart()`, `drag()`, `dragEnd()` so they follow the modifiers expected event cycle
no issue
- stops drag from being initiated from any element that matches `input` or `.ember-basic-dropdown-trigger` so that text can still be selected from inputs whilst dragging and we don't get left with orphaned dropdowns from dragging a dropdown-inducing element
no issue
- added a movement threshold for click+drag so we don't make the drag fully active until there's been a few pixels of movement whilst the mouse is held down, fixes issues where a slight bit of movement when clicking on elements would make drag active blocking the click from working
refs https://github.com/TryGhost/Team/issues/807
refs https://github.com/TryGhost/Ghost/pull/13703
The launch wizard completed flag was previously stored at per user level in accessibility column of user table, so an administrator still got the option to complete the launch wizard even if the owner had completed it previously, which is not expected pattern. This change moves the launch complete flag to be stored in new global setting for site.
no issue
- moves disabling of scroll and pointer events into the `drag` handler so we don't inadvertently stop genuine clicks on elements inside the movable container
- adds a timeout for re-enabling pointer-events and clicks when drag finishes so we can still capture the unwanted events that would otherwise fire on mouseup
- uses a `click` event handler as that event is still fired even though we're preventing `mouseup`, fixes problems where the `pointer-events: none` on the movable container lets events through to the element behind it which could cause the movable container to be removed (eg, click event on the editor background moving a card out of edit mode)
no issue
- if the right button was pressed on the movable element it would start "drag" but also show the right-click menu meaning that once you clicked to close the menu the movable element was stuck to your pointer without the left button being held down
no issue
- adds `{{movable}}` render modifier that sets up basic mouse/touch event handlers that adjust the element's `translate` style when click/touched+dragged so it can be moved around the screen
refs https://github.com/TryGhost/Team/issues/1115
This removes all the usages of the Offers labs flag which do not modify routing.
The routing changes have been left for @peterzimon
no issue
- added the edit toolbar icon back to the email-cta card
- switched back to displaying the non-editable version of the card when not in edit mode
- removed unused `showSettingsPanel` property from `<KoenigCard>` component, cards can now control display of settings panel using `@isEditing`
- removed unused `@visible` argument for `<KoenigSettingsPanel>` component
no issue
UI experiment (behind the `cardSettingsPanel` labs flag) for pulling card settings out into a separate side-panel. Prototyping against the email-cta card.
- shows panel immediately when selected unless selected by keyboard in which case it will wait for mouse input
- panel position is fixed so it's always on screen
- initial position tries to be as close to centered right of the card as possible
- ensures all of the panel is on-screen, will overlap the card if there's no enough horizontal width
- re-positions after window resize
- card no longer has a separate edit mode, the text replacement field is directly editable
refs https://github.com/TryGhost/Team/issues/559
- the majority of modals all have the same class so it doesn't make sense to repeat it constantly
- added `DEFAULT_OPTIONS` object for options that apply to all modals and removed the now-unnecessary repeated className definitions
- renamed `DEFAULT_MODAL_OPTIONS` to `MODAL_OPTIONS` to avoid confusion
closes https://github.com/TryGhost/Team/issues/1193
- there was a typo in the limits modal component name that is shown when the limits service check fails when opening the upload theme modal
- added acceptance test with associated fix of modal name test selector in the template