no issue
- extracted item matching into a separate function
- modified item matching to work with arrays (existing exact match behaviour) or functions which can be defined per-item
- changed snippet item `matches` to a function that does a naive match or the typed query to any part of the snippet's title
no issue
Snippets are pieces of saved content that are given a name and made available for easy and quick insertion when editing posts or pages. They can contain rich text, cards, or a combination of both making it faster and less error-prone to re-use pieces of content across multiple posts. Snippet length is not constrained meaning they can also stand in as post type templates alleviating the need to keep drafts around as templates and copy/pasting each time they are used.
Feature changes:
- added "create snippet" icon to selection and card toolbars
- added "Snippets" section to the plus and slash menus
- for the slash menu, continuing to type after opening the menu will filter by snippet name
- all saved snippets are available to all staff users
- snippets can be deleted by clicking the trash can icon when hovering the mouse over a snippet entry in the plus or slash menus
- creation/deletion of snippets is available to staff users with the owner, admin, or editor role
This commit:
- removed developer experiments guard around snippet UI
no issue
- snippets can only be created and deleted by owners/admins/editors
- added a property in the editor controller to determine if the logged in user has sufficient permissions, then only pass the appropriate save/delete snippet actions to the editor component if the check is passed
- updates koenig menus and toolbars to skip rendering of buttons if the associated action function is not available
refs https://github.com/TryGhost/Ghost/issues/12256, https://github.com/TryGhost/Ghost/issues/12255
Currently when listing subscriptions for Members in both the Admin and the Theme, we only show the subscriptions which have a status of trialing or active.
Based on discussion, the `unpaid` and `past_due` states on Stripe also represent owner's intention of considering a subscription as active instead of `cancelled`, so we allow any subscriptions under these 2 states to be also listed for a member and consider them as `paid`. This updates Admin to consider those subscriptions as active as well.
- Subscriptions will go into a past_due state if the payment is missed, this should be considered a grace period where the member still has access.
- After this the subscriptions will either go to the unpaid or the cancelled state - this can be configured on an account by account basis in the Stripe dashboard. `unpaid` is considered as an intention to keep the subscription to allow for re-activation later.
no issue
- when deleting a snippet we display a confirmation modal, if the background is clicked to dismiss the modal then the menus closed too which is a different behaviour to clicking the close/cancel button inside the dialog
- adjusted the "ignore click" selector in the menus to include all fullscreen modal elements
no issue
- show a delete icon when a snippet is hovered in plus/slash menus
- show a confirmation dialog when the delete icon is clicked
- keep menus open whilst displaying the delete confirmation dialog
no issue
- bumps eslint and eslint-plugin-ember versions
- octane rules are enabled by default
- disabled them in our eslintrc.json so we can switch to warn/error whilst migrating to octane
- fixed a couple of linting errors from new/updated rules
no issue
- it doesn't make sense to create snippets of bookmark/embed cards before they contain any content so we avoid passing the save snippet function through until content exists and the card has left it's input state
no issue
- with the addition of snippets the card menu contents height and potential label width are both growing considerably making the grid layout unworkable
no issue
- show the toolbar icon for any `<KoenigCard>` instance that has the `saveAsSnippet` action passed to it
- currently that's all cards except the HR card because that's a primitive element rather than containing any user-defined content
- add `koenigUi.inputHasFocus` so that card toolbars can be hidden when the snippet input is displayed
no issue
- allows quick access to the preview without having to open post settings menu and click the preview link or hit Ctrl/Cmd+S and click the link in the success notification
* Added auto focusing preview on the signup page while being on links and clicking on any setting in the sidebar
* Refine upload custom portal icon button
* Updated copy for sidebar and links screen
* Added grouping to links list
no issue
- all of our models which allow users to name something use `name` as the field descriptor rather than `title` so `snippet.title` was renamed for consistency
- also fixes typo in the plus-menu component that stopped clicking on snippets from working
closes https://github.com/TryGhost/Team/issues/411
- adds "Create snippet" icon to the editor toolbar
- uses the same link input component design for specifying snippet titles
- snippets are loaded in the background when the editor is accessed
- snippets are listed at the bottom of the card menus of the + and / menus
- clicking a snippet inserts the snippet's contents in place of the current blank section