refs https://github.com/TryGhost/Toolbox/issues/71
- Node 16 is now LTS so we're picking up support for it
- we're also bumping the minimum Node 14 version to 14.17.0 so it
unblocks merging dependencies
- Admin needs the Node engine range and CI updating
- CI has been updated to the minimum Node 14 range as that is our
recommended version
refs https://linear.app/tryghost/issue/CORE-74/improve-the-test-situation
- this commit:
- adds the `ember-cli-code-coverage` dependency to collect
coverage from ember tests
- enables the `COVERAGE` env variable in CI
- merges coverage data because tests are run in parallel
- adds the codecov GitHub Action into CI so we can upload
coverage reports
refs https://github.com/TryGhost/Team/issues/1149
- added `ember-css-transitions` library that provides a modifier that adds/removes classes used for animating elements in and out, automatically creating a clone for destroyed elements
- added a wrapper class around the `main` and `design` nav menu contents so they could be individually animated
- used the new `{{css-transition}}` modifier to animate the sidebar menus in/out
- ensured main menu doesn't animate on first render of the parent `<GhNavMenu>` component so there's no animation when Admin is loaded
refs https://github.com/TryGhost/Team/issues/559
Click-to-close and escape-to-close functionality in `ember-promise-modals` was deferred to `focus-trap`. For some of our use-cases that wasn't ideal because there was nowhere to hook in if we wanted to abort modal closing for any reason (eg, to show an unsaved changes confirmation)
- bumped the custom fork version of `ember-promise-modals` to allow all focus-trap close-inducing behaviour to be disabled
- also adds a `beforeClose()` option when opening modals for future use
- changed modals service options that are passed through to `focus-trap` so that all close-inducing behaviour is disabled
- when the first modal is opened add event handlers for clicks and <kbd>Escape</kbd> key presses that should close modals and manually call `.close()` on the top-most modal in the stack
- remove event handlers when the last modal is removed
refs https://github.com/TryGhost/Team/issues/559
We want to get rid of our existing modals implementation because it doesn't play well with Glimmer compoments and the animation library it uses is now unmaintained and blocking our Ember.js upgrades.
- installed addon using customised fork
- fork allows passthrough of `allowOutsideClick` to `focus-trap` so we can allow clicks on dropdowns and other wormholed content inside of a modal
- extended the `modals` service locally so we can customise click-outside-to-close behaviour and tie in with our `dropdowns` service
- set up styles in `modals-new.css`, mostly copied from `modals.css` with a few specific overrides
- once all modals are converted we can drop the old `modals.css` and rename `modals-new.css`
- Update dependency ember-simple-auth to v4
- Removed `setup-session-service` initializer as it's no longer needed/present in v4
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
refs https://github.com/TryGhost/Team/issues/972
Applying a filter in the new members list updates URL and the filter dropdown contains the filters you've created. We want to keep the filters in filter dropdown on page refresh, which needs parsing nql filter from URL and re-building the filter list for the UI. This needs the `@nexes/nql-lang` package that parses the nql filters in JSON form.
Since `nql-lang` package had a dependency on `path`, `util` and `fs` node modules, this change needs a tweak in ember cli build using `ember-auto-import`, where we polyfill `path` and `util` package while using empty value for `fs` package.
refs https://github.com/TryGhost/Team/issues/928
- we want to make use of the same color adjustments and contrast selection for accent colors we use in Admin on the server-side for emails so utility functions have been extracted to an external package
refs https://github.com/TryGhost/Team/issues/928
- switched to using `color` for color conversion and adjustments rather than maintaining our own limited utils (preparation to extract our own utils to separate library)
- changed contrast threshold for yiq-based contrast adjustment from `128` to `186` to match Portal's current behaviour