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

3324 commits

Author SHA1 Message Date
Katharina Irrgang
7169a14568 🔥 Adapt image property changes (#661)
refs https://github.com/TryGhost/Ghost/issues/8348, requires https://github.com/TryGhost/Ghost/pull/8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
2017-04-24 18:22:39 +01:00
Ryan McCarvill
097f37ea02 Card creation and deletion bugs. (#664)
closes https://github.com/TryGhost/Ghost/issues/8312
- all new cards created now enter in selected mode and if enabled edit mode.
- if deleting cards places the cursor in an empty section the '+' menu is placed AFTER the card is deleted which ensures it's placed in the correct location
2017-04-24 15:02:20 +01:00
Kevin Ansfield
1f3b79e289 💄 refactor acceptance tests to use async/await (#663)
no issue
- replaces `andThen(() => {}` blocks with usage of `async/await`
2017-04-25 00:29:48 +12:00
Ryan McCarvill
df8bb6fbe7 🐝 Strip HTML from title (#665)
closes https://github.com/TryGhost/Ghost/issues/8353
- if a user pastes or inserts HTML into the title in some other way (modifying the dom, having a plugin mutate the dom, etc) then strip the HTML and insure that the title is always unstyled and plain text
2017-04-24 12:37:30 +01:00
Kevin Ansfield
0d385df8b2 🐛 fix setup/signup avatar uploads (#667)
closes https://github.com/TryGhost/Ghost/issues/8375

- `jQuery.ajax` has removed the `.success` and `.error` methods, replacing them with `.done` and `.fail`
2017-04-24 11:28:30 +02:00
Aileen Nowak
0c31c6f139 🖌 Remove "Fira Sans" system font (#666)
closes TryGhost/Ghost#8136
- the "Fira Sans" system font looks - even on a retina display - not very readable for users.
2017-04-24 09:36:07 +01:00
Kevin Ansfield
bab4aba942 🐛 clear date error when closing the PSM (#657)
closes https://github.com/TryGhost/Ghost/issues/8359

- if the date/time picker is in an error state when the PSM is closed, reset it to the currently saved time
- resolves the problem with the flash of an error as the publish menu is closed as it's no longer possible to be in a hidden error state
2017-04-24 09:29:41 +02:00
Kevin Ansfield
d4c241a917 🐛 fix non-clickable editor header actions with wide screens (#662)
closes https://github.com/TryGhost/Ghost/issues/8366

- ensure that header actions are layered above the editor so that they are still clickable
- editor content is still selectable in the header area
2017-04-24 09:26:31 +02:00
Ryan McCarvill
b98a804ace 🐛 place no-content placeholder in the correct position in firefox. (#660)
closes TryGhost/Ghost#8322
- Previously in firefox the no-content psuedo element was placed below the actual on first load (but not subsequent reloads), this update positions it in the correct place in both scenarios.
2017-04-20 11:04:04 +01:00
Ryan McCarvill
054c237404 Range handling improvements. (#656)
closes https://github.com/TryGhost/Ghost/issues/8323
closes https://github.com/TryGhost/Ghost/issues/8191

Fixes some of the range issues that we're seeing across browsers also simplifies the positioning code for UI elements.
1. For the title the cursor is now placed in the correct place on key up and down.
2. For the body Safari now displays the `/` menu correctly.
2017-04-20 11:01:08 +01:00
Aileen Nowak
abd9073a0f 🎨 Don't scroll to top after toggle checkbox (#655)
closes TryGhost/Ghost#8335
- use `display: none` instead of positioning it out of the viewport.
2017-04-20 10:51:41 +01:00
Kevin Ansfield
6ef7fcafda 🐛 fix broken sidebar after successful import (#658)
closes TryGhost/Ghost#8307

- unloading the store and refreshing the `session.user` attribute after an import was triggering a rendering edge case where the style was re-computed and a re-render was attempted after the sidebar has been destroyed
- rather than binding a style attribute directly to a CP in `gh-nav-menu` we pass the menu icon in (using `settings.settledIcon` - see below) and manually set the style attribute via the `didReceiveAttrs` hook so that outside changes don't trigger re-computations when we don't expect them and so we can still react to icons being uploaded or removed
- our usage of `settings.icon` is a bit of an odd situation because it's a link to an external resource that will only resolve correctly after a successful save - if we change `settings.icon` in the local store and the nav menu icon style updates before the save has been completed then the server will give us the old icon. To work around this a `settings.settledIcon` attribute has been added that is only updated when we receive data from the store ensuring that our cache-busting technique works correctly
2017-04-19 18:57:56 +02:00
Kevin Ansfield
48c45aa5b1 🐛 fix password change button not showing success state (#659)
closes https://github.com/TryGhost/Ghost/issues/8358

- the change password task was not returning a truthy value on success so you always saw the "X Retry" state
- adds option to pass `idleClass` and `runningClass` to `gh-task-button` - this is so that colour classes can be set in the "base" state without overriding the success/failure colors (some colours would have preference based on the order the colours are defined in the CSS file, eg. setting `gh-btn-red` as a base CSS class would override the `gh-btn-green` that is added after a successful save)
2017-04-19 18:21:47 +02:00
Kevin Ansfield
b219391c1a match 0.11.x's auto-save behaviour (#652)
refs https://github.com/TryGhost/Ghost/issues/8331

- rather than always saving every 60 seconds, the 60 seconds timer is a fallback for when the user has made changes to the post content for 60 seconds without triggering the 3 second debounced timer
- don't perform a save if there have been no changes to the post - this should prevent unnecessary collision errors when multiple people are viewing a post
- adds guards to `gh-publishmenu` so that we don't try to call actions that weren't passed in
2017-04-19 18:09:31 +02:00
Kevin Ansfield
ff12348433 💄 convert editor acceptance tests to async/await (#654)
no issue
- `async/await` cuts down on some boilerplate `andThen(() => { ... })` code and makes it more explicit which methods are async and will wait for run-loop/promise behaviour to finish before continuing
2017-04-20 01:21:37 +12:00
Kevin Ansfield
c01110f597 🎨 responsive editor header (#653)
closes https://github.com/TryGhost/Ghost/issues/8271
- adds `gh-editor` wrapper component that checks the editor position and will apply a `.gh-editor-header-small` class if the editor content will overlap the view actions
- adds `.gh-editor-header-small` class that minifies the header and applies a solid background so that there's no conflict between editor content and header elements
- modifies `.gh-editor-header` z-index so that there's no hidden non-selectable area at the top of the screen
2017-04-20 01:20:42 +12:00
Kevin Ansfield
c1a9726f1b 💄 refactor setup screens to use ember-concurrency (#644)
refs TryGhost/Ghost#7865

💄 refactor signup to use ember-concurrency

refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `signup` route to controller
- refactors authentication and signup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button` in signup template

💄 refactor setup screens to use ember-concurrency

refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `setup/two` route to controller
- refactors authentication and setup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button`
- fixes some styling issues with the new SVG icons
- adds `app/styles/patterns/icons.css` back to contain per-icon overrides and animations (some SVGs use fills and others use strokes so we sometimes have conflicting styles)
2017-04-19 12:27:32 +02:00
Kevin Ansfield
ae1b5ee519 🎨 fix settings menu delete button styles (#651)
closes https://github.com/TryGhost/Ghost/issues/8345

- renames `.tag-delete-button` to `.settings-menu-delete-button` to match it's more generic purpose
- match styles as close to 0.11.x as possible, it was necessary to add both stroke and fill to the trashcan SVG for it not to be washed out
2017-04-19 12:00:05 +02:00
Kevin Ansfield
6e573b7ab9 add "delete post" button to the PSM (#649)
closes https://github.com/TryGhost/Ghost/issues/8332

- moves `toggleDeletePostModal` action from the `edit` controller to the `editor-base-controller` mixin
- adds delete button to the bottom of the PSM unless it's a new post
- adds `deletePost` attribute to `gh-post-settings-menu` to allow a delete post action to be passed in
2017-04-19 11:46:42 +02:00
Kevin Ansfield
08edc266d1 🐛 Fix HTML card not launching in edit mode (#647)
* replace `isEditing` observers with `didReceiveAttrs` hook

* 🐛 Fix HTML card not launching in edit mode

closes https://github.com/TryGhost/Ghost/issues/8310
- adds `autofocus=true` attribute to `gh-cm-editor` that will use CodeMirror's built-in autofocus behaviour
- set HTML card's launch mode to `edit` and ensure that the `autofocus` attribute is passed
- refactor `gh-cm-editor` for more robust event handling
- re-work `ch-cm-editor` tests to take into account CMs events not being triggered within a single run-loop and to still work when the browser window isn't focused (should fix the random test failures on Travis and the issues where the CM tests will fail locally)
2017-04-18 19:20:38 +12:00
Kevin Ansfield
85e3bab83c 💄 refactor signup to use ember-concurrency
refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `signup` route to controller
- refactors authentication and signup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button` in signup template
2017-04-17 10:21:38 -04:00
Kevin Ansfield
d01469428c 💄 replace DownloadCountPoller with gh-download-count
closes https://github.com/TryGhost/Ghost/issues/8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
2017-04-17 10:04:53 -04:00
Aileen Nowak
eb821b1041 🗑 Get the trash icon back in card (#646)
closes TryGhost/Ghost#8340
- Use `{{inline-svg}}` helper instead of icon font
2017-04-17 12:42:47 +01:00
Ryan McCarvill
7077876b72 Simplify card selection (#645)
no issue
- Creates a util library for the editor to handle common tasks like:
  - Loading the current card from the mobiledoc from an element in the DOM
  - Deciding if a card should be closed based on a user click.
2017-04-17 11:52:26 +01:00
Kevin Ansfield
593c9f38b6 Revert svg icon stroke changes
no issue
- reverts "remove hardcoded icon stroke colors"
- revert "add stroke color to button classes, remove icon-specific stoke/fill styles"

Unfortunately these changes had a larger effect than was initially obvious, will PR if these changes still prove to be useful.
2017-04-15 14:28:47 +01:00
Kevin Ansfield
4ab3dc1d5b remove hardcoded icon stroke colors
no issue
- allows container styles to cascade making styling easier as it's no longer necessary to use high-specificity selectors to override the hardcoded colors
2017-04-15 12:49:50 +01:00
Kevin Ansfield
8f4a0a3578 prevent vertical positioning jump on failed signin 2017-04-15 09:28:11 +01:00
Kevin Ansfield
a132dc373e add stroke color to button classes, remove icon-specific stoke/fill styles 2017-04-15 09:28:00 +01:00
Aileen Nowak
b1e5399657 No more icon font: {{inline-svg}} - Part 2 (#642)
closes TryGhost/Ghost#8107
- replaces all icons in Ghost-Admin with SVGs by using our new helper {{inline-svg}}.
- removes all ghosticon fonts.

This is the second and final batch of the refactor.
2017-04-14 17:22:14 +01:00
Kevin Ansfield
9795557d5b Fix linting error 🙈 2017-04-14 16:33:46 +01:00
Kevin Ansfield
5c76346cd0 🎨 animated retry icon
refs https://github.com/TryGhost/Ghost/issues/7515
- add a `retry` icon that better matches button text dimensions
- add a spin animation for the retry icon
- use the new retry icon in the default `gh-task-button` template
- add a "restart animation" method to `gh-task-button` so that repeated clicks on a button appear to register the action when local validation means that there's no transition from failed->running->failed
2017-04-14 16:16:52 +01:00
Kevin Ansfield
9ab7d104ce deps: ember-inline-svg@0.1.11 2017-04-14 16:08:46 +01:00
Kevin Ansfield
b3440bfc7d 🐛 fix "Show all posts" link not resetting author/tag filter
no issue
- when no posts are found when a content filter is applied the "Show all posts" link would only reset the `type` param but it also needs to reset the `author` and `tag` params
2017-04-13 12:26:04 +01:00
Kevin Ansfield
ff1717d1ba 🐛 fix content filters jumping when loading screen is shown
no issue
- ensure content filters in the loading screen have the same styles
- add session injection to `posts-loading` controller so that the authors dropdown doesn't appear when changing filters when logged in as an author
2017-04-13 12:26:04 +01:00
Ryan McCarvill
14bbb0d751 🐜 🎊 Fix firefox drag and drop support for image uploading in markdown cards. (#640)
closes TryGhost/Ghost#8315
- Previously you couldn't upload images in markdown cards in firefox. Moving the drop action off of the component and onto the root editor as well as having an dragover handler which does nothing fixed the issue 🤷
2017-04-13 10:19:58 +01:00
Ryan McCarvill
720b9478c3 Card range issues (#639)
* When a user presses the up key from a card it now goes to the end of the paragraph above it rather than the start
* move cursor to correct location when deleting a card
* refresh the keyhandler everytime the component is created.
2017-04-13 10:18:42 +01:00
John O'Nolan
60ca9e8ace SUPER IMPORTANT CRITICAL UPDATE ✈️ 2017-04-11 21:03:17 +02:00
Kevin Ansfield
aa6a3d2416 Version bump to 1.0.0-alpha.19 2017-04-11 18:20:49 +01:00
Kevin Ansfield
5fbcd6e4ff 🎨 first pass at animated icons for save-state buttons (#637)
refs https://github.com/TryGhost/Ghost/issues/7515
- adds animated spinner and check SVG icons
- improves SVG sizing/alignment in buttons
- disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed
- fixes broken spinner in `gh-spin-button` components
2017-04-11 16:44:37 +01:00
Kevin Ansfield
02e8ed023a fix timezone errors in editor tests (#638) 2017-04-11 15:48:20 +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
Aileen Nowak
0a09c244cb 🐛 Use correct blog icon URL with subdirectory (#636)
refs TryGhost/Ghost#7688
- Fixes a bug in subdirectory setup where the blog icon URL would be concatenated with a double subdirectory in the URL.
- Uses `RegExp` to strip it from `settings.icon` and concat it without trailing slash.
2017-04-11 14:09:15 +01:00
Kevin Ansfield
a154e55d50 🐛 fix long text overflowing signin button on setup screen (#635)
closes https://github.com/TryGhost/Ghost/issues/8029
- quick fix - works for the setup button but won't work for buttons that include spinners because the `display: flex` breaks the `text-overflow: ellipsis` style, this should be fine as I'm not aware of any other buttons where the text is user-defined
2017-04-11 13:09:09 +01:00
Ryan McCarvill
2ed58d5253 🐜 Navigating from the title to a card. (#631)
refs https://github.com/TryGhost/Ghost/issues/8194
- Allows you to navigate to the title and body if the first element in the document is a card.
- Adjust toolbar and + menu button for mobile screen.
- Put in place resize throttling for moving of in-code positioned elements on screen resize.
2017-04-11 10:57:52 +01:00
Aileen Nowak
981d77c923 🎨 Checkbox styles in settings (#633)
no issue
- wraps the existing `{{one-way-checkbox}}` in general-setting in a `<label>` tag to make the checkbox styles work properly.
2017-04-11 10:10:56 +01:00
John O'Nolan
9081e33f26 Content filter styling 2017-04-10 13:16:19 +02:00
Kevin Ansfield
e0c9ee633b add power-select/trigger template override 2017-04-10 10:53:27 +01:00
Ryan McCarvill
4f33b83035 🐜 fix key up to empty title (#629)
closes https://github.com/TryGhost/Ghost/issues/8293
- when a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0
2017-04-10 10:12:04 +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
Kevin Ansfield
954ac1ace4 🔥 remove unused four.css file in project root 2017-04-07 21:18:37 +01:00