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

968 commits

Author SHA1 Message Date
Kevin Ansfield
bed6089aaa 🔥 remove unused gh-spin-button component
closes https://github.com/TryGhost/Ghost/issues/7865
- `gh-spin-button` has been replaced with `gh-task-button`
2017-05-09 16:37:59 -05:00
Jimmy Cai
8749cb55c5 fix missing user avatars in team list (#677)
closes https://github.com/TryGhost/Ghost/issues/8389
- changed `user.image` to `user.profileImage`
2017-05-09 17:23:24 +01: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
5c36ee4b9d Editor refactors (#679)
no issue

* split key commands and text expansions into separate files for easier file searches

* basic formatting, added a few comments

* move editor title input into addon
- the editor and title are now tightly integrated so that it's possible to use up/down cursor navigation so it makes more sense to keep them together
- start of a deeper component restructure so that we don't need to leak properties/actions to parent components

* first pass at refactor of gh-koenig and koenig-title-input
- remove need for editor reference to be held outside of the `gh-koenig` component by yielding it from the component so that the integrated title element can sit inside the container's scope
- refactor `gh-koenig` to more closely match the default ember mobiledoc addon
  - fixes runloop issues by starting/ending a manual runloop
- refactored the mutation observer and event handlers in `koenig-title-input` so that we're not doing unecessary work on every render/key press
- rename CSS classes to be more specific (these may still need more separation between `.gh` and `.kg` later)
  - `.editor-holder` to `.gh-koenig-container`
  - `.surface` to `.gh-koenig-surface`

* fix tests and start testing refactor

* move gh-koenig integration tests into addon, remove empty test files

* first-pass at component template cleanup

* first pass at koenig-toolbar-button refactor
2017-05-08 10:44:02 +01:00
John O'Nolan
a2045d4883 Fix bugs with uploaded logos and images
- Added cursor events to hover state to indicate possibility of editing images by clicking on them
- Added min-width to images inside image uploader to prevent SVG images from collapsing and being invisible as a result
2017-05-07 19:07:46 +01:00
John O'Nolan
1f2019af99 Fix sizing bug where SVG logos did not display when uploaded 2017-05-07 18:14:29 +01:00
Ryan McCarvill
3e49b7548e 🔢 Add wordcount feature. (#668)
closes TryGhost/Ghost#8202
-  added wordcount for mobiledoc text and html/markdown cards (cards will only update word count when leaving edit state)
- word count is only displayed on wide screens
2017-04-25 12:32:27 +01:00
Matt Enlow
9eda16e60a 🐛 fix chrome autofill on setup/two (#670)
no issue
- connect email and name labels to inputs
- change name of hidden inputs so that chrome doesn't incorrect fill fields
2017-04-25 09:45:23 +01:00
Rabbi Hossain
955e8cc188 Fix for Firefox CSS Issues (#671)
closes https://github.com/TryGhost/Ghost/issues/8337
- fixes `Browse` file select icon being partially hidden on Labs screen
- fixes timezone alignment in date/time picker inside PSM
2017-04-25 09:17:16 +01:00
Katharina Irrgang
37689059af 🎨 settings model inconsistency (#669)
requires https://github.com/TryGhost/Ghost/pull/8381
- all camelCase settings model attribute names received from the API are now underscore_case
- discussed here https://github.com/TryGhost/Ghost-Admin/pull/661#discussion_r112939982
2017-04-24 18:42:43 +01:00
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
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
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
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
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
John O'Nolan
60ca9e8ace SUPER IMPORTANT CRITICAL UPDATE ✈️ 2017-04-11 21:03:17 +02: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
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
Ryan McCarvill
eb9e7726ee Editor title improvements (#614)
closes: https://github.com/TryGhost/Ghost/issues/8292
- Title improvements:
- Clean up the connection between the editor and title.
- Encapsulate all title related events in the title component.
- Fix tab support.
- Fixed an issue where pressing up from an empty paragraph would select the title
- Ensure the empty content psuedo element is always below the cursor and make sure it always displays when the title is blank.
2017-04-07 21:05:43 +01:00
John O'Nolan
4e3642c24d Editor style updates 2017-04-07 21:25:09 +02: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
Aileen Nowak
1b203e3172 🎨 Make blog icon backround transparent (#628)
refs TryGhost/Ghost#7688
2017-04-07 14:29:58 +01:00
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
4c8e558f3a move drop handler onto textarea 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
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
5203681030 remove static card/publish menu examples from Labs screen 2017-03-29 10:51:18 +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
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
John O'Nolan
517111ea55 HTML card border style 2017-03-22 18:03:31 +02: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
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
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
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
Kevin Ansfield
e87762c723 fix broken gh-image-uploader tests 2017-03-17 19:15:02 +02:00
John O'Nolan
0ad27f493e Styling for editor image uploader card 2017-03-16 16:39:57 +02:00
John O'Nolan
5b494a023c Card menu trigger styling 2017-03-15 17:43:12 +02:00
Kevin Ansfield
0e16bd61b8 🔥 remove Posts per Page setting (#583)
refs ##8131

- "posts per page" is now a theme-level concern
- UI has already been removed, this finishes the cleanup by removing `settings.postsPerPage` and related validation/test support
2017-03-14 18:09:06 +01:00
Kevin Ansfield
7661212b1b Revert "Multi line title (#575)"
This reverts commit b5a7fef6f9.
2017-03-14 16:37:47 +00: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
Kevin Ansfield
092b59fe3f show theme warnings/errors when activating a theme (#576)
closes https://github.com/TryGhost/Ghost/issues/8127
- update theme activation to manually set other themes to `active: false` in the store now that we only the active theme back from `/themes/:name/activate` endpoint
- move theme warning list item rendering into `{{gh-theme-error-li error=x}}`
- add `theme-warnings` modal that accepts a warnings list, title, and optional message
- after activating a theme, check if the theme has any warnings or errors and display an appropriate modal informing the user
2017-03-14 08:54:58 -05:00
Ryan McCarvill
b5a7fef6f9 Multi line title (#575)
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-14 13:50:30 +00:00
Ryan McCarvill
8c800ef504 👯 ♥️ ♣️ ♦️ ♠️ New editor card menu (#580)
refs https://github.com/TryGhost/Ghost/issues/8106, https://github.com/TryGhost/Ghost/issues/7429, requires https://github.com/TryGhost/Ghost/pull/8137

-Adds new "card" menus
  - Navigation with keyboard in both axis.
  - Search with keyboard in both menus.
  - Adds a "+" Menu for cards
  - Adds a "/" Menu for cards
    - if the block has content and it becomes a markdown or HTML Embed card then the content is included into the card.
    - Image and HR cards appear below the current section
- Adds new toolbar with both inline and block styling.
- Adds a new 'divider' card.
2017-03-14 11:59:34 +00:00
Austin Burdine
319cf2aa31 fix(psm): fix author dropdown in post-settings-menu
closes https://github.com/TryGhost/Ghost/issues/8122
- because the PSM is now a component, some of the component lifecycle
hooks can be employed to load things
2017-03-14 10:12:06 +00:00
Austin Burdine
33db4b538a 🐛 ensure tag property exists before trying to trim it (#578)
no issue
- fixes error thrown when you focus in/focus out of a field in the tags
editor without entering anything
2017-03-14 10:05:59 +00:00
Kevin Ansfield
e8a1152d21 🐛 fix oauth2-ghost authenticator error handling
no issue
- updates `oauth2-ghost` authenticator to reflect the fact that `makeRequest` now returns a ember-ajax and matches the `oauth2` authenticator behaviour
- handle `UnauthorizedError` errors in application route's error handler to avoid tests breaking from unhandled exceptions
2017-03-13 13:00:48 +01:00
Kevin Ansfield
97300e3531 suspend user feature
requires https://github.com/TryGhost/Ghost/pull/8114
- adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen
- separates team index into "active" and "suspended" users
- adds "suspended" badge to user profile when suspended
2017-03-13 13:00:48 +01:00
John O'Nolan
4d66ca653a Content filter style updates 2017-03-13 12:48:21 +02:00
John O'Nolan
fc2ceb5c7b New publish menu 2017-03-11 19:23:44 +08:00
Austin Burdine
525e6c85d0 🎨 convert post-settings-menu into a component (#137)
no issue
- cleans up some of the render code
- aligns things with the "ember way"
- move metaTitleScratch and metaDescriptionScratch bindings to post model
2017-03-10 14:30:01 +00:00
Austin Burdine
e5657bc069 💄 fix button styling on setup/one page (#573)
no issue
- add span tag to button content
2017-03-09 22:14:50 +00:00
Kevin Ansfield
d95b2b1d31 🎨 refactor signin screen to use ember-concurrency & gh-task-button (#571)
refs https://github.com/TryGhost/Ghost/issues/7865
- convert all signin related actions to ember-concurrency tasks and consolidate in the signin controller rather than spread across controller+route
- add `successClass` and `failureClass` params to `gh-task-button` that can be used to override the default success/failure button classes
- prevent clicks on `gh-task-button` from triggering form actions (this behaviour should never be necessary, task buttons should either be separate to the form as in the "forgot?" button or the form action performs the same task and can be triggered by a standard form submit)
2017-03-09 14:48:54 -07: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