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
refs https://github.com/TryGhost/Team/issues/779
For draft posts the editor autosaves after each change but if you didn't see the "Saving..." indicator it wasn't clear what the save status of the post was. The editor will now always show "Saved" when there are no unsaved changes.
- removed indicator from published and scheduled posts because there's no autosave there
- removed the labs flag
no issue
- there was no need for the decorator as the class is up to date with Octane idioms after swapping `init()` for `constructor()`
- added a comment about the need for `member.get('id')`
no issues
refs https://github.com/emberjs/ember.js/issues/5566#issuecomment-429389165
Member deletion UI gets stuck in UI when deleted via these steps: View member list, filtered by label. Click on a member, delete them. Admin transitions back to previous screen before action is completed — deletion completes successfully but deletion UI hangs.
This happens due to a niche ember bug which causes transitions to abort when transitioning to a route with query params having `refreshModel:true`. The fix is simple one liner with return being separated from the route transition statement.
refs https://github.com/TryGhost/Team/issues/947
- With email-only posts there's a new "send" status that deserved it's own publishing action in the post publish menu. With with addition the post ended up having few more publishing states: publish, send, and publish&send. In addition to all this there's a "schedule" option. An addition of the "send" only select option there became a need to persist the "email_only" flag when the option was changed in the publish menu. Such persistance was not done before from the publishing menu and led a whole chain of additional methods being passed down from publishmenu component all the way down to distribution-action-select component
- At this moment only a happy path work properly when selecting one of the publishing options and publishing. More states will need to be handled for scheduled, unblished, etc. states of the post
refs https://github.com/TryGhost/Team/issues/947
- There is no way to "unpublish" the email-only post that has been sent already. For current alpha version the menu is hidden and up for further development when needed
refs https://github.com/TryGhost/Team/issues/986#issuecomment-900281186
The tiers features updated the "comped" functionality to no longer create a Stripe Subscription for members. Since theme developers expect comped members will have a subscription, we added a dummy subscription object for comped members in API.
Since Admin previously expected comped members to be ones without any subscription but access to product, this change updates Admin behavior to identify comped subscriptions on a product and show them the same way as before.
refs https://github.com/TryGhost/Team/issues/993
- added calls to `onFocus()` and `onBlur()` arguments inside the trigger when the input is focused/blurred so that the active class is correctly applied by ember-power-select
- removed unnecessary mousedown propagation cancellation, it was a copied from `<GhTokenInput>` where extra mouse handling is necessary for buttons inside tokens
- updated `.gh-input-with-select` styles to add the border when active
refs https://github.com/TryGhost/Team/issues/981
- saving a new or existing tier needed a hit on top right save on settings as well or it wasn't showing on the front-end. This change refreshes portal preview once a tier is saved from its modal window so that frontend can correctly reflect the right data immediately.
refs https://github.com/TryGhost/Team/issues/1009
- setting `tabIndex="-1"` on the trigger prevents the trigger container receiving focus rather than the container input element (fixes general tabbing in and out)
- added extra blur handling to the input element so that it is not left in an open dropdown state when tabbing out
refs https://github.com/TryGhost/Team/issues/1009
- added ID generation to the component as an example of good practice to avoid problems with multiple elements having the same ID
- used `afterRender` queue to schedule the focus of the button text input element so the element actually exists (it's added to the DOM only when `showButton` is true so we have to wait for that to complete)
refs https://github.com/TryGhost/Team/issues/947
- There is no need to use proxy objects in the newest versions of Ember. It's an old patterns that should not be perpetuated
refs https://github.com/TryGhost/Team/issues/947
- Added a "distribution" dropdown component to the post publish menu allowing to select from one of three available types of distribution: publish, poblush&send, and send
refs https://github.com/TryGhost/Team/issues/1007
- all contents within an email-cta card are now aligned left/center so it doesn't make sense to keep the payload attribute as `buttonAlignment`
refs https://github.com/TryGhost/Team/issues/1007
- we don't know the URL of a post until after it's published so we were using the preview URL instead as that will always redirect to the current URL
- however, it's not clear in the UI that is how the preview URL works so we're removing it to avoid any confusion
no issue
- mousedown handler in the snippet input component was automatically closing when it was detecting a mousedown event outside of the element
- the new dropdown select is rendered in a wormhole outside of the component's element so the whole component was being destroyed before the mouseup listener on an option was fired
refs https://github.com/TryGhost/Team/issues/1007
- added `@payload.showButton` to the conditional for showing the button
- `@payload.buttonText` and `@payload.buttonUrl` both kept in the conditional to match how it would behave in the email
refs https://github.com/TryGhost/Team/issues/1007
- replaced `hasTopDivider` and `hasBottomDivider` and associated payload properties for a single `showDividers` payload property
- removed divider toggles from non-edit mode card toolbar
- linked edit-mode toolbar divider to a toggle dividers action
refs https://github.com/TryGhost/Team/issues/1007
- updated card payload defaults assignment and set `showButton` to `false`
- linked up button toggle button to toggle `showButton` in card payload and show as green when enabled
- hid button, and associated text/url inputs when `showButton` is false
- added `disabled` attribute to button when there's no text (attempt to simulate "placeholder" styling) and matched the text to the button text placeholder
no issue
- Glimmer components do not have a `.element` property so we need to set it manually because the editor currently reaches into card components to calculate the element's rect for selection when creating snippets
refs https://github.com/TryGhost/Team/issues/992
- added "Link to this post" option that uses the preview URL as it's currently the only guaranteed URL that we know before a post is published
- added "Free email signup" option
- added "Paid subscription" and "Upgrade or change plan" options that are only shown when Stripe is connected
refs https://github.com/TryGhost/Team/issues/992
- within cards we sometimes want access to the `post` record so that UI or copy can be changed based on what is currently being edited
- added ability to pass `@cardOptions` through to the editor components
- fixed KoenigEditor not correctly assigning the `cardOptions` object to the `options` object that gets passed to every card when they are rendered