Commit Graph

5173 Commits

Author SHA1 Message Date
Renovate Bot
0263b02ffa Update dependency ember-infinity to v2.0.3 2020-01-20 06:18:15 +00:00
Renovate Bot
50b88fba05 Update dependency ember-concurrency to v1.1.5 2020-01-20 05:18:07 +00:00
Renovate Bot
7c8ddab16a Update dependency autoprefixer to v9.7.4 2020-01-20 04:18:14 +00:00
Renovate Bot
51f272b235 Update dependency ember-cli-htmlbars to v4.2.2 2020-01-20 03:17:48 +00:00
Renovate Bot
55a41c6bb5 Update dependency @tryghost/timezone-data to v0.2.18 2020-01-20 02:18:50 +00:00
Renovate Bot
b3a184d5a3 Update dependency @tryghost/helpers to v1.1.21 2020-01-20 01:18:57 +00:00
Kevin Ansfield
ba4c53134f Upgraded eslint-plugin-ghost and fixed new linter errors
no issue

- update imports for `@ember-data` package (https://github.com/emberjs/rfcs/blob/master/text/0395-ember-data-packages.md)
- use `computed.reads` where applicable (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/require-computed-macros.md)
- fix usage of `scheduleOnce` so that functions are only scheduled once (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-incorrect-calls-with-inline-anonymous-functions.md)
2020-01-16 17:01:12 +00:00
Kevin Ansfield
2231dd84c2 Migrated to <AngleBracketSyntax /> (#1460)
no issue

Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md

We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.

This simplifies the rules for what template code is referring to...

`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)

- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
  - `app/templates`
  - `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
  - `gh-feature-flag`
  - `gh-tour-item`
  - `gh-cm-editor`
  - `gh-fullscreen-modal`
  - `gh-task-button`
- updates some code that was missed in 3c851293c1 to use explicit this
2020-01-16 15:14:03 +00:00
Kevin Ansfield
0f8610a6e9 Extracted duplicated posts/pages filter into a component
no issue

- posts and pages (and their corresponding `-loading` counterparts) templates were all duplicating a lengthy section of handlebars
- extracted the duplicated handlebars into a template for easier design changes or upgrading of `ember-power-select`
- moved generation of the "selected" CSS classes into the template to clean up code in the controller
2020-01-15 15:15:20 +00:00
Kevin Ansfield
7c7c4962f9 Upgraded ember-power-* addons (#1459)
no issue

- bump deps
- adjust usage for breaking changes... 
  - https://github.com/cibernox/ember-power-select/blob/master/CHANGELOG.md#300-beta1
  - https://github.com/cibernox/ember-basic-dropdown/blob/master/CHANGELOG.md#200-beta3
  - https://github.com/cibernox/ember-power-datepicker/blob/master/CHANGELOG.md#070
- update overridden component and template files to match latest addon code
  - switch to class syntax w/decorators
  - adjust for angle bracket syntax
2020-01-15 13:53:51 +00:00
Kevin Ansfield
210eb6ef2e Silenced Component#sendAction deprecation
no issue

- `ember-drag-drop` still triggers this and spams the console when re-ordering tags in the tags input
2020-01-14 15:39:48 +00:00
Fabien O'Carroll
579711d19c Version bump to 3.3.0 2020-01-13 14:08:24 +02:00
Kevin Ansfield
49befb0fe8 Lock file maintenance 2020-01-13 09:42:49 +00:00
Daniel Lockyer
eb6a3b9fa8 Switched to Renovate's LTS support policy
no issue

- we want to support all LTS versions and not just the latest
2020-01-13 14:21:24 +07:00
Renovate Bot
12a0191f0e Update dependency reframe.js to v2.2.7 2020-01-13 04:16:56 +00:00
Renovate Bot
7ff958c717 Update dependency ember-concurrency to v1.1.4 2020-01-13 03:16:46 +00:00
Renovate Bot
1e3e9bd71b Update dependency ember-cli-htmlbars to v4.2.1 2020-01-13 02:16:17 +00:00
Renovate Bot
6eafe9eb0b Update dependency element-resize-detector to v1.1.16 2020-01-13 01:16:44 +00:00
Kevin Ansfield
4d5c43305b Removed deprecated usage of this.$() in components
no issue

- converted remaining uses of `this.$()` that I could find over to native DOM
- deprecation is still silenced for now because both `liquid-fire` and `liquid-wormhole` trigger it
2020-01-10 15:12:39 +00:00
Kevin Ansfield
3ac4de6747 Cleaned up more unused code in <GhTagSettingsForm>
refs 704cbcfb4d

- `reset()` method was previously removed as it's no longer needed
- supporting code for calling that method was missed in the previous cleanup
2020-01-10 14:56:43 +00:00
Kevin Ansfield
f271415626 Enabled manual typing of post publish dates (#1431)
*  Enabled manual typing of post publish dates

closes https://github.com/TryGhost/Ghost/issues/9256

- stores the typed date internally to the component until
  - Enter is pressed whilst focused
  - Ctrl/Cmd+S is pressed whilst focused
  - the input loses focus
- shows an error message if the typed date is not in the correct format or is invalid
- stops Ctrl/Cmd+S propagating if the typed date is not in the correct format or is invalid
- as long as the date is valid it calls the `setDate` action when the input loses focus, Ctrl/Cmd+S or Enter is pressed
- prevents publish being triggered in the publish menu if an invalid date is entered
- resets any invalid state in the PSM when it's closed
- manages focus when using <kbd>Tab</kbd>
2020-01-10 14:25:59 +00:00
Kevin Ansfield
704cbcfb4d Cleaned up unused code in <GhTagSettingsForm>
no issue

- the tag screen is now separate from the index so the code needed for handling switches between main/meta panes and scroll resets is not used and no longer needed
- tidies up indentation in the template
2020-01-10 14:14:55 +00:00
Kevin Ansfield
190f2e905d Fixed Ember Data error when navigating to Staff screen
no issue

- if only some roles have been loaded, such as from embedded user records in posts, navigating to the Staff screen when invites exist for roles that have not yet been loaded would result in an Ember Data error
- the error occurs because we use `invite.role.*` in the template but we've specified `{async: false}` in the `belongsTo` relationship for `invite.role` which prevents Ember Data automatically querying the API
- by always fetching the roles list before fetching the invites list we prevent the error but we do introduce an extra API request in some circumstances
2020-01-10 13:53:58 +00:00
Kevin Ansfield
a862cb6b6a Unsilenced deprecations that are no longer triggered
no issue

- cleaned up the `deprecation-workflow.js` file by removing deprecations that are no longer being triggered by our test suite or general app usage (if they are still triggered in untested areas it will be useful to see the logs)
- updated usages of `{{gh-text-field}}` to use it's `shouldFocus` attribute rather than directly overriding it's `autofocus` computed property
2020-01-09 17:20:13 +00:00
Kevin Ansfield
3c30e73701 Fixed typo in email confirmation modal 2020-01-08 16:44:43 +00:00
Kevin Ansfield
bc09a7c4d3 Fixed invite management tests
no issue

- adjusts mirage config so that we're correctly serializing foreign keys
- our API outputs (and our app code expects) foreign keys for non-embedded resources to be in the format `{relationship_name}_id` but mirage's default REST serializer does not include the `_id` suffix
- tests started failing because c46d04f612 introduced a direct access of the invite->role relationship which Ember Data was not correctly creating when mirage was outputting `role` rather than `role_id`
2020-01-08 15:37:06 +00:00
John O'Nolan
516f4212c3 2020 2020-01-07 18:38:25 +00:00
Kevin Ansfield
c46d04f612 Fixed invite resend
refs 3d7e593c96

- `record.belongsTo().id` is an older Ember Data concept so it was returning `undefined`
- the `role` relationship is set up as `async: false` and is always output as an embedded record by our API so we're safe to use `this.role.id` without dealing with any async lookup
2020-01-07 13:45:06 +00:00
Kevin Ansfield
3d7e593c96 Fixed Ember Data record.toJSON() deprecation
no issue

- https://deprecations.emberjs.com/ember-data/v3.x/#toc_record-toJSON
2020-01-07 13:23:15 +00:00
Kevin Ansfield
571784ba3f Silenced "isVisible" deprecation
no issue

- it's being caused by the `ember-infinity` addon and was making test output rather noisy
- revert once `ember-inifinity` has a release removing `isVisible` and we've upgraded
2020-01-07 11:25:24 +00:00
renovate[bot]
ce78528a85 Update dependency ember-infinity to v2 (#1453)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-07 09:54:26 +00:00
renovate[bot]
26e32a29d3 Update dependency ember-simple-auth to v2 (#1449)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-07 09:27:13 +00:00
Kevin Ansfield
68c7147887 Fixed linting 2020-01-07 09:11:42 +00:00
Kevin Ansfield
7e0bbbf658 Swapped and updated pretender dependency
no issue

- `ember-cli-pretender` is no longer required when using `ember-auto-import`
- updated `pretender` dependency from 2.1.2 to 3.2.0
- removed upload progress tests (one was already skipped due to random failures) because pretender is not outputting meaningful `event.loaded` and `event.total` values
2020-01-06 17:28:47 +00:00
Kevin Ansfield
f6c0b6df7a Reverted broccoli-concat to 4.0.0
no issue

- 4.2.1 was failing when building on macOS due to an issue creating asset directories
- https://github.com/broccolijs/broccoli-concat/issues/149
2020-01-06 11:37:40 +00:00
Kevin Ansfield
4dd22a32fc Dropped Node 8.x support
no issue

- Node 8.x is now EOL
- switches Travis over to testing against latest Node LTS which is 12.x
2020-01-06 10:59:59 +00:00
renovate[bot]
9058bb1b1b Lock file maintenance (#1451)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:59:35 +00:00
renovate[bot]
54839d6b48 Update ember core (#1441)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:51:48 +00:00
renovate[bot]
f4c24b6f5b Update dependency ember-test-selectors to v3 (#1450)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:37:47 +00:00
renovate[bot]
357e3719fc Update dependency ember-resolver to v7 (#1448)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:27:27 +00:00
renovate[bot]
b3206b1bf5 Update dependency ember-fetch to v7 (#1447)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:27:01 +00:00
renovate[bot]
a60b85297a Update dependency ember-cli-test-loader to v3 (#1445)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:26:19 +00:00
renovate[bot]
adedc059a2 Update dependency broccoli-funnel to v3 (#1443)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 10:23:06 +00:00
renovate[bot]
6112a9eb91 Update dependency ember-composable-helpers to v3 (#1446)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:47:53 +00:00
renovate[bot]
2d9cc6fb37 Update dependency broccoli-merge-trees to v4 (#1444)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:46:27 +00:00
renovate[bot]
7f45453fb7 Update dependency broccoli-concat to v4 (#1442)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:45:29 +00:00
renovate[bot]
88262b91c6 Update dependency ember-cli-htmlbars to v4.2.0 (#1439)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:44:59 +00:00
renovate[bot]
a2a7202b8c Update dependency ember-cli-babel to v7.13.2 (#1438)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:44:28 +00:00
renovate[bot]
dbc69960ca Update dependency @ember/optional-features to v1.3.0 (#1437)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 09:29:50 +00:00
Renovate Bot
9637f16b42 Update dependency ember-cli-string-helpers to v4.0.6 2020-01-06 01:15:49 +00:00