Commit Graph

16 Commits

Author SHA1 Message Date
Kevin Ansfield
8b5c18d6e5 Hid email specific cards from card menus when editing pages
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`
2021-09-10 09:24:38 +01:00
Kevin Ansfield
10f83ebd45 Added support for feature-gated editor cards
refs https://github.com/TryGhost/Team/issues/910

- added `card-is-available` helper that handles the previous `card.developerExperiment` and the new `card.feature` options
- updated `<KoenigMenuContent>` to use the `card-is-available` helper in the conditional when adding cards to the list

Cards can be gated by feature when specifying them in `cards.js`, in the card definition object you can add `feature: 'flagName'` which will mean the card is only available when that feature is enabled.
2021-07-20 10:48:41 +01:00
Peter Zimon
c65b1b02d5 Fixed separator color in Koenig menu 2021-03-09 09:12:24 +01:00
Sanne de Vries
c71413b0f7 Added descriptive line to each menu item in cardmenu 2020-11-16 17:34:40 +01:00
Sanne de Vries
64e1f74033 Adjusted cardmenu styling for dark mode
No issue

- Changed snippet icon fill
- Changed section border color
- Deleted white corners on bookmark icon
2020-10-28 14:55:34 +01:00
Kevin Ansfield
ad2d6bcf52 Fixed squashed card menu display in Safari 2020-10-27 16:28:24 +00:00
Kevin Ansfield
79d9179289 Added scroll-into-view behaviour for slash menu selection
no issue

- when selecting items with arrow keys in the slash menu, scroll the selected item into view if it's not visible
2020-10-27 16:15:58 +00:00
Kevin Ansfield
581b195e12 Truncated long card menu labels 2020-10-27 14:48:39 +00:00
Kevin Ansfield
1bd4b5cda7 Added delete button with confirmation to snippets in card menus
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
2020-10-26 17:09:39 +00:00
Sanne de Vries
36dbb35eb5 Styled new row layout of the cardmenu
No issue

- Adjusted menu width and height
- Improved spacing cards
- Changed font styling
- Added snippet icons
2020-10-23 10:36:31 +02:00
Kevin Ansfield
09368c2966 Changed card/plus menu layout from grid to rows
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
2020-10-21 12:34:05 +01:00
Kevin Ansfield
b590ce1b95 Implemented first iteration of content snippets
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
2020-10-15 18:03:35 +01:00
Kevin Ansfield
a8f63f9343 Fixed usage of {{enable-developer-experiments}} without sub-expression syntax 2020-10-09 15:52:23 +01:00
Kevin Ansfield
235d5f1b8b Added {{enable-developer-experiments}} helper
no issue

- removes the need to have component backing classes with the `config` service injected
2020-10-09 11:10:39 +01:00
Marco Zehe
adb7828003 Various A11y post screen fixes (#1584)
refs #11863

* 🐛 Gave various buttons accessible labels

Hidden span elements are not rendered to assistive technologies, so duplicate the text in an aria-label on the button element.

* 🐛 Fixed various accessibility issues in the editor

* Made menus menus and menu item menuitems.
* Added labels to buttons where there were only hidden spans, or no text at all.
* Made separators show up for screen readers.
2020-05-28 16:01:09 +01:00
Kevin Ansfield
09435ecf76 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00