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

3975 commits

Author SHA1 Message Date
Kevin Ansfield
e47d778738 Koenig - Create blank paragraph when pressing Enter in title input
refs https://github.com/TryGhost/Ghost/issues/9311
- adds a solution to the problem of not being able to add text above a card if that card is the first section in the mobiledoc
2018-03-14 13:07:50 +00:00
Kevin Ansfield
5f8ca5c405 Koenig - Fix image creation via (+) menu
refs https://github.com/TryGhost/Ghost/issues/9311
- image icon was missing the appropriate action
2018-03-14 12:23:54 +00:00
Kevin Ansfield
2dd4305f76 Koenig - Fix error when inserting cards in certain circumstances
refs https://github.com/TryGhost/Ghost/issues/9311
- the card selection in `cursorDidChange` would sometimes fail because the selection would be attempted before the newly inserted card had been pushed on to the `componentCards` array. This was reliably triggered by adding a card to a blank header section via the /-menu
- scheduling the section `afterRender` ensures that the `willRender` hook has fired and populated the `componentCards` array before the selection occurs
2018-03-14 12:13:54 +00:00
Kevin Ansfield
55a99cb7c4 Koenig - Wrap HR card in {{koenig-card}} component
refs https://github.com/TryGhost/Ghost/issues/9311
- makes the HR card behave like the other cards wrt hover and selection visibility
2018-03-14 11:44:09 +00:00
Kevin Ansfield
ff40c7992b Koenig - Allow blank paragraphs to be deleted with Delete
refs https://github.com/TryGhost/Ghost/issues/9311
- adjust our <kbd>Delete</kbd> card deletion logic to not fire if we're on a blank paragraph
- allows blank paragraphs between cards to be deleted, feels more natural
2018-03-14 11:01:28 +00:00
Kevin Ansfield
f1ecd39bb2 Koenig - Hide unused elements in (+) menu
refs https://github.com/TryGhost/Ghost/issues/9311
- we don't and will unlikely ever have a "Text" card
- commented out the search input and "Primary" header, it won't be used until we have many more cards
2018-03-14 10:51:44 +00:00
Kevin Ansfield
e8258d68d3 Koenig - Close (+) menu when pressing Escape
refs https://github.com/TryGhost/Ghost/issues/9311
- close menu and reset the caret position in the editor when <kbd>Esacape</kbd> is pressed whilst the (+) menu is open
2018-03-14 10:50:38 +00:00
Kevin Ansfield
16f52ba11e Koenig - Bump mobiledoc-kit dependency 2018-03-14 10:16:27 +00:00
Kevin Ansfield
0aa5a8affd Version bump to 1.21.5 2018-03-13 13:55:26 +00:00
Kevin Ansfield
d6bdc943d3 🐛 Fixed infinite loading on posts screen (#967)
closes https://github.com/TryGhost/Ghost/issues/9493

- bump `ember-infinity` to 1.0.0-alpha for Ember Data 3.0 support
  - update posts and users routes for change in API
- bump `ember-in-viewport` to 3.0.0 (fixes offset on posts screen with new version of ember-infinity)
2018-03-12 17:43:53 +07:00
Hey24sheep
09fe424eb1 🐛 Fixed "Are you sure" modal being shown incorrectly after toggling private mode (#964)
closes TryGhost/Ghost#9472
- add `changedAttributes()` passthrough to `settings` service
- use `changedAttributes()` in general settings `toggleIsPrivate` method to reset the password to the last known value when disabling private mode
2018-03-09 14:42:27 +00:00
Hey24sheep
a947c03594 🐛 Fixed need to click Night Shift toggle 3 times in certain circumstances (#965)
closes TryGhost/Ghost#9471
- added check for undefined value
- fixed the condition in feature.js _setAdminTheme
2018-03-09 09:34:43 +00:00
Kevin Ansfield
e4ce6481cc 🐛 Fixed size of the time input fields in publish and post settings menus
no issue
- moving the time input to use `{{gh-text-input}}` meant that the input gained the `.gh-input` class which messed with the combined date/time input styling
- switched back to plain `<input type="text">` to get rid of the extra class
2018-03-07 10:58:58 +00:00
Kevin Ansfield
a5697d5f75 Version bump to 1.21.4 2018-03-06 16:13:42 +00:00
Kevin Ansfield
b04b2315d8 Add CONTRIBUTING.md GitHub file
no issue
- use same contributing file as Ghost
2018-03-05 10:07:04 +00:00
Hey24sheep
3319dc7fee 🐛 Fixed unreadable error message colour when uploading themes/images (#962)
closes TryGhost/Ghost#9476
- added midgrey to uploader.css upload fail
2018-03-05 09:54:46 +00:00
Katharina Irrgang
28b0c7f329 Recommend Node v8 (#963)
no issue
- update travis.yml
2018-03-05 09:44:36 +00:00
Kevin Ansfield
04b8dbb855
Bump Ember dependencies to 3.0 (#961)
no issue
- upgrade `ember-cli`, `ember-source`, and `ember-data` to their latest 3.x versions
- remove jquery ajax test that was a silent failure anyway (we removed the global jquery ajax auth patch a while ago)
- fix issues that arose from using/abusing Ember internals in a couple of places
2018-02-28 17:31:43 +00:00
Kevin Ansfield
bf43bd3075 Only transpile for IE11 target in CI & production builds
no issue
- makes debugging during development easier because there's a lot less indirection added to work around missing ES6 support in IE11
2018-02-28 16:47:04 +00:00
Kevin Ansfield
cbf98a9a80
Bump dependencies (#960)
no issue
- bump all deps with non-breaking changes
- bump yarn.lock sub-dependencies
2018-02-28 13:08:26 +00:00
Kevin Ansfield
479b187ac0
Remove ember-one-way-controls (#959)
closes https://github.com/TryGhost/Ghost/issues/9386
- remove usage of `{{one-way-checkbox}}` in favour of direct HTML+handlebars
- add `{{gh-text-input}}` that inherits from Ember's built-in `TextInput` component along with our custom `TextInput` mixin
- swap all uses of `{{gh-input}}` for `{{gh-text-input}}
- remove `{{gh-input}}` component
- update `{{gh-textarea}}` to inherit from Ember's `TextArea` component instead of `OneWayTextarea` and update all component uses accordingly
- update `{{gh-trim-focus-input}}` to inherit from `{{gh-text-input}}` and update all component uses accordingly
- standardize on using the `focus-out` action naming rather than `focusOut` for all text inputs, this is because the text input components (especially `{{gh-trim-focus-input}}`) have their own `focusOut` handler which gets overridden if consumers supply their own `focusOut` attr
- drop `ember-one-way-controls` package
- add `ember-one-way-select` package
2018-02-28 11:44:03 +00:00
Kevin Ansfield
759aeb3884 Koenig - Image card
refs https://github.com/TryGhost/Ghost/issues/9311
- add actions for cursor movement and pass through to card components
    - `moveCursorToNextSection` deselects card and places cursor at beginning of next section, useful for caption inputs where <kbd>down arrow</kbd> or <kbd>right arrow</kbd> should move the cursor out of the input & card. Also creates an empty paragraph before moving the cursor if for some reason an empty paragraph doesn't exist after the last card in the doc
    - `moveCursorToPrevSection` deselects card and places cursor at end of previous section, useful for caption inputs where <kbd>up arrow</kbd> or <kbd>left arrow</kbd> should move the cursor out of the input & card
    - `addParagraphAfterCard` deselects card, creates a new paragraph after the card and moves the cursor to it. Useful for caption inputs where <kbd>enter</kbd> should have the same behaviour as if it was pressed whilst the card is selected
- modify `{{gh-uploader}}` so that it passes the FileList to it's `onStart` closure action. Useful for displaying previews when uploading images
- modify `{{koenig-card}}` toolbar display so that it can display text as well as icon buttons
- update `{{koenig-card-image}}` so that it has a full image uploader and caption input
2018-02-22 20:41:40 +00:00
Kevin Ansfield
44c2359e9d Update Spirit CSS 2018-02-22 17:02:14 +00:00
Kevin Ansfield
c9d70debab Koenig - Allow clicks on cards to pass through for inputs
refs https://github.com/TryGhost/Ghost/issues/9311
- add `hasEditMode` flag to the `{{koenig-card}}` component so that cards without an edit mode (eg, the image card) don't have unnecessary state changes and even listeners
- allow `mousedown` events on cards to passthrough when selecting if the target was an input or textarea so that the cursor can be placed in an input immediately instead of requiring double clicks
2018-02-22 13:46:24 +00:00
Kevin Ansfield
68dfc3a32b Koenig - Fixed more keyboard card selection bugs
refs https://github.com/TryGhost/Ghost/issues/9311
- removed most of the hairy logic in `cursorDidChange` around the cursor positioning changing between head and tail within a selected card in favour of ignoring all head/tail flip flops within a selected card section and a little extra logic in our <kbd>left arrow</kbd> key handler
2018-02-21 22:48:45 +00:00
Sarah Frantz
2c0e4b3938 🐛 Fixed broken i18n docs link on general settings screen (#958)
no issue
- Link to i18n on the general settings screen 404'd - fixed link to go to https://themes.ghost.org/docs/i18n
2018-02-21 20:49:57 +00:00
Aileen Nowak
1c902af744 Version bump to 1.21.3 2018-02-21 08:19:52 +07:00
Kevin Ansfield
8638bebafd Fixed linting error 2018-02-20 21:22:48 +00:00
Kevin Ansfield
1563d219b1 Update Spirit CSS 2018-02-20 17:40:17 +00:00
Kevin Ansfield
0d58cd324e Koenig - Add caption to HTML/embed card
refs https://github.com/TryGhost/Ghost/issues/9311
- add basic implementation of a caption field to the embed card
2018-02-20 15:53:58 +00:00
Kevin Ansfield
45d4d0f70b Koenig - Another fix for cards being deselected when clicking in edit mode
refs https://github.com/TryGhost/Ghost/issues/9311
- we added a guard for the caret moving from end to beginning of a card when clicking on a card whilst in edit mode in 453636dc13 but it's also possible for clicks to cause the caret to move in the opposite direction
- update the guard in `cursorDidChange` to ignore the caret moving in either direction whilst a card is in edit mode
2018-02-20 15:34:09 +00:00
Kevin Ansfield
43181fb9b7 Koenig - Cleanup toolbar invocation
no issue
- move toolbar markup into the component's template rather than passing it as a block param to keep the `{{koenig-editor}}` template easier to read and more consistent
2018-02-20 15:20:35 +00:00
Kevin Ansfield
86eff72110 Koenig - Initial Spirit styles integration
no issue
- copy Spirit styles over (eventually these will live in an addon)
- update `ember-cli-build` to output a separate CSS file for Spirit
- update `asset-delivery` addon to output Spirit CSS link
- add `{{kg-style}}` helper for Spirit class names
- update `{{koenig-card}}` and the `{{koenig-card-markdown/html}}` components to use Spirit class names and markup
- replace markdown icon with new version from Spirit
2018-02-20 15:05:19 +00:00
Kevin Ansfield
33c7a2ab74 Fix session restoration
no issue
- upgrading to `ember-simple-auth` 1.5.1 introduced a session restoration bug due to a change in the underlying initializer that we override
2018-02-20 12:43:15 +00:00
Kevin Ansfield
67e63a4f9c Switch to using recommended Node.js version on Travis
no issue
- developers should always be using our recommended Node.js version
- having Travis run on an older Node.js version was causing issues occasionally because dependencies would inadvertently drop 4.x support, this is mostly a non-issue for Ghost-Admin because the supported node version is only relevant to developers and build environments
2018-02-19 18:01:53 +00:00
Kevin Ansfield
22befb1604 Bump dependencies
no issue
- bump all deps with non-breaking changes
- bump yarn.lock sub-dependencies
2018-02-19 18:01:53 +00:00
Kevin Ansfield
a04baeba0a Koenig - Add click overlay to embed card
refs https://github.com/TryGhost/Ghost/issues/9311
- adds an overlay element to the embed card so that clicks do not interact with any embedded iframes so that you can lazy click to enter edit mode
2018-02-15 17:14:30 +00:00
Kevin Ansfield
69ddabb6a6 Koenig - Allow blank paragraphs to be deleted with Backspace
refs https://github.com/TryGhost/Ghost/issues/9311
- adjust our backspace card deletion logic to not fire if we're on a blank paragraph
- allows blank paragraphs to be deleted, feels more natural
2018-02-15 16:31:51 +00:00
Kevin Ansfield
66890f3732 Koenig - Update {{koenig-card-html}} to use new {{koenig-card}} container
refs https://github.com/TryGhost/Ghost/issues/9311
- wraps embed card in same container as the markdown card to handle mouse selection/edit toggles etc
- add render mode to embed card
- autofocus CodeMirror editor when switching to edit mode
- fix incorrect pointer on cards
2018-02-15 15:57:44 +00:00
Kevin Ansfield
453636dc13 Koenig - Fix cards being deselected when clicking in edit mode
refs https://github.com/TryGhost/Ghost/issues/9311
- there was an issue where clicking inside a card whilst it was in edit mode would cause the cursor position in the editor to change from the end of a card to the beginning which would re-run our card selection routine and de-selecting the card
- add a guard to the `cursorDidChange` method that looks for an end-to-beginning move whilst a card is in edit mode and ignores it
2018-02-15 15:52:08 +00:00
Kevin Ansfield
0a375d8ccc Koenig - Fix sticky (+) button when clicking to select card
no issue
- if the (+) button was visible and you clicked on a card to select it the cursor moved but the (+) button remained because we weren't updating the `selectedRange` property
2018-02-15 15:02:37 +00:00
Kevin Ansfield
ae79640a6a Koenig - Remove old Koenig alpha code
refs https://github.com/TryGhost/Ghost/issues/9311
- old code is no longer needed for reference so cleaning up
2018-02-15 10:46:23 +00:00
Kevin Ansfield
6618f228b9 Version bump to 1.21.2 2018-02-14 18:24:03 +00:00
Kevin Ansfield
381f62b5db Fix failing tests
no issue
- Travis was failing on master because a dummy render test was failing. Skipped it for now
2018-02-14 11:45:31 +00:00
Kevin Ansfield
c82e2b370d Koenig - Generic {{koenig-card}} container card component
refs https://github.com/TryGhost/Ghost/issues/9311
- initial CSS for container card outline, selection state, toolbar, etc
- adds `{{#koenig-card}}` component to be used inside of component card templates to handle the default card container HTML, mouse interactions, etc
- update `{{koenig-card-markdown}}` to use the new `{{koenig-card}}` component
  - add render/edit mode views
  - focus the textarea when entering edit mode
- updated `{{koenig-editor}}`
  - add <kbd>Cmd+Enter</kbd> command to put a selected card into edit mode
  - when inserting new cards put them into edit mode immediately
  - move edit/select methods out of actions and into normal methods so that timing is easier to reason about
  - skip `cursorDidChange` process when cursor changes as a result of a card selection, fixes issues with `selectCard` being triggered multiple times unexpectedly
2018-02-13 18:00:54 +00:00
kirrg001
5c2cbe3cad Version bump to 1.21.1 2018-02-07 12:35:33 +01:00
kirrg001
32722bb982 Version bump to 1.21.0 2018-02-07 10:51:41 +01:00
Austin Burdine
ae3b9f97d9 Contributor Role (#948)
refs https://github.com/TryGhost/Ghost/issues/9314

* added save button for contributor
* hide tag filter & redirect to posts.index if post is published
* update editor controller test to need session service
2018-02-07 10:42:46 +01:00
Katharina Irrgang
032b7d5f01 Escape html for error messages (#956)
no issue

- if we would like to re-add html in our error messages, we have to differentiate between static messages which can contain html and messages which are dynamic and can contain dynamic input, which should not allow html
- e.g. it is always possible that Ghost receives a message from a third party module, which concats static text with input text
- if we want to show html content from an error, we need to come up with a concept
- for now: no support for html in error messages
2018-02-07 10:30:04 +01:00
Tobias Bieniek
fa4d1b66fc Update ember-cli-mocha to v0.15.0 (#922)
no issue
2018-02-06 09:38:42 +01:00