Commit Graph

15 Commits

Author SHA1 Message Date
Kevin Ansfield
ea9c8c03fe
Update dependency ember-template-lint to v5.3.0 (#16062)
refs https://github.com/TryGhost/Ghost/pull/15550

Pulled out of the rolled up node+ember-js+ember-template rollup linter update PR as it required fairly extensive changes.

- bumped package
- renamed `no-down-event-binding` to `no-pointer-down-event-binding`
- disabled `no-pointer-down-event-binding` rule
- disabled `no-triple-curlies` rule
- ran `yarn lint:hbs --fix`
- updated integration tests to match Octane syntax
- fixed various one-off errors
- updated .lint-todo
2023-01-04 09:39:32 +00:00
Sanne de Vries
a2fc31aa0a Cleaned up icon styles
Refs https://www.notion.so/ghost/Unify-icons-across-Admin-7e3d124d5db34c63beccca029af595e7

- Reduced duplicate plus icons
- Replaced fill trash, info and pen icons by stroke icons
- Removed fill styles from default button classes
- Removed launch-wizard css
2022-09-02 16:56:02 +01:00
Kevin Ansfield
5dda8832f2 Added showSearchMessage option to gh-input-with-select/trigger component
refs https://github.com/TryGhost/Team/issues/1290

- when set to `false` prevents the dropdown opening when it would only contain the "Type to search" message
- uses the `@extra` hash param. Would be preferable to be able to use `@searchMessage=""` but ember power select doesn't pass the searchMessage argument through to the trigger
2022-01-27 18:56:13 +00:00
Kevin Ansfield
5696762984 Switched to top-level input field for members activity member search
refs https://github.com/TryGhost/Team/issues/1290

- switched to using our `gh-input-with-select/trigger` power select trigger to get a search input with select
  - kept the replacement with a button once a selection is made for easier clearing of the selection
2022-01-27 16:41:44 +00:00
Kevin Ansfield
c128998d86 Fixed dropdown elements staying open/fixed when moving settings panel
refs https://github.com/TryGhost/Team/issues/1219

- added `dropdown.closeDropdowns()` to the `{{movable}}` modifier when dragging starts
- updated ember-power-select derived inputs to close their dropdowns when the dropdown service triggers it's `'close'` event
2021-11-12 15:27:08 +00:00
Sanne de Vries
7faf1183be Updated snippet replacement dropdown 2021-09-08 12:07:05 +02:00
Kevin Ansfield
23c6547b5b Fixed missing outline on <GhInputWithSelect> when focused
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
2021-08-26 17:19:00 +01:00
Kevin Ansfield
d0ef530df3 Fixed Safari showing contact suggestions when adding/replacing snippet
refs https://github.com/TryGhost/Team/issues/1008

- Safari doesn't respect `autocomplete="off"` and will attempt to show autofill suggestions, in this case it was picking up "name" from the "Snippet name" placeholder and showing suggestions for contacts on top of the snippets dropdown
- having the input name include "search" overrides the autofill behaviour
- https://bytes.grubhub.com/disabling-safari-autofill-for-a-single-line-address-input-b83137b5b1c7
2021-08-26 10:18:25 +01:00
Kevin Ansfield
ed85901607 Fixed tabbing in and out of <GhInputWithSelect>
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
2021-08-25 15:41:30 +01:00
Sanne de Vries
6198019de1 Updated snippet replacement dropdown 2021-08-24 12:28:07 +02:00
Sanne de Vries
e21669dfa9 Fixed test 2021-08-24 11:39:04 +02:00
Sanne de Vries
f59fae71eb Updated snippet replacement dropdown 2021-08-24 11:21:47 +02:00
Kevin Ansfield
330d264550 Fixed linting error
no issue

- removed unused variable
2021-08-23 17:34:17 +01:00
Kevin Ansfield
daa7f2e781 Added ability to update snippet contents
refs https://github.com/TryGhost/Team/issues/973

- added `@showCreate` option to `<GhInputWithSelect>` that enables the create option without having to pass a function in `@showCreateWhen`
- fixed autofocus not focusing input element in `<GhInputWithSelect>` when `autofocus="true"` isn't enough by itself
- updated `selectOrCreate` in `<GhInputWithSelect>` to trigger `onChange` if it's passed in rather than `onInput`
- swapped input in labs snippet input to `<GhInputWithSelect>`
- added actions for updating a snippet when an existing snippet is selected
- added action to editor control for saving an updated snippet
2021-08-23 16:00:01 +01:00
Kevin Ansfield
33c872c859 Added <GhInputWithSelect> component
refs https://github.com/TryGhost/Team/issues/987

- `<GhInputWithSelect>` acts as a typical text input element but will also show options that are filtered whilst typing. Useful for inputs where there should be suggestions or the ability to choose an existing option
- updated `<GhSearchInput>` to use the renamed and slightly modified trigger
2021-08-20 14:33:30 +01:00