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

3419 commits

Author SHA1 Message Date
Ryan McCarvill
3d84e01318 Fix HTML and Image cards 2017-04-06 21:12:54 +01:00
Ryan McCarvill
e9c9a5746b markdown card given new format 2017-04-06 21:12:54 +01:00
Ryan McCarvill
1b129e186f removed problematic toolbar on hover. 2017-04-06 21:12:54 +01:00
Ryan McCarvill
afb203a4ab fixed format and saving handling in markdown card 2017-04-06 21:12:54 +01:00
Ryan McCarvill
d65d0eb03a If this card is the last element in the document create an empty paragraph afterwards. 2017-04-06 21:12:54 +01:00
Ryan McCarvill
4c8e558f3a move drop handler onto textarea 2017-04-06 21:12:54 +01:00
Ryan McCarvill
1cff0de1d9 When inserting an image from the + or / menus and the post is empty then replace the current post with the image, if the post is not empty then insert the image in the following post. 2017-04-06 21:12:54 +01:00
Aileen Nowak
6b05fa5af2 🤡 Serve own admin favicon (#619)
refs TryGhost/Ghost#7688
- Serve favicon from `assets/img` to guarantee its available, even if admin and blog are not using the same URL.
2017-04-06 17:28:51 +01:00
Aileen Nowak
1c8448aba8 🐝 Refresh publication icon after upload (#626)
refs TryGhost/Ghost#7688
- Instead of using a hardcoded `favicon.ico` URL to request the blog/publication icon, we read the settings which get updated as soon as a icon is uploaded.
2017-04-06 17:26:05 +01:00
Katharina Irrgang
4d2441873f 🎨 rename last_login to last_seen (#612)
refs https://github.com/TryGhost/Ghost/issues/8258
2017-04-05 20:20: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
db0a879a30 🚫 hide ds.errors related warnings that fill the test logs (#623)
no issue
- our custom validation engine makes extensive use of `DS.Errors` which fills the console and especially the test logs with a ton of warnings, this change adds a handler to skip the warnings that we don't care about at the moment
- should be removed when we merge the validations refactor
2017-04-05 18:21:33 +01:00
Kevin Ansfield
4defc65063 🎨 separate content filter dropdowns from the triggers 2017-04-05 16:46:40 +01: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
75f6fe3a08 🔥 remove unused popover components (#620)
no issue

- `gh-popover` and `gh-popover-button` are no longer used in the codebase
- removing them seems prudent as we are moving towards a different approach for dropdowns/popovers/tethers etc
2017-04-05 14:08:29 +01:00
Kevin Ansfield
0e69d95587 🐛 fix broken assets (#616)
closes https://github.com/TryGhost/Ghost/issues/8270

- add `.jpeg` to the list of asset extensions that get fingerprinted
- remove the use of the `{{gh-path "asset" ...}}` helper - since switching to hash-location URLs all assets can now be referenced relatively and removing usage of the helper prevents it getting in the way of ember-cli's asset fingerprinting/rewriting mechanism
2017-04-05 14:08:15 +01:00
Kevin Ansfield
d256490348 🐛 fix "More" link in mobile nav (#618)
no issue
- pass in the action string so that the mobile menu trigger works
2017-04-05 13:54:23 +01:00
Kevin Ansfield
cfda6f8365 🐛 fix night-mode in production build
closes https://github.com/TryGhost/Ghost/issues/8213
- quick-fix by not adding the `.min` to the production `ghost-dark.css` file, the asset rename breaks the asset rewriting resulting in the lazy loader attempting to load a non-fingerprinted file
2017-04-05 07:42:20 -05:00
Ryan McCarvill
cdeb415b2c 🐝 Ghost Image Preview in Markdown. (#615)
refs: https://github.com/TryGhost/Ghost/issues/8248
- removes the upload image button in the markdown preview.
2017-04-04 16:15:30 +01:00
Kevin Ansfield
9a0b39eeca Version bump to 1.0.0-alpha.18 2017-04-04 12:45:14 +01:00
Kevin Ansfield
e7633eff1e 🛠 switch to using yarn in our Grunt tasks (#613)
no issue
- use `yarn install` instead of `npm install` in our `grunt init` task (used in Ghost's `grunt init` via subgrunt)
2017-04-04 11:36:17 +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
Ryan McCarvill
f5fc35fb98 improved card selection behaviour (#608)
Refs: https://github.com/TryGhost/Ghost/issues/8191
Refs: https://github.com/TryGhost/Ghost/issues/8194

Changes the selection behaviour of mobiledoc-cards:
If you navigate to a card with a keyboard or click on the new editor toolbar it "hard selects".
If you click into the body of a card to edit it it "soft selects".

When a card is "hard selected" you can navigate out of the card and to the previous or following blocks within the mobiledoc with the keyboard, you can delete the current card with the backspace or delete button, and you can create a new block following the card with the enter key.

When a card is soft selected it is simply displayed as selected and allows the user to edit content within the card.

New card toolbar:
Allows a user to delete the card, save the card, and "hard select" a card.

New title behaviour:
Pressing the enter key within the title "splits" the title at the cursor point, if multiple characters are selected they are first deleted, and creates a new paragraph at the top of the document with the trailing characters after the split.

gh-cm-editor updates:
Adds an on-focus event to gh-cm-editor
2017-03-30 15:29:08 +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
5203681030 remove static card/publish menu examples from Labs screen 2017-03-29 10:51:18 +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
eb36bb4f53 minor refactors for recent/up-coming deprecations 2017-03-28 18:17:59 +01:00
Kevin Ansfield
6ca2334495 fix addon preprocessor deprecation warning during build 2017-03-28 18:17:59 +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
Ryan McCarvill
a8e58bfdf6 📦 Card-Rename (#603)
no issue
- Renames Cards so they comply with the `card-{{name}}` convention rather than `{{name}}-card`
- Adds a unkonwnCardHandler to the editor.
2017-03-24 10:03:52 +00:00
Ryan McCarvill
482543abed 🚨 Move markdown tests (#602)
refs https://github.com/TryGhost/Ghost/issues/8201
- Markdown tests are now integration tests rather than acceptance.
2017-03-24 10:00:43 +00:00
Ryan McCarvill
fade388899 🚀 Link improvements (#601)
no issue
- Adds a few improvements for link insertion.
  - Sanitises links
  - Toggles a link so that if there are existing links in the selected text it removes them.
2017-03-24 09:40:21 +00:00
John O'Nolan
517111ea55 HTML card border style 2017-03-22 18:03:31 +02:00
kirrg001
9adb99058c Version bump to 1.0.0-alpha.17 2017-03-22 10:18:14 +01:00
Ryan McCarvill
4ebb184184 Multi line title. (#595)
refs https://github.com/TryGhost/Ghost/issues/7754

The title is now a contenteditable div which stretches and wraps to behave like the editor.

It also tries to seemlessly move the cursor between the editor and title to make one coherent editing experience.
2017-03-21 23:42:14 +00:00
Ryan McCarvill
446551b36c 🐜 Card Menu Default State Enter Action (#600)
closes https://github.com/TryGhost/Ghost/issues/8196

The default state of both the '/' and '+' card menus is a selection of -1, this ensure that the active tool prompt isn't shown until the user presses an arrow key for keyboard selection. However -1 isn't a valid tool id so when pressing enter without selecting a tool the user will cause an error.

This update ensures that the selected tool is the first tool available even if the selection is in fact -1.
2017-03-21 14:05:49 +00:00
Ryan McCarvill
72c0694b4a 🐝 Fix editor toolbar link focus issues. (#599)
closes https://github.com/TryGhost/Ghost/issues/8195

When the toolbar is toggled into link mode the link input field should always focus, however this only happens on the first time which leads to issues with mobiledoc having focus but not the range.

This fix means that the toolbar always focuses.
2017-03-21 13:52:47 +00:00
Ryan McCarvill
ab118ba572 Insert Link styling (#598)
closes: https://github.com/TryGhost/Ghost/issues/8109
- adds styling for the insert link toolbar component.
2017-03-20 12:44:09 +00:00
Kevin Ansfield
2f56152dbf 🎨 synchronous settings service
no issue
- adds `settings` service that acts as a proxy to the singular settings model with methods to fetch and reload, also prevents accidentally loading only some settings types which has caused problems in the past
- updates app boot, signin, and signup processes to fetch settings ensuring that any part of the app can grab settings synchronously if needed
- removes `timeZone` service, it's no longer needed as we can grab `settings.activeTimezone` directly
- replaces all store queries for the settings model with appropriate `settings` methods
- refactors `apps/*` routes/controllers, they had become a little convoluted with the way they were dealing with settings and the new service helped to clean that up
2017-03-20 07:43:49 -05:00
Ryan McCarvill
bcbc9c27f7 🐝 Card menu fixes (#597)
closes: https://github.com/TryGhost/Ghost/issues/8106

- Fixes the keyboard selection problems of the '+' menu.
- Makes the active state of the keyboard selection blank until a key is pressed.
- Fixes it so that the '+' menu executes the tool on Enter.
2017-03-20 12:40:20 +00:00
Ryan McCarvill
83519a1fd1 🐝 Safari fixes: (#596)
closes: https://github.com/TryGhost/Ghost/issues/8023
- make the editor 100% height in Safari and position toolbars correctly.
2017-03-20 12:33:06 +00:00
Ryan McCarvill
98d239442b 🐜 Bulk selecting (#594)
closes: https://github.com/TryGhost/Ghost/issues/8153

Previously when selecting text in the editor the screen will jump as it tries to scroll so that the cursor is always on it.

This update means it will no longer happen when selecting the text with either the mouse or in a mobile browser. Unfortunately when selecting text with the keyboard the editor will no longer scroll with the cursor.
2017-03-20 12:12:12 +00:00
Ryan McCarvill
41b035d0da Add classes to card. (#591)
closes: https://github.com/TryGhost/Ghost/issues/8179
- previously all cards just had a `__mobiledoc-card` class on them, this update replaces them with a class `kg-card` and adds an additional class of `kg-{{card_name}}`
2017-03-20 12:08:54 +00:00
Hannah Wolfe
569fe051ef 🔥 Remove handlebars from serving admin (#593)
refs TryGhost/Ghost#8140
refs TryGhost/Ghost#8184

- now that the admin index page is just html, we don't need handlebars anymore
- this changes the template be called .html to reflect this
2017-03-20 12:01:06 +00:00
Ryan McCarvill
8d19c13b3c 🐜 ️ Card menu fixes:
Closes #8164

- When a user clicks on a card within a '/' menu it now executes that tool.
- If a user engages a card with the / menu the content of the paragraph is now inserted into the card.
2017-03-20 10:30:26 +00:00
Kevin Ansfield
e87762c723 fix broken gh-image-uploader tests 2017-03-17 19:15:02 +02:00