Commit Graph

3219 Commits

Author SHA1 Message Date
John O'Nolan
0b867dfb89 Styling for editor image uploader card 2017-03-16 16:39:57 +02:00
Ryan McCarvill
63f4020970 🐝 🐜 '+' button double click bug (#589)
refs https://github.com/TryGhost/Ghost/issues/8106

When a user clicks on the plus button it opens the card menu, when they click on it twice the card menu input field loses focus and the card menu closes, because the Range object of the document is no longer within the editor the '+' button also disappears. This has the effect of making the '+' button disapear when double clicking.

Now when the input field to search cards loses focus the card menu disapears but the '+' button remains, we rely on the cursorDidChange event to also hide the button.
2017-03-16 11:18:08 +00:00
John O'Nolan
f8dd2c37dd Card menu trigger styling 2017-03-15 17:43:12 +02:00
Ryan McCarvill
715fe52793 🐜 🐝 Create link from toolbar (#586)
closes https://github.com/TryGhost/Ghost/issues/8163

Previously when you created a link the toolbar component would re-render and dissapear.

This update ensures that the logic that must happen on first render does not happen on subsequent renders.
2017-03-15 14:55:20 +00:00
Ryan McCarvill
88da7bc335 🐝 Add cards in lists (#585)
refs https://github.com/TryGhost/Ghost/issues/8157

Currently mobiledoc-kit doesn't allow the inserting or replacing of a list item with a card.

There is a solution that works toggling the section to a `p` then replacing the section, however there are issues with the mobiledoc range object becoming out of sync and the workarounds for that are too hacky.

We need to update mobiledoc to deal with this usecase (although the way that ranges are handled during undo might also be an option worth exploring), but for now we'll simply insert a card at the bottom of the list which is unfortunately different behaviour from any other block.
2017-03-15 10:29:10 +00:00
Kevin Ansfield
4a46f17a41 Version bump to 1.0.0-alpha.16 2017-03-14 19:06:41 +00:00
Kevin Ansfield
4637c92797 🔥 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
21361df3be Revert "Multi line title (#575)"
This reverts commit 989ad7b9c1.
2017-03-14 16:37:47 +00:00
Kevin Ansfield
4de244974e 🎨 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
640499af70 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
Katharina Irrgang
7b4096c57e 🔥 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
Ryan McCarvill
989ad7b9c1 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
Kevin Ansfield
f7dd3e39f9 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
Ryan McCarvill
9a0b72071d 👯 ♥️ ♣️ ♦️ ♠️ 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
Kevin Ansfield
1b4db78eae 👷 skip PSM unit tests until converted to integration tests 2017-03-14 10:12:06 +00:00
Austin Burdine
ed843718b2 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
4a1c548e5b 🐛 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
7180927129 bump gh-task-button test timers to avoid random test failures
no issue
- on some systems (and occasionally on Travis) 20ms was not enough time for the task button state to have resolved resulting in random test failures
2017-03-13 13:00:48 +01:00
Kevin Ansfield
a6e3f704e5 🐛 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
d0d97d1aa2 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
b9c391333e Content filter style updates 2017-03-13 12:48:21 +02:00
John O'Nolan
e39a31656e New publish menu 2017-03-11 19:23:44 +08:00
Austin Burdine
ab287848d4 🎨 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
56e5e90334 💄 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
9344fd6a1a 🎨 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
253a0fb2cf 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
ad98a9a072 🎨 refactor settings screens to use ember-concurrency & gh-task-button
refs https://github.com/TryGhost/Ghost/issues/7865
- updates all settings screens to use EC tasks and `gh-task-button` to get save-state save buttons
- removes now-unused `settings-save` mixin
- moves the order of button color CSS so that grey buttons can change to green/red after completing
- removes the heading from `apps-loading` template so that there's no odd flash when loading slack/amp screens directly
2017-03-08 10:00:03 -07:00
Kevin Ansfield
33a0e50ae5 🐛 fix blank PSM meta description placeholder
no issue
- with the new editor there's no longer a `.rendered-markdown` preview element so the meta description placeholder stopped working
- this uses the `post.html` attribute in place of the old preview element, the downside to this is that `post.html` and therefore the meta description placeholder is only updated on save but that's better than not having any placeholder
2017-03-08 09:42:32 -07:00
Kevin Ansfield
fce096afd1 🔥 remove unused markdown/preview helper and component
no issue
- `gh-format-markdown` is no longer used
- `gh-ed-preview` is a hangover from the old editor
2017-03-08 09:42:32 -07:00
John O'Nolan
8aa02da02c Editor card-menu and toolbar style updates 2017-03-08 21:08:20 +08:00
Kevin Ansfield
06e2912c14 bump yarn.lock sub-dependencies 2017-03-08 12:16:25 +00:00
Kevin Ansfield
3036b385c3 deps: loader.js@4.2.3 2017-03-08 12:16:25 +00:00
Kevin Ansfield
7c056536e5 deps: liquid-wormhole@2.0.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield
6d5b97418c deps: ember-power-select@1.5.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
9bf5b42eb7 deps: ember-light-table@1.8.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield
352e3d6aa7 deps: ember-cli-postcss@3.1.2 2017-03-08 12:16:25 +00:00
Kevin Ansfield
c0f74b561e deps: broccoli-merge-trees@2.0.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
57c6f27820 deps: ember-ajax@2.5.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield
0fb5888921 deps: csscomb@4.0.1 2017-03-08 12:16:25 +00:00
Kevin Ansfield
d109316b9a deps: coveralls@2.12.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield
bec3b2e0fb deps: autoprefixer@6.7.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield
96743e64cd 🎨 move theme activation to /themes endpoint
requires https://github.com/TryGhost/Ghost/pull/8093
- adds `theme.activate()` method and associated adapter method for activating themes rather than relying on `settings.activeTheme`
- minor refactors to the `modals/upload-theme` component to use a full theme model
2017-03-08 10:46:33 +00:00
Kevin Ansfield
f26ddc68dd add "sort by" dropdown to content screen filters (#565)
closes TryGhost/Ghost#7860
- add "sort by" dropdown allowing to order posts by earliest or latest publication date
2017-03-07 10:36:28 -07:00
Kevin Ansfield
f1512d12c2 success/failure state spinner buttons (#566)
refs https://github.com/TryGhost/Ghost/issues/7515
- changes to `gh-task-button`:
  - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params
  - positional param for `buttonText`
  - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion:
    ```
    {{#gh-task-button task=myTask as |task|}}
    {{if task.isIdle "Save me"}}
    {{if task.isRunning "Saving"}}
    {{if task.isSuccess "Thank you!"}}
    {{if task.isFailure "Nooooooo!"}}
    {{/gh-task-button}}
    ```
- update existing uses of `gh-task-button` to match new component signature
2017-03-07 10:28:52 -07:00
Ryan McCarvill
c5b0301e87 Koenig tests. (#564)
* 👷   Editor tests
Added acceptance tests for koenig markdown-like support.
Added some unit tests for koenig located in the /lib/koenig/test-support directory.
2017-03-07 23:57:09 +13:00
kirrg001
9c137df839 Version bump to 1.0.0-alpha.15 2017-03-03 18:35:18 +01:00
Kevin Ansfield
3df6b2693b 🐛 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
ea58dc6f85 🔥 remove URL input option from image upload components
refs https://github.com/TryGhost/Ghost/issues/8032
- `fileStorage: false` config is going away, it predates storage engines and will simplify future image optimisation work
- simplifies UI, it can be brought back in the future in a more robust fashion if required
2017-03-03 11:01:55 -06:00
Austin Burdine
0366bde545 💄 import gh-koenig styles into dark mode stylesheet 2017-03-03 16:54:50 +00:00
Austin Burdine
6619f09eca 🎨 implement night mode
no issue
- add functionality for night mode feature flag using alternate
stylesheets
- modify lazy loader service to work with alternate stylesheets
- update feature service to use user accessibility property & add tests
2017-03-03 16:54:50 +00:00