1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

4578 commits

Author SHA1 Message Date
Kevin Ansfield 3855e1a7b7 Added ability to set <main> class using route metadata
no issue
- modified `ui` service's `routeDidChange` handler to update it's `mainClass` property based on the new route's metadata
- used in the future for switching screen background colours

To use the feature, modify or add a `buildRouteInfoMetadata` hook in the route which you'd like to change, eg:

```js
export default AuthenticatedRoute.extend({
    ...

    buildRouteInfoMetadata() {
        return {
            bodyClasses: ['my-body-class'],
            mainClasses: ['grey-bg'] // <--------
        };
    }
});

```

The route hierarchy is taken into consideration with classes being added for all currently shown routes. For example if you wanted to add an `editor` class to all editor routes you could use the hook in `routes/editor.js` then if you added an `editor-new` class in `routes/editor/new.js` the resulting HTML output on the "New story" screen would be:

```html
<main class="gh-main editor editor-new">
```
2019-05-20 15:33:12 +01:00
Kevin Ansfield 96642b218a Refactored styleBody mixin
no issue
- removed `styleBody` mixin in favour of using Ember's `buildRouteInfoMetadata` hook and router events in the `ui` service
- refactored separate CSS classes for each unauthenticated route into a single `.unauthenticated-route` class because hiding mobile nav whilst unauthenticated was the only use for body classes
2019-05-20 14:57:21 +01:00
Kevin Ansfield 638d631469 Removed unused body classes added by using the StyleBody mixin
no issue
- many routes were attaching classes to the `<body>` tag via the `StyleBody` mixin but those classes were never used and applied inconsistently throughout the app
2019-05-20 14:15:46 +01:00
Renovate Bot b813b96b21 Lock file maintenance 2019-05-20 11:42:58 +01:00
Kevin Ansfield 18a785a416 Fixed gh-search-input tests failing on Ember 3.10 2019-05-20 11:32:08 +01:00
Renovate Bot 81057db2e3 Update ember core 2019-05-20 11:32:08 +01:00
Renovate Bot af07ca5a56 Update dependency fs-extra to v8 2019-05-20 09:29:30 +01:00
Fabien O'Carroll 27a6bd98a8 Version bump to 2.22.1 2019-05-14 11:16:04 +02:00
Renovate Bot b816886690 Lock file maintenance 2019-05-13 16:10:02 +01:00
Renovate Bot c9d6a621a2 Update dependency glob to v7.1.4 2019-05-13 16:02:49 +01:00
Renovate Bot f6625d3d8e Update dependency ember-exam to v3 2019-05-13 15:55:11 +01:00
Kevin Ansfield a61dfbf9a7 Refactored deprecated usage of this.$() in rendering tests
no issue

- https://emberjs.com/deprecations/v3.x#toc_jquery-apis
2019-05-13 15:31:32 +01:00
Kevin Ansfield 2c28f7cb1c Refactored deprecated usage of [files] option param for triggerEvent 2019-05-13 15:31:32 +01:00
Kevin Ansfield 5bad7aef05 Refactored deprecated usage of setupTest* methods
no issue

- https://github.com/emberjs/ember-mocha/blob/master/docs/migration.md#upgrading-to-the-new-testing-apis
- deleted tests files which had no specific tests
- migrated unskipped component unit tests to integration tests
2019-05-13 15:31:32 +01:00
Kevin Ansfield 772310c4b9 Updated test-helper.js to use explicit start() call
no issue

- this was a breaking change introduced in ember-mocha@0.15.0 https://github.com/emberjs/ember-mocha/blob/master/CHANGELOG.md#v0150-2019-05-11
2019-05-13 15:31:32 +01:00
Renovate Bot 534134e955 Update ember testing 2019-05-13 15:31:32 +01:00
Kevin Ansfield b86b365382 Bumped waitFor timeouts in gh-uploader tests
no issue

- Travis was randomly failing here
2019-05-13 09:59:05 +01:00
Renovate Bot 0c4356843d Update dependency ember-infinity to v1.4.5 2019-05-13 02:30:27 +00:00
Renovate Bot d0e016fd0b Update dependency ember-data to v3.9.3 2019-05-13 01:29:00 +00:00
Kevin Ansfield 482598fb55 Fixed deprecated computed().volatile() usage
no issue

