Commit Graph

5194 Commits

Author SHA1 Message Date
Kevin Ansfield
2a77c0fe51 Added default and custom post views (filters) to the admin sidebar (#1474)
no issue

- list custom post views in collapsable sidebar navigation
  - default views: Draft, Scheduled, Published (except for contributors)
  - record expanded/collapsed state of the navigation menus in user settings via new `navigation` service
- adds `customViews` service that manages custom views
  - provides list of default views
  - gives access to "active" custom view based on current route and query params
  - manages loading/saving of custom views to user settings
- show "Add view" button in the content filter when the posts list has been filtered
- show "Edit view" button in the content filter when the posts list filter matches a saved view

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-01-30 15:35:36 +00:00
Kevin Ansfield
2b37f6aaae Version bump to 3.4.0 2020-01-28 17:23:42 +00:00
Naz Gargol
76c1341666 Added "Complimentary" plan toggle (#1476)
refs TryGhost/Ghost#11537

- Adds support for "Complimentary" plan toggle only when editing an existing member. The same functionality for adding a new member was left out intentionally for simplicity sake. 

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-01-28 11:27:19 +07:00
Kevin Ansfield
1e77a4c915 Removed <GhDownloadCount>
no issue

- the count.ghost.org service is being shut down
- replaced the fetch+poll component with a hardcoded figure
2020-01-27 09:51:45 +00:00
renovate[bot]
c8625d6a42 Update dependency @tryghost/kg-parser-plugins to v0.9.0 (#1483)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-01-27 09:27:28 +00:00
Renovate Bot
c815191d41 Update ember core 2020-01-27 04:16:57 +00:00
Renovate Bot
3472f332e3 Update dependency @tryghost/kg-clean-basic-html to v0.1.5 2020-01-27 03:16:30 +00:00
Renovate Bot
910250006f Update dependency @tryghost/timezone-data to v0.2.19 2020-01-27 02:16:55 +00:00
Renovate Bot
05bb69b7d9 Update dependency @tryghost/helpers to v1.1.22 2020-01-27 01:16:27 +00:00
Rish
32cceb8a54 Fixed members chart dropdown style
no issue

We switched to angle bracket syntax and some PowerSelect properties were not properly auto configured here which enabled search box on members chart range dropdown
2020-01-23 13:46:37 +05:30
Daniel Lockyer
ba6389aaf5 Added Node 10 testing to CI
no issue

- we want to test on all supported Node versions
2020-01-22 12:47:50 +07:00
Kevin Ansfield
1e46306129 Fixed linting 2020-01-21 17:48:54 +00:00
Kevin Ansfield
4b40346ff4 Cleaned up unused code in bookmark card
no issue

- the `willDestroyElement` hook is referencing event handlers that aren't used in the bookmark card
- stopped setting `type` in the card payload as it's not used anywhere (possible hangover from when bookmarks were a type of embed card)
2020-01-21 17:45:33 +00:00
Peter Zimon
397e18c7c0 🐛 Fixed dark mode link input bug
no refs.
- fixed style bug for link input in Koenig having no blue border in dark mode
2020-01-21 12:27:30 +01:00
Peter Zimon
d2ac367371 🐛 Fixed button style for staff creation
no refs.
- Fixed Create button being visually detached and incorrect size on the Create (staff) account screen
2020-01-21 12:14:35 +01:00
Kevin Ansfield
d873f929e1 Changed content filters to show "unknown" if a deleted tag/author is selected
refs https://github.com/TryGhost/Ghost-Admin/pull/1474

- show some indicitive text rather than a blank dropdown button when type/author/tag/order query param is present but doesn't match something in our data sets (eg, if a tag/author has been deleted or a query param has been incorrectly typed)
2020-01-20 15:40:32 +00:00
Kevin Ansfield
9cad64cd76 Fixed toaster notification not clearing
no issue

- we switched to using native event listeners rather than jQuery but were still looking for the jQuery-specific `event.originalEvent`
2020-01-20 15:30:24 +00:00
Kevin Ansfield
942e09db9d Lock file maintenance 2020-01-20 09:27:10 +00:00
renovate[bot]
5d9458283e Update dependency ember-composable-helpers to v3.1.0 (#1471)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-01-20 09:21:13 +00:00
renovate[bot]
0dc30910a2 Update dependency ember-cli-chart to v3.6.0 (#1470)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-01-20 09:20:33 +00:00
Renovate Bot
28ce0b0dc3 Update dependency ember-route-action-helper to v2.0.8 2020-01-20 07:23:51 +00:00
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