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

96 commits

Author SHA1 Message Date
Kevin Ansfield
ef9381b489 add spellcheck toggle (#697)
closes https://github.com/TryGhost/Ghost/issues/8461
- adds toggle spellcheck button to the `gh-markdown-editor` toolbar
- adds custom styles to fake a spellcheck icon
- updates `simplemde` fork
  - adds `spellcheck` to the list of toolbar buttons that don't have their `active` class removed based on cursor position
  - removes bundled `marked` dependency that we no longer use
2017-05-18 19:08:50 +09:00
Kevin Ansfield
6de16a3c55 use markdown-it for markdown previews (#690)
 use markdown-it for markdown previews

no issue

- replaces SimpleMDE's default `marked` rendering with `markdown-it`
- add ember-browserify and markdown-it plugins
2017-05-15 18:51:19 +02:00
Kevin Ansfield
10e883b775 fix missing branch in package.json for our SimpleMDE fork 2017-05-11 14:16:31 +01:00
Kevin Ansfield
df354c15d3 ⬆️ bump yarn.lock sub-dependencies 2017-05-10 11:26:06 +01:00
Kevin Ansfield
16438f8c68 bump dependencies (#673)
no issue
- autoprefixer@7.0.1
- broccoli-funnel@1.2.0
- codemirror@5.25.2
- coveralls@2.13.1
- ember-cli@2.13.1
- ember-cli-babel@6.1.0
- ember-cli-chai@0.4.0
- ember-cli-code-coverage@0.3.12
- ember-cli-dependency-checker@1.4.0
- ember-cli-eslint@3.1.0
- ember-cli-htmlbars@1.3.2
- ember-cli-htmlbars-inline-precompile@0.4.2
- ember-cli-mocha@0.14.3
- ember-cli-test-loader@2.1.0
- ember-composable-helpers@2.0.1
- ember-data@2.13.1
- ember-light-table@1.8.6
- ember-native-dom-helpers@0.4.0
- ember-power-datepicker@0.3.0
- ember-power-select@1.8.2
- ember-route-action-helper@2.0.3
- ember-simple-auth@1.3.0
- ember-source@2.13.0
- ember-test-selectors@0.3.3
- fs-extra@3.0.1
- liquid-fire@0.27.3
- liquid-wormhole@2.0.5
- loader.js@4.4.0
- fix async issue in editor title placeholder test
- adds `targets.js` so that babel will only polyfill for the lowest common denominator
2017-05-09 18:15:04 -05:00
Kevin Ansfield
a14efa9e16 Fix split screen editor (#684)
no issue

* fix title input padding and placeholder weight
* 🔥 remove unused showdown-ghost dependency
* implement full screen mode via CSS rather than autonav toggle
* implement custom split pane editor preview
    - replace SimpleMDE's split pane handling with our own so that we have more control over the element positioning, toggling of our custom fullscreen code, and so that the preview pane can be scrolled separately as per our old editor
* use forked version of simplemde that has the latest CodeMirror compiled
    - SimpleMDE hasn't been updated for 11 months and the version of CodeMirror is baked into the SimpleMDE code, to get an up to date version I've forked and re-compiled
    - pull in the unminified SimpleMDE source so that it's easier to debug in development, our asset compilation steps will take care of minifying it for production
* fix gh-markdown-editor teardown
2017-05-08 19:15:56 +01:00
Kevin Ansfield
4b48328e6d SimpleMDE editor (#682)
no issue

* move "save on first change" behaviour into editor controller
* allow TAB events to be specified in keyEvents hash of gh-input
* replace mobiledoc-kit/gh-koenig with a SimpleMDE based editor
    - remove `gh-koenig` in-repo-addon from `package.json` so that test files etc aren't loaded
    - remove `mobiledoc-kit` dependencies
    - extends `gh-editor` to handle file drag/drop
    - adds `gh-uploader` and `gh-progress-bar` components to handle file uploads in a more composable manner
    - adds `gh-simplemde` component that wraps SimpleMDE
2017-05-08 11:35:42 +01:00
Kevin Ansfield
9ab7d104ce deps: ember-inline-svg@0.1.11 2017-04-14 16:08:46 +01:00
Kevin Ansfield
34cb65df5c new publish menu and date/time picker (#588)
closes https://github.com/TryGhost/Ghost/issues/8249

- replaces the old split-button publish/schedule/update button with a less confusing menu system
- adds a `{{gh-date-time-picker}}` component that contains a datepicker with separate time input
- replaces the date text input in the post settings menu with `{{gh-date-time-picker}}`
  - disabled when post is scheduled, only way to update a scheduled time is via the publish menu
  - validates date is in the past when draft/published so there's no confusion with scheduling
- displays saving status in top-left of editor screen
- refactor editor (auto)saving processes to use ember-concurrency

Other minor changes:
- adds `post.publishedAtBlog{TZ,Date,Time}` properties to Post model to allow working with `publishedAt` datetime in the selected blog timezone rather than UTC
- adds a `beforeSave` hook to `validation-engine` that is called after successful validation and before the Ember Data save call is made
- adds validation of `publishedAtBlog{Date,Time}` to post validator
- prevent gh-task-button showing last task state on first render
- fixes bug where clicking into and out of the published date input in the PSM without making any changes saves a published date for draft posts
2017-04-11 14:39:45 +01:00
Ryan McCarvill
4670d3fe03 General Editor UI improvements. (#630)
refs https://github.com/TryGhost/Ghost/issues/8248
refs https://github.com/TryGhost/Ghost/issues/8194
closes https://github.com/TryGhost/Ghost/issues/8192

Miscellaneous editor reliability and usability fixes. 
- Improve the reliability of selection.
- Ensure that the + menu appears even if there is a blank document (which meant the events weren't firing from mobiledoc itself)
- When cards are added they are automatically selected and if possible go straight into edit mode (only works on the markdown card).
- Fixes issues in Safari desktop, Safari mobile, and Firefox.
- Tries to position UI on screen at all times.
- Removes fastclick.
2017-04-10 10:10:53 +01:00
Aileen Nowak
750d55737f 🎨 No more icon font: {{inline-svg}} (#605)
refs TryGhost/Ghost#8107
- Replaces icon font with `{{inline-svg}}` helper incl. necessary style adjustments.
2017-04-07 16:23:45 +01:00
Kevin Ansfield
5e9e3cd027 switch to ember-cli-moment-shim (#622)
no issue

- preparation for using `ember-pikaday` that utilizes `ember-cli-moment-shim`
- removes usage of `moment` global
- removes custom imports of `moment` and `moment-timezone` libraries
2017-04-05 19:45:35 +02:00
Kevin Ansfield
57b27e4b9c 🐛 fix sticky dropdown links (#621)
closes https://github.com/TryGhost/Ghost/issues/8269

- swaps the usage of our custom `gh-dropdown` component in the user menu dropdown for the `ember-wormhole` based `ember-basic-dropdown` that is used elsewhere in the app and will fully replace `gh-dropdown` in the future
- adds `gh-basic-dropdown` component that extends from `ember-basic-dropdown` and hooks into our `dropdown` service so that we can programatically close dropdowns from disparate areas of the app
- modifies the `body-event-listener` mixin to pass the click event through to it's consumers
- modifies the `bodyClick` handler in the `dropdown` service to check if the click actually originated from an ember-basic-dropdown element - this body click handler will go away once we've fully switched to `gh-basic-dropdown`
- adds `ember-native-dom-helpers` to provide consistency between acceptance and integration tests (this is the start of another refactor, eventually this addon will disappear as part of ember's [grand testing unification project](https://github.com/rwjblue/rfcs/blob/42/text/0000-grand-testing-unification.md))
2017-04-05 15:26:01 +01:00
Kevin Ansfield
0a7154d1c4 bump dependencies (#610)
no issue
- coveralls@2.13.0
- bump yarn.lock sub-dependencies
2017-04-03 11:32:04 +01:00
Kevin Ansfield
ec78939910 Fix tests when run via http://localhost:4200/tests (#609)
* deps: ember-cli-node-assets@0.2.2

* fix tests when run via http://localhost:4200/tests

no issue
- `blogUrl` in the mocked config was hardcoded, switching to using the current origin fixed the navigation tests
- we were only pulling jquery drag simulator library in on test builds but we also need it added to `test-support.js` in development builds
- lazy loading is disabled in the test env which previously worked fine as all of the codemirror assets are bundled into the test build, now that we also run tests using the development build we needed to update the config to import codemirror assets into the `test-support.js` file - this ensures that we have normal lazy-loading behaviour when developing locally and that accessing via http://localhost:4200/tests doesn't die horribly due to missing dependencies
2017-03-30 20:51:50 +01:00
Kevin Ansfield
f05f31f08e grunt dev admin livereload (#590)
refs https://github.com/TryGhost/Ghost/issues/8161, requires tbd
- updates the `ember:watch` grunt task to use `ember serve`, passing in the required `--live-reload-base-url` parameter
  - forces live reload port to `4201` for now as there's a [bug on touchbar macs](https://github.com/ember-cli/ember-cli/issues/6513)
- removes the unused `ember-cli-content-security-policy` dependency to remove console log noise from x-domain warnings

With this and the required Ghost PR, when using `grunt dev` the admin screen will refresh any time a file is changed. It will also allow tests to be run simultaneously by visiting http://localhost:4200/tests
2017-03-30 13:27:01 +01:00
Kevin Ansfield
d4cbcfa978 bump yarn.lock sub-dependencies 2017-03-29 10:47:46 +01:00
Kevin Ansfield
e65a1b479d minor dependency updates
no issue
- codemirror@5.25.0
- ember-cli-app-version@3.0.0
- ember-cli-eslint@3.0.3
- ember-cli-htmlbars@1.2.0
- ember-cli-postcss@3.2.0
- ember-cli-shims@1.1.0
- ember-cli-test-loader@2.0.0
- ember-data@2.12.1
- ember-export-application-global@2.0.0
- ember-inline-svg@0.1.8
- ember-load-initializers@1.0.0
- ember-power-select@1.6.1
- ember-resolver@4.1.0
- ember-simple-auth@1.2.1
- ember-sinon@0.7.0
- ember-test-selectors@0.3.0
- emberx-file-input@1.1.2
- fs-extra@2.1.2
- liquid-fire@0.27.2
- torii@0.8.2
2017-03-29 10:47:46 +01:00
Kevin Ansfield
3c848048f5 deps: ember-source@2.12.0 2017-03-29 10:47:46 +01:00
Kevin Ansfield
61e73b4d31 deps: ember-concurrency@0.8.1
no issue
- update ember-concurrency
- fix `editor-base-controller` unit tests and remove unnecessary 800ms delays
2017-03-29 10:47:46 +01:00
Kevin Ansfield
3b27fe5d15 deps: ember-cli@2.12.1 (#604)
no issue
- https://emberjs.com/blog/2017/03/19/ember-2-12-released.html#toc_changes-in-ember-cli-2-12
2017-03-28 11:29:18 +01:00
Kevin Ansfield
e1f5ee8fcd 🎨 remove usage of ghost's {{asset}} helper in index.html (#574)
refs #8140

🎨 remove usage of ghost's {{asset}} helper in built index.html files

requires https://github.com/TryGhost/Ghost/pull/8142
- switch to hash-location rather than history-location
- remove usage of Ghost's `{{asset}}` helper in index.html
- add `content-for` helpers to `asset-delivery` addon that switch asset urls in index.html to `.min` files in production
- update the `asset-delivery` addon to copy the production `index.min.html` to `default-prod.hbs` so Ghost can serve production assets when in production mode
- change template output path to `core/server/admin/views/`
- enable asset fingerprinting
- remove `ember-cli-sri` dependency - we weren't using it but now that ember is handling assets it was used automatically and could potentially create issues if users have proxy servers that attempt to compress or otherwise modify asset files

 redirect to setup if server says setup isn't finished

refs https://github.com/TryGhost/Ghost/issues/8140
- now we're using hash-location the server no longer knows if we're hitting the /setup route so it's not able to redirect for us
- extends the default ESA `UnauthenticatedRouteMixin` to add a check against the `/authentication/setup` API endpoint and redirects to `/#/setup/one` if setup isn't complete - this works for all routes because the default behaviour when hitting an authenticated route without the right credentials is to force a logout and redirect to `/#/signin` which utilises the `UnauthenticatedRouteMixin`

deps: ember-cli-inject-live-reload@1.6.1
2017-03-14 17:04:46 +01:00
Katharina Irrgang
a4c69b0bf0 🔥 remove bg shell from Gruntfile (#582)
refs TryGhost/Ghost#7427, requires TryGhost/Ghost#8158
- both Ghost and Ghost-Admin run the watch command in background, that didn't work
- the caller can decide if running the watch command in bg or not
- furthermore, the caller can decide if printing stdout/stderr
2017-03-14 13:52:36 +00:00
Kevin Ansfield
e01adb2fa3 Dependency updates (#581)
no issue
* ember-data@2.12.0
* autoprefixer@6.7.7
* ember-cli-mirage@0.2.8
* ember-cli-app-version@2.0.2
* ember-resolver@3.0.0
* grunt-shell@2.1.0
* bump yarn.lock sub-dependencies
2017-03-14 13:19:58 +00:00
Austin Burdine
35ffe11661 various test deprecation cleanup
no issue
- cleans up a lot of the deprecation noise in tests
- remove ember-cli-deprecation-workflow dependency
2017-03-08 18:56:30 +00:00
Kevin Ansfield
541fe992f1 bump yarn.lock sub-dependencies 2017-03-08 12:16:25 +00:00
Kevin Ansfield
1c8d54808b deps: loader.js@4.2.3 2017-03-08 12:16:25 +00:00
Kevin Ansfield
d02803e8a0 deps: liquid-wormhole@2.0.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield
2cf56db0e1 deps: ember-power-select@1.5.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
ce625b65dc deps: ember-light-table@1.8.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield
b1eda7340f deps: ember-cli-postcss@3.1.2 2017-03-08 12:16:25 +00:00
Kevin Ansfield
a1883bd5b4 deps: broccoli-merge-trees@2.0.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
03ce096c88 deps: ember-ajax@2.5.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield
43f791cf9f deps: csscomb@4.0.1 2017-03-08 12:16:25 +00:00
Kevin Ansfield
d2abedb4ba deps: coveralls@2.12.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
265d67b7bb deps: autoprefixer@6.7.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield
5181852b50 🐛 re-add broccoli-clean-css
no issue
- `broccoli-clean-css` is used to compress codemirror CSS files so it's still needed
- update usage in `ember-cli-build.js` to match 2.0's class interface
2017-03-03 17:19:19 +00:00
Kevin Ansfield
2b3d512fb0 move editor deps into main project
no issue
- this prevents the need for running `npm/yarn install` inside the `lib/gh-koenig` directory
- `ember-cli` may eventually be able to handle this with an `ember install` or similar command, there's [an in-repo-addon RFC](638cad2405/active/0000-better-in-repo-addons.md) suggesting this improvement but it hasn't got much traction yet - it may be necessary to wait until ember-cli has standardised on `yarn`
2017-03-02 11:06:20 +00:00
Kevin Ansfield
cd2c626670 bump yarn.lock deps 2017-03-02 09:57:56 +00:00
Kevin Ansfield
c2a69ca32c bump yarn.lock sub-dependencies 2017-03-01 16:47:50 +00:00
Kevin Ansfield
d1641636df deps: ember-cli-mirage@0.2.6 2017-03-01 16:47:50 +00:00
Kevin Ansfield
12539258b4 deps: loader.js@4.2.2 2017-03-01 16:47:50 +00:00
Kevin Ansfield
b5ccec7c75 deps: broccoli-clean-css@2.0.1 2017-03-01 16:47:50 +00:00
Kevin Ansfield
d669aa0e5b deps: liquid-wormhole@2.0.3 2017-03-01 16:47:50 +00:00
Kevin Ansfield
f24b689930 deps: broccoli-concat@3.2.2 2017-03-01 16:47:50 +00:00
Kevin Ansfield
5b03403ed7 deps: liquid-fire@0.27.1 2017-03-01 16:47:50 +00:00
Kevin Ansfield
3a8fb3e366 deps: codemirror@5.24.2 2017-03-01 16:47:50 +00:00
Kevin Ansfield
5d24f944d0 deps: csscomb@4.0.0 2017-03-01 16:47:50 +00:00
Kevin Ansfield
aeacdc3b8d deps: ember-souce@2.11.2 2017-03-01 16:47:50 +00:00
Kevin Ansfield
d5cb7c66c4 deps: ember-power-select@1.4.4 2017-03-01 16:47:50 +00:00