- https://deprecations.emberjs.com/v3.x/#toc_computed-property-volatile
2019-05-07 14:54:41 +01:00
Peter Zimon 6ac2a42000
Sidebar refinements and view site in new tab button (#1192)
no refs.

- added view site in new tab button to sidebar
- show secondary actions on sidebar only on mouseover
- replaced labs icon
- refined spacing for view site
- unified colors of secondary icons
2019-05-07 15:29:59 +02:00
Kevin Ansfield eaea4bc24b Fixed transition-state deprecation on Integration screen
no issue

- https://deprecations.emberjs.com/v3.x/#toc_transition-state
2019-05-07 14:04:16 +01:00
Kevin Ansfield d9d962b457 Fixed deprecated usage of new EmberObject in <GhUploader>
no issue

- https://deprecations.emberjs.com/v3.x/#toc_object-new-constructor
- `UploadTracker` is extended from `EmberObject` so we should use the `.create` method
2019-05-07 13:26:32 +01:00
Kevin Ansfield f215d3ff4b Removed unused code in posts route 2019-05-07 12:55:19 +01:00
Kevin Ansfield fa8a08e40b
Removed usage of ember-light-table in subscribers screen (#1191)
no issue

`ember-light-table` is falling behind Ember.js and other addon development and is increasingly causing issues with Ember deprecations and addon incompatibility.

- swaps `ember-light-table` usage for a straightforward table using `vertical-collection` for occlusion
- uses the same loading mechanism as the members screen with a slight optimisation where the initial load will fetch subscribers in batches of 200 until they are all loaded
- removes now-unused pagination mixin
- fixes duplicate subscriber validation handling
2019-05-07 12:39:56 +01:00
Nazar Gargol 10e81f6c43 Version bump to 2.22.0 2019-05-07 12:37:29 +02:00
Kevin Ansfield aeab398b21 Fixed "remove all listeners" deprecation
no issue

- https://deprecations.emberjs.com/v3.x/#toc_events-remove-all-listeners
2019-05-06 15:00:06 +01:00
Kevin Ansfield f9de54aa18 Fixed deprecated access of controller.{currentPath,currentRouteName}
no issue

- replaced access of `controller.{currentPath,currentRouteName}` with `router.currentRouteName`
- https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
2019-05-06 14:51:23 +01:00
renovate[bot] 292fe95932 Update dependency @tryghost/kg-parser-plugins to v0.5.0 (#1188) 2019-05-06 12:31:39 +01:00
renovate[bot] 1b876e6a34 Lock file maintenance (#1189) 2019-05-06 12:31:26 +01:00
renovate[bot] 42f5aca843 Update dependency ember-power-select to v2.3.2 (#1187) 2019-05-06 12:04:39 +01:00
Kevin Ansfield 0a76e3e4b6
Removed coveralls code-coverage reporting (#1190)
no issue
- coverage reports were not really being used and were frequently ignored when merging PRs because we knew there were reductions in test coverage
- coveralls also causes some problems with Renovate because there can be random micro changes in reported coverage that meant a PR "failed" when really it was fine
2019-05-06 12:02:23 +01:00
Renovate Bot 9c3ca4f066 Update dependency @tryghost/kg-clean-basic-html to v0.1.1 2019-05-06 10:29:32 +00:00
Renovate Bot 9906eef315 Update dependency @tryghost/mobiledoc-kit to v0.11.2 2019-05-06 05:23:36 +00:00
Renovate Bot 98b6fb9e95 Update dependency @tryghost/timezone-data to v0.2.2 2019-05-06 03:24:47 +00:00
Renovate Bot 1fd4a3a769 Update dependency @tryghost/kg-parser-plugins to v0.4.2 2019-05-06 02:25:09 +00:00
Renovate Bot be9df2b2e9 Update dependency @tryghost/helpers to v1.1.3 2019-05-06 01:24:29 +00:00
Kevin Ansfield 556bb46f98 Use extracted @tryghost/kg-parser-plugins package
no issue

- `@tryghost/kg-parser-plugins` contains the parser plugins used by the editor and was extracted so that they can be used in server-side html-to-mobiledoc conversion
2019-05-03 10:45:08 +01:00
Kevin Ansfield 3bcb56225d Use extracted @tryghost/kg-clean-basic-html package
no issue
- `cleanBasicHtml` has been extracted to an external package so that it can be used inside the extracted `@tryghost/kg-parser-plugins` package server-side
2019-05-02 17:14:00 +01:00
Kevin Ansfield 2c69970ff2 Fixed random failure of gh-uploader test 2019-05-01 16:09:28 +01:00
Kevin Ansfield 7430f04610
Added caption support to code cards (#1181)
*  Added caption support to code cards

no issue

* fix caption placeholder text

* add figure-to-code-card parser plugin, add language detection to code card parsers

* extract {{kg-action-bar}} component

* do not show card toolbar if caption has focus
2019-05-01 16:36:02 +02:00
Kevin Ansfield 36058958e5 Fixed Travis not running for non-renovate PRs 2019-05-01 15:34:37 +01:00
Kevin Ansfield de94b4cd40 do not show card toolbar if caption has focus 2019-05-01 15:13:49 +01:00
Kevin Ansfield 538b6b3504 extract {{kg-action-bar}} component 2019-05-01 13:57:00 +01:00
Kevin Ansfield 16b3011317 add figure-to-code-card parser plugin, add language detection to code card parsers 2019-05-01 10:41:42 +01:00
Kevin Ansfield d54aa3fe6b fix caption placeholder text 2019-05-01 09:54:04 +01:00
Kevin Ansfield 1c2ed065c8 Added caption support to code cards
no issue
2019-04-30 18:14:49 +02:00
Kevin Ansfield 40f7babc46 Fixed invisible caret in captions for cards with no style specified 2019-04-30 17:53:19 +02:00
Kevin Ansfield 5cb4bcb0cd Increased timeout for gh-task-button disabled assertion 2019-04-30 17:29:28 +02:00
Zimo de4f70ec4b Refined code card language input font size
no issue.
2019-04-30 17:03:06 +02:00