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

500 commits

Author SHA1 Message Date
Kevin Ansfield
d0b34dccab Inline password-generator to fix auto-import issues
no issue

- copies `password-generator` npm module functionality into a utility function because the way it was trying to use the `crypto` core library was tripping up webpack which no longer has `node: true` config set by `ember-auto-import`
2019-06-17 11:47:14 +01:00
Kevin Ansfield
c97d84e82f Upgraded our Zapier integration to use API Keys and allow post creation
no issue
- move the Zapier API Key details out of developer experiments because our Zapier 2.0.0 version is now public and requires an API Key when connecting
2019-05-27 10:53:18 +01:00
Kevin Ansfield
06d50b065e Refactored document-title handler
no issue
- moved `document-title` Route extension's functionality into the `ui` service
  - updates the title each time the router service emits a route changed event
  - `ui.updateDocumentTitle()` can now be called directly from components rather than the confusing `this.send('updateDocumentTitle')` bubbling behaviour
- refactored the `titleToken` implementation to use the now-formalised `RouteInfo`'s `metadata` field (https://github.com/emberjs/rfcs/blob/master/text/0398-RouteInfo-Metadata.md#appendix-a)
2019-05-20 16:16:19 +01:00
Kevin Ansfield
fa8a08e40b
Removed usage of ember-light-table in subscribers screen (#1191)
no issue

`ember-light-table` is falling behind Ember.js and other addon development and is increasingly causing issues with Ember deprecations and addon incompatibility.

- swaps `ember-light-table` usage for a straightforward table using `vertical-collection` for occlusion
- uses the same loading mechanism as the members screen with a slight optimisation where the initial load will fetch subscribers in batches of 200 until they are all loaded
- removes now-unused pagination mixin
- fixes duplicate subscriber validation handling
2019-05-07 12:39:56 +01:00
Kevin Ansfield
f9de54aa18 Fixed deprecated access of controller.{currentPath,currentRouteName}
no issue

- replaced access of `controller.{currentPath,currentRouteName}` with `router.currentRouteName`
- https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
2019-05-06 14:51:23 +01:00
Rish
05afcf0211 Updated member detail screen to handle free memberships 2019-04-16 22:59:52 +05:30
Rish
5d14f43776 Updated member detail placeholder
no issue
2019-04-16 22:07:27 +05:30
Zimo
a248bbeaee Changed wording for free Member detail data 2019-04-16 18:07:02 +02:00
Rishabh Garg
1cf443b42e
Updated member management data (#1150)
no issue

- Updated hard-coded data in member management to use real values from API
2019-04-16 20:32:43 +05:30
Kevin Ansfield
55ed3322c8 🐛 Fixed missing error details when activating a theme with fatal errors
no issue
- the API response for theme activation when a fatal validation error occurred has changed but the client wasn't updated resulting in a modal containing an "Activation failed" header but no details
- updates the error details extraction path and adjusts the tests to match the real API response
2019-04-11 11:00:40 +01:00
Rish
6329ec9c40 Fixed members list update on switch
no issue

- Members list updates on screen switch
2019-04-09 20:46:47 +05:30
Kevin Ansfield
c1c49fd3e3 Added integration details to Zapier integration screen behind dev flag
no issue
- the new version of our Zapier App uses API Key auth so we need to expose the details on the Zapier integration screen
- extracted `copyTextToClipboard` into a util function
- added `integrationModelHook` method to `settings.integrations` controller to remove duplication in the `settings.integration` and `settings.integration.zapier` routes
- fixed missing "Zapier" title token
2019-04-04 12:25:16 +01:00
Vikas Potluri
a5bfd36168 🐛 Fixed confusing messaging around .yml extension being allowed for routes.yaml uploads (#1140)
no issue

The server never supported uploading .yml files

* updated uploader `invalid extension` error message to be more abstract
* fixed routes uploader validation allowing .yml files
2019-04-03 19:54:05 +01:00
Kevin Ansfield
efcecb886e Improved theme activation warnings modal content
closes https://github.com/TryGhost/Ghost/issues/10627
- removed confusing/unnecessary message when activation was successful with warnings
- do not display "Warnings" sub-heading if there are no other errors to reduce duplication with the modal title
- changed "Close" button text to "Ok" so it feels more like a confirmation
- refactored modal template to have explicit `this` rather than implicit property lookup ([RFC](e724c7087e/text/0308-deprecate-property-lookup-fallback.md))
2019-03-25 12:20:14 +00:00
Kevin Ansfield
f0ad9dcdc4 🐛 Fixed missing error notification when attempting to activate an invalid theme
no issue
- updates error handling to work with new v2 error response formats
  - `.errorType` -> `.error`
  - `.errorDetails` -> `.details`
2019-03-25 11:32:29 +00:00
Kevin Ansfield
17a577c9b8 Added reset-to-homepage behaviour when clicking "view site" link
no issue
- return a basic "guid" from the site's `model` hook so that we have some data which changes on each refresh
- add an action to the wrapper element of the "view site" link which will cause the route to refresh when clicked if we're already on the route
- move the site iframe into a component so that it can watch an @uuid property and force a reset of the iframe's `src` when it detects a change
2019-03-21 17:55:58 +00:00
Kevin Ansfield
f89b1381a1 Fixed highlight of email field for "unknown user" in forgot password flow 2019-03-21 16:07:57 +00:00
Kevin Ansfield
97f181b7a2 Fixed undefined showing up in setup/two errors 2019-03-21 11:01:29 +00:00
Kevin Ansfield
6625f3bdab Improved error handling in setup/two screen
no issue
- display the `context` property of any API errors so that the messages are useful
- use the same email/password that was used for the setup request in the session request to avoid issues with keys being hit after Enter
2019-03-21 10:53:50 +00:00
John O'Nolan
584eeb8cf1 View site inside Ghost Admin
no refs.
- added "View site" as the first and default menu item in navigation bar to be able to browse the site without leaving the Admin
- rearranged left sidebar items according to new structure (moved Labs down to bottom)
- removed "View site" from publication main menu because it's become redundant
- added Night shift toggle in line with Labs menu to be able quickly access it
2019-03-21 10:33:14 +01:00
Kevin Ansfield
25b5426008 🐛 Fixed sometimes invalid (due to trailing slash) API URL shown on integration screen 2019-03-19 11:47:36 +00:00
Kevin Ansfield
226c4c45c2 Updated editor error handler to work better with new API error messages
no issue
- pass a received API error directly through to the notifications service rather than adding an unnecessary prefix to the error message
2019-03-12 17:49:15 +00:00
Kevin Ansfield
e9c7fad302 Refactored usage of .get('property') with es5 getters
no issue
- ran [es5-getter-ember-codemod](https://github.com/rondale-sc/es5-getter-ember-codemod)
- [es5 getters RFC](https://github.com/emberjs/rfcs/blob/master/text/0281-es5-getters.md)
- updates the majority of `object.get('property')` with `object.property` with exceptions:
  - `.get('nested.property')` - it's not possible to determine if this is relying on "safe" path chaining for when `nested` doesn't exist
  - `.get('config.x')` and `.get('settings.x')` - both our `config` and `settings` services are proxy objects which do not support es5 getters
- this PR is not exhaustive, there are still a number of places where `.get('service.foo')` and similar could be replaced but it gets us a long way there in a quick and automated fashion
2019-03-06 13:54:14 +00:00
Kevin Ansfield
2954e0ae95 Hid "Make Owner" action for staff users that are currently suspended
refs https://github.com/TryGhost/Ghost/issues/10555
2019-03-04 16:45:16 +00:00
Kevin Ansfield
020b3f86e1 Switched About screen to use config service 2019-02-26 16:12:34 +07:00
Rish
e6a6b097e2 Added members feature to labs
no issue

- Added new members settings/toggle to labs
2019-02-26 15:33:38 +07:00
Kevin Ansfield
947b987228 Updated profile image uploads in setup/signup flows for new /images/upload/ endpoint 2019-02-26 11:21:24 +07:00
Kevin Ansfield
4ab77cbb21 Fixed "Authorization Failed" error screens when not logged in
no issue
- `/config/` can only be requested when authenticated
- updated `/config/` mock to look for an Authentication header and return a 403 if it's missing
- updated `ajax` service to add an `Authentication` header when authenticated in testing env (cookies are not present when testing)
- updated `config` service to add `fetchUnauthenticated()` and `fetchAuthenticated()` methods in addition to `.fetch()`
- updated `application` route to only fetch authenticated config when authenticated
- updated `signin` controller to correctly fetch config after sign-in
2019-02-26 10:38:00 +07:00
Kevin Ansfield
ff89502f09 Fixed linting 2019-02-25 19:41:56 +07:00
Kevin Ansfield
c405f5c351 Removed usage of /configuration/private/ endpoint 2019-02-25 19:20:17 +07:00
Kevin Ansfield
830292a244 Added basic search to members list 2019-02-23 17:14:22 +07:00
Kevin Ansfield
e8a0e59fd6 Added copyable API Url to custom integration screen 2019-02-23 16:48:39 +07:00
Kevin Ansfield
75753b17cb Implemented first pass of member details screen 2019-02-22 18:32:09 +07:00
Nazar Gargol
df5134deba Updated /images* response structure
refs #10438
2019-02-22 18:16:25 +07:00
Peter Zimon
b63f5f59d0
Left navigation menu update (#1102)
refs. [f8b03f5](f8b03f50b6)

- added icons for members and pages
- improved view site link visibility
- added view site to logo dropdown
- updated all navigation and logo menu icons
- rename 'team' to 'staff'
- lots of design refinement and update (colors, shadows)
2019-02-22 16:43:35 +07:00
Kevin Ansfield
f8b03f50b6
🎨 Separated post and page list screens (#1101)
no issue
- added `page` model
- removed `page` param from Post model
- added pages screen with associated links
- added `:type` param to editor screens to work with the right models
- removed post<->page toggle and associated tour item
2019-02-22 10:17:33 +07:00
Kevin Ansfield
b18625bb50 Fixed signin error display
no issue
- API now returns more in-depth error message in `context` so we need to use that for modifying  client-side validation
2019-02-21 15:43:58 +07:00
Kevin Ansfield
17c7a7f3b5 Filter non-custom integrations from Custom Integrations list 2019-02-15 14:18:05 +00:00
Kevin Ansfield
e9fba3699b Only fetch new/modified members in background refresh 2019-01-31 14:13:35 +00:00
Kevin Ansfield
5fca88e84b Load all members on members screen, use occlusion scrolling for perf 2019-01-31 12:58:15 +00:00
Kevin Ansfield
b7a6886d22 🐛 Fixed incorrect username being saved by Safari when signing up via invitation
refs https://github.com/TryGhost/Ghost/issues/9868
- ensure signup task is always initiated via form submit
  - adds `defaultClick` option to `<GhTaskButton>` that allows the click event to bubble
- adds `autocomplete` values to signup form fields that match up to the spec
  - "name/display-name": `name`
  - "email": `username email`
  - "password": `new-password` / `current-password` depending on context
- 🔥 no-longer-relevant hacks for Chrome autocomplete
  - this still doesn't fix Chrome remembering the incorrect username unfortunately. Chrome will always select the input previous to the password that has had actual user input as the "username"
- 🔥 unused `authenticate` task in signup controller
2019-01-31 10:27:40 +00:00
Kevin Ansfield
92623073d0 Added undefined guards to uses of JSON stringify/parse copying
no issue
- added guards for JSON stringify+parse replacements of `Ember.copy` introduced in 18dd5e34f6
2019-01-30 14:44:53 +00:00
Kevin Ansfield
18dd5e34f6 Fixed Ember.copy deprecations
refs https://github.com/TryGhost/Ghost/issues/10310
- https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable
2019-01-30 10:14:07 +00:00
Kevin Ansfield
775793f824 First pass at members list
no issue
- don't nest details route as it's not nested UI
- implement styled list of members
- add `<MemberAvatar>` component that generates random background colour and initials based on member name
- fixed generation of fake member details in mirage
2019-01-24 19:34:32 +00:00
Kevin Ansfield
37a23122c2 Switch from embor-browserify to ember-auto-import
no issue
- minor reduction in build size. Before/after:
  - `vendor.min.js 3.32 MB (710.66 KB gzipped)`
  - `vendor.min.js 3.29 MB (706 KB gzipped)`
2019-01-22 13:09:38 +00:00
Greg Hart
fb4794c3b5 Added ability to configure Slack integration's username (#1084)
closes https://github.com/TryGhost/Ghost/issues/9735
- add "Username" form to Slack integration
2019-01-21 12:26:21 +00:00
Moritz Schramm
e261b80c22 🎨 Added post title to document title for easier location with multiple editor tabs (#1072)
closes https://github.com/tryghost/ghost/issues/10088
* added `updateDocumentTitle` action to base route and replace usage of `.send('collectTitleTokens, [])`
* added `.titleToken()` method to editor route to add post title to document title
* called `.send('updateDocumentTitle')` after saving post title in editor controller to keep document title in sync
* updated editor controller test for latest ember-mocha and ember-test-helpers
2019-01-21 11:44:30 +00:00
Hannah Wolfe
bcd8f485ad
Updated docs links to best equivalents (#1097)
- Our documentation has been overhauled, this updates the all the old links sprinkled through Ghost-Admin
2019-01-16 16:03:33 +00:00
Kevin Ansfield
fe1365d03e Fixed missing invite role name on team screen
no issue
- removed the rename of `role_id` to `role` in the invite serialiser to let Ember Data do it's thing with the `invite.role` relationship
- added a guard to the team screen background reloading to ensure that role data is present in the store before loading invites so that Ember Data doesn't trigger unnecessary requests to find missing relationship data
2019-01-14 17:01:30 +00:00
Kevin Ansfield
782ff713ba
🐛 Fixed infinite scroll on the team screen (#1095)
closes https://github.com/TryGhost/Ghost/issues/10307
- removed infinite scroll from the team screen
- adjusted team screen behaviour to pull from the local cache and update in the background to speed up navigation to the screen
- use `{{vertical-collection}}` to render the users list for faster initial render with many users
2019-01-14 14:50:30 +00:00
Kevin Ansfield
bccd9ea0b3
🎨 Removed auto hide/show navigation toggle (#1094)
no issue
- the autonav behaviour has outlasted it's usefulness - it was mostly useful for editing but the editor screen is now always fullscreen and the number of low-resolution screens has dropped significantly
- dropped the components and all supporting code associated with autonav behaviour
2019-01-10 15:00:07 +00:00
Kevin Ansfield
079c8ccc2c
Migrate to latest ember, ember-mocha and modern ember testing (#1044)
no issue
- upgrade to latest `ember-source` and related dependencies including `ember-cli`
- upgrade to latest `ember-mocha` and modern ember testing setup
    - https://github.com/emberjs/rfcs/blob/master/text/0268-acceptance-testing-refactor.md
    - switch from using global acceptance test helpers and `native-dom-helpers` to using the new `ember-test-helpers` methods
    - use [`chai-dom`](https://github.com/nathanboktae/chai-dom) assertions where in some places (still a lot of places in the tests that could use these)
- pin `ember-in-viewport` to 3.0.x to work around incompatibilities between different versions used in `ember-light-table`, `ember-infinity`, and `ember-sticky-element`
    - incompatibilities manifested as "Invalid value used as weak map key" errors thrown when using `ember-light-table` (subscribers screen)
- pin `ember-power-datepicker` to unreleased version that contains a move from global acceptance test helpers to modern test helpers
2019-01-02 09:58:55 +00:00
Ben Jenkinson
cab613fe64 Added "Recently updated" sorting option to Stories screen (#1023)
no issue
2018-11-26 12:26:45 +00:00
Kevin Ansfield
f884eb891d Fixed sticky validation errors when editing webhooks
refs https://github.com/TryGhost/Ghost/issues/10137
- when closing the edit webhook modal we were rolling back the changed attributes of the webhook model but not clearing the errors object which meant a validation error was shown when re-opening the edit webhook modal
- add `reset()` method to the webhook edit controller and call that when leaving the edit route instead of only rolling back the changed attributes
2018-11-13 11:40:24 +00:00
Kevin Ansfield
4795658554
🎨 Changed tags list, filter dropdown, and select input to sort alphabetically (#1066)
no issue
- switch tags sorting from ID based to alphabetical
- pre-requisite to nested tags sorting
2018-11-07 15:06:28 +00:00
Kevin Ansfield
9b9944bfa2
Added custom integrations - Content API Keys and "Site rebuild" webhooks (#1063)
closes TryGhost/Ghost#9942
- move custom integrations UI out from behind the developer experiments flag
- put Admin API key and web hook secret fields behind the developer experiments flag
- do not show "unsaved changes" modal when adding/editing a webhook
- fixed all webhooks showing for each custom integration
2018-11-06 10:59:47 +00:00
Rishabh Garg
4ca1cc556e Fixed sanitization of user invited emails for notification message (#1060)
no issue

- Escaped email ids string sent to notification message during blog setup

Credits: Antony Garand
2018-10-29 12:19:46 +00:00
Peter Zimon
5f6d9d2c89 Integration UI refinements (#1059)
no issue
* Integration detail page design refinements
* Fixing error message layout on integration detail screen
* Heading details
* Margin refinements
* Refine webhooks modal
* Lines and font sizes
* Replace integrations icon
2018-10-24 14:04:17 +01:00
Kevin Ansfield
1142729697
Added ability to upload integration icons (#1058)
no issue
- add `{{aspect-ratio-box}}` to make it easier to adjust box sizes at a fixed ratio based on container height which isn't possible with CSS directly
- used `{{gh-uploader}}` to add upload facility to the icon shown on the integration screen
2018-10-23 10:29:49 +01:00
Kevin Ansfield
d58363513c Minor cleanups
no issue
- replace unnecessary destructuring with direct import
- remove unused action
2018-10-22 21:00:02 +01:00
Fabien O'Carroll
11ec0835f6 Added ability to delete integrations (#1057)
no issue
- adds delete integration modal, and delete button on the integration page to trigger it
2018-10-19 17:37:27 +01:00
Kevin Ansfield
eeaa5f0999
Added edit webhook modal (#1056)
requires https://github.com/TryGhost/Ghost/pull/10033
- added `settings.integration.webhooks.edit` route
  - `/integrations/:integration_id/webhooks/:webhook_id`
- added error handling to the webhook form modal that copes with the actual errors we get back from the server
- added `event-name` helper to display humanised event names in the webhooks list
- added delete button to the webhooks list and associated confirmation modal
2018-10-19 17:34:53 +01:00
Kevin Ansfield
af058008d6 Improved api key clipboard copy behaviour
no issue
- display "last seen" time if available for API keys
- use CSS to for hover behaviour instead of JS toggle
- add background to "copy" button so it's visible when on top of key data
- use ember-concurrency tasks instead of actions and used the derived state to show a temporary "copied to clipboard" message in place of the "last seen at" time
2018-10-19 00:09:05 +01:00
Kevin Ansfield
519b736015
Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

- `integration`, `api-key`, and `webhook` models and respective mirage mocks
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- adds custom integrations list to integrations screen
- adds custom integration screen
  - allow editing of integration details
  - show list of webhooks
  - webhook creation modal

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield
0cbc8f5eaf
Adjust post URL handling for API v2's absolute URLs (#1055)
no issue
- API v2 outputs absolute URLs so we no longer need to construct full URLs ourselves
2018-10-16 16:54:15 +01:00
Kevin Ansfield
24befb7a5c
🐛 Fixed theme download links (#1053)
closes https://github.com/TryGhost/Ghost/issues/10011
- theme download URLs were missing the `/download/` portion
2018-10-15 13:18:44 +02:00
Fabien O'Carroll
42912cf39b Use Admin API v2 with session auth (#1046)
refs #9865
- removed all `oauth2` and token-based ESA auth
- added new `cookie` authenticator which handles session creation
- updated the session store to extend from the `ephemeral` in-memory store and to restore by fetching the currently logged in user and using the success/failure state to indicate authentication state
  - ESA automatically calls this `.restore()` method on app boot
  - the `session` service caches the current-user query so there's no unnecessary requests being made for the "logged in" state
- removed the now-unnecessary token refresh and logout routines from the `application` route
- removed the now-unnecessary token refresh routines from the `ajax` service
- removed `access_token` query param from iframe file downloaders
- changed Ember Data adapters and `ghost-paths` to use the `/ghost/api/v2/admin/` namespace
2018-10-05 19:46:33 +01:00
Kevin Ansfield
d878d2e31f Fixed non-admin redirects on integration routes
no issue
- after un-nesting the built-in integration routes they no longer had the automatic redirect for non-admins
- added our non-admin redirect behaviour to all of the integration routes
- added our non-admin redirect behaviour to the Zapier route which didn't even have an authenticated redirect previously
- added acceptance test for Zapier route so verify the new behaviour
- wrapped the Zapier widget `<script>` tag in an "is testing" conditional so that the external script doesn't get loaded during tests
2018-10-04 12:16:41 +01:00
Kevin Ansfield
a86f8d01ae Re-jigged integrations routes to support nested modal route
no issue
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- sets us up for having a `settings.integrations.new` modal route that sits on top of the index screen
2018-10-04 11:10:17 +01:00
Kevin Ansfield
5390f51e36
Renamed Apps to Integrations (#1050)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
2018-10-04 11:02:36 +01:00
Kevin Ansfield
9dd545cbb5 Fixed submit-on-enter and password manager issues on signup
closes https://github.com/TryGhost/Ghost/issues/9868
- moved submit action to the `<form>` which allowed removal of the per-input enter key handlers
- changed submit button to trigger the form submit
- improved markup for password managers
  - linked labels with inputs
  - changed button to a "submit" type and linked it with the form
  - added hidden email input at the bottom of the form in case password managers do not take disabled inputs into account
2018-09-17 16:03:58 +01:00
Kevin Ansfield
345d7c61d3 Improved variable naming in labs downloadFile action
no issue
2018-09-17 11:48:13 +01:00
Katharina Irrgang
065d39ee0f
Updated links to use v2 docs (#1036)
no issue

- found some more v1 links
2018-08-15 23:35:17 +02:00
Kevin Ansfield
11e301b63c Made Koenig the default editor, removed Koenig labs flag 2018-08-14 17:49:50 +01:00
Kevin Ansfield
05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
02f45c2a3a Added routes.yaml upload to Labs screen
refs https://github.com/TryGhost/Ghost/issues/9744
- adds `routes.yaml` upload using the same UI as the `redirects.json` upload
  - upload: `POST /settings/routes/yaml/`
  - download: `GET /settings/routes/yaml/`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
b6bc7d6a61 Koenig - Fixed full-width images not respecting fullscreen mode
refs https://github.com/TryGhost/Ghost-Admin/pull/1030
- fixed typo
2018-07-26 13:28:02 +01:00
Kevin Ansfield
faf20c42d5
🎨 Koenig - Hide sidebar when editing (#1030)
refs https://github.com/TryGhost/Ghost/issues/9724
- when Koenig is active, toggle `ui.isFullscreen` when entering/leaving the editor route
- add `ui.isFullscreen` to the `showNavMenu` CP in the application controller
- when in fullscreen mode, display a "< Stories" link in the editor header
- refine editor header style
2018-07-26 12:53:23 +01:00
Kevin Ansfield
09a8c7fa88 Koenig - Added reading time and word count display
refs https://github.com/TryGhost/Ghost/issues/9724
- add `registerComponent` hook to cards so that `{{koenig-editor}}` can fetch properties from card components directly
- add word count and reading time utilities
- add throttled word count update routine to `{{koenig-editor}}` that walks all sections and counts text words or fetches word/image counts from card components
- add `wordCountDidChange` hook to `{{koenig-editor}}` so that word count + reading time can be exposed
- modify editor controller to update it's own word count property when koenig triggers it's action
- modified the editor template to show reading time + word count next to the post status
2018-07-20 15:53:21 +01:00
Kevin Ansfield
fd9fe42296 🎨 Koenig - Keep posts free of blank cards
refs https://github.com/TryGhost/Ghost/issues/9623
- add new `deleteIfEmpty` option when defining cards
- add `.cleanup()` method to `{{koenig-editor}}` that will remove any blank cards
- pass `{{koenig-editor}}` instance up to the editor controller when it is initialised
- call `.cleanup()` in the editor controller when performing full saves, when leaving the editor with a draft, and when opening the editor with a draft
2018-06-14 16:55:02 +01:00
Zimo
150f68e826 Koenig Editor Beta Release
refs https://github.com/TryGhost/Ghost/issues/9505
- see https://forum.ghost.org/t/koenig-beta-release/1284 for full details
- moved Koenig editor checkbox from experimental to Beta
- added info message support in editor screen
- removed alert when opening markdown-incompatible post with Koenig disabled
2018-05-17 12:01:00 +01:00
Kevin Ansfield
902e361e22 Add {{background-image-style}} helper
no issue
- cleans up multiple CPs that were only outputting a background image style
- moves URL decoding/encoding and `htmlSafe` output into one place
2018-05-14 13:04:53 +01:00
Kevin Ansfield
c71437048a 🐛 Fixed low-resolution gravatar images on Team/User screens
closes https://github.com/TryGhost/Ghost/issues/9563
- fixes incorrect gravatar URLs by removing incorrect HTML encoding of the URL and enforcing URL encoding
- centralise image URL generation in the User model so that default image logic isn't spread across the app
- remove unnecessary proxy mixin from `ghost-paths` service (allows property access without `.get()`)
2018-05-14 12:15:08 +01:00
Kevin Ansfield
87bbf924a4 Remove more import Ember via module imports
refs https://github.com/TryGhost/Ghost/issues/8927
- removes usage of `Ember.testing`
- removes usage of `Ember.uuid`
- removes usage of `Ember.Debug.registerWarnHandler`
2018-05-03 17:52:39 +01:00
Kevin Ansfield
8c23d5acef Removed used of ember-data-filter
closes https://github.com/TryGhost/Ghost/issues/9591
- swapped use of `store.filter` for a combination `store.peekAll` and CPs to filter the result set
2018-04-30 13:54:09 +01:00
Kevin Ansfield
61031c35a3 🐛 Fixed admin URL not updating when changing tag slug
closes https://github.com/TryGhost/Ghost/issues/9571
- uses `window.replaceState` to update the URL when a tag is saved with a new URL
    - ensures back button doesn't result in 404
    - use `windowProxy` util so that behaviour can be tested
2018-04-30 12:29:43 +01:00
Kevin Ansfield
f6ec2f23f5 Move mobiledoc knowledge out of {{gh-markdown-editor}}
no issue
- pre-requisite for using `{{gh-markdown-editor}}` inside a Koenig card
- switch to passing markdown into `{{gh-markdown-editor}}`
- move markdown->mobiledoc logic into the `editor` controller
2018-04-20 15:43:44 +01:00
Kevin Ansfield
351c7adf89 Fixed post autosave for changes to nested objects in mobiledoc
no issue
- fixes a problem that appeared after the first save of a post; refs for nested objects in the `mobiledoc` object didn't change so any time they were updated in the `scratch` object they were also updated in the `mobiledoc` object which broke our dirty attributes tracking
- by creating a deep copy during save we ensure `scratch` and `mobiledoc` are kept separate without causing unnecessary copying (saves occur much less frequently than scratch updates)
2018-04-19 17:29:01 +01:00
Austin Burdine
fd6f2551bb Bower => NPM (#972)
no issue

- Convert validator to an npm dependency
  - clean up validator imports
  - fix validator function imports
  - remove unused validator extensions
- Convert devicejs to an npm dependency
- Convert remaining used bower deps to npm deps
- 🔥 Remove bower & unused bower dependencies
- remove globals imports in favor of direct module imports where possible
2018-03-19 17:56:09 +00:00
Kevin Ansfield
cbcf09e4fc Fixed asset rewriting for default user images
no issue
- ember-cli's asset rewriting was not picking up the asset URLs when they were directly embedded in a template string, fix is to ensure the image location is unambiguous by assigning it to a variable first
2018-03-19 15:31:35 +00:00
Kevin Ansfield
e648de4e7e ESLint fixes for latest eslint-plugin-ember
no issue
2018-03-19 13:05:02 +00: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
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
Kevin Ansfield
3bbd488ff2 🐛 Fixed editor autofocus when starting a new post
no issue
- we were setting the `shouldFocusEditor` value correctly but then immediately resetting it again 🙈
- updated the logic to change the value when going from new->edit as well as setting it correctly _after_ all of the controller values are reset in the `setPost` method
2018-01-25 13:14:50 +00:00
Kevin Ansfield
41b3521cf1
Resurrect the old alpha Koenig editor (#916)
requires https://github.com/TryGhost/Ghost/pull/9277

- added a `koenigEditor` feature flag
  - modified the feature service to accept a `developer` boolean on the options object passed into the internal `feature` method, if `true` the feature flag won't be enabled unless the `enableDeveloperExperiments` config option is also enabled
  - added "developer feature testing" section in labs that's only visible if `enableDeveloperExperiments` config flag is enabled
  - added koenig editor toggle to the developer section in labs

- enabled a switch between the markdown and koenig editors
  - modified the default value of the `mobiledoc` attr in the Post model to be a blank mobiledoc or blank markdown mobiledoc depending on the feature flag
  - modified the `autofocus` switch in editor controller's `setPost` method so that it is always switched, even for new->edit where the post model isn't swapped
  - added a compatibility check to the editor controller's `setPost` method that shows an alert and force enables the koenig editor if the koenig flag is not enabled and the opened post is not compatible with the markdown editor

- fixed various issues that have appeared due to the old koenig alpha becoming out of sync with master
2018-01-18 15:36:01 +00:00
Kevin Ansfield
51e890b991
Refactor new->edit transition to avoid editor re-renders (#949)
closes TryGhost/Ghost#8287
closes TryGhost/Ghost#8750
- moved all editor model functionality into the new `editor` route+controller
- moved editor template from `editor/edit.hbs` to `editor.hbs`
- refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit
- fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered
- fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component
- added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller
- removed editor route/controller mixins
- removed the `editor.edit` and `editor.new` controllers
2018-01-17 13:27:37 +00:00
Kevin Ansfield
ac16e6504c ESLint: Consistent ember property/method ordering
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-components.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-controllers.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-routes.md
2018-01-12 12:17:56 +00:00
Kevin Ansfield
0ef503f23d ESLint: Don't use observers if possible
closes https://github.com/TryGhost/Ghost/issues/8690
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-observers.md
- remove observers where possible
- move night shift toggle behaviour to the feature service
	- refresh feature service after import to fix stuck night shift toggle
2018-01-12 12:17:56 +00:00
Kevin Ansfield
050f4d99b6 ESLint: Alias model in controllers
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/HEAD/docs/rules/alias-model-in-controller.md
- replace `model` with a meaningful property name everywhere possible
- refactor `design` and `general` settings controllers to use a directly injected settings service rather than passing it in as a "model" to be more explicit
2018-01-12 12:17:56 +00:00
Kevin Ansfield
7afb88a0c2 Switch to eslint-plugin-ghost extending plugin:ghost/ember
no issue
- fix lint errors in lib/gh-koenig
- fix ghost:base eslint errors
- update ember plugin refs, remove ember-suave plugin refs
- remove old jshint refs
- add `lint:js` script
- switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
2018-01-12 12:17:56 +00:00
Kevin Ansfield
63fe1b1a88
🎨 Move "Update available" notification to the About screen (#894)
refs https://github.com/TryGhost/Ghost/issues/5071

Upgrade messages are now shown on the About screen rather than as alerts. Notifications that are marked as `top` or `custom` are still shown as alerts to allow for certain upgrade messages to be given more visibility.

- remove old `upgrade-notification` service
- update the `upgrade-status` service:
  - add a `message` property that contains an upgrade notification if any exists
  - add a `handleUpgradeNotification` method that accepts a Notification model instance and extracts the `notification.message` property into a html safe string for use in templates
- when loading server notifications during app boot, pass notifications that aren't marked as `top` or `custom` to the new `handleUpgradeNotification` method
- update the `about.hbs` template to pull the upgrade message from the `upgradeStatus` service
2018-01-09 14:23:36 +00:00
Kevin Ansfield
b8fc5606b8 Added Zapier app with pre-built zap templates list (#943)
no issue

- add Zapier app to Apps screen
- use Zapier's zap template embed widget to list our pre-built templates
2018-01-09 11:36:41 +01:00
Abijeet Patro
d28ed0064c Prevent "Invalid URL" errors due to trailing spaces when editing Slack Webhook URL (#925)
no issue
- trim the slack URL in the `updateURL` action
2018-01-08 10:31:53 +00:00
Kevin Ansfield
b8970820e0
🐛 Fixed missing error message for unexpected errors during import (#936)
no issue
- show an error message when a non-Ghost error is received, eg. when a proxy server times out due to a large import
2018-01-03 12:30:42 +00:00
Kevin Ansfield
a51fcba8cb
Don't destructure Ember.testing (#933)
no issue
- `Ember.testing` is or will soon be a getter/setter in Ember with the value set during a test, however destructuring will read the value when the module is evaluated
- moves all uses of `Ember.testing` inline
2018-01-02 10:19:59 +00:00
Kevin Ansfield
756439fc75 🐛 Fixed unresponsive upload buttons
closes https://github.com/TryGhost/Ghost/issues/9292
- fix a global find/replace error that caused the wrong element classes in the general and labs file dialog trigger events
2017-11-30 07:00:25 +00:00
Kevin Ansfield
b696c750b8 Use computed property brace expansion
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/use-brace-expansion.md
2017-11-25 09:49:49 +00:00
Kevin Ansfield
f8c7d606c7 Avoid leaking state in Ember objects
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/avoid-leaking-state-in-ember-objects.md
2017-11-25 09:49:49 +00:00
Kevin Ansfield
c903dc9efc Remove unused top notification count functionality
no issue

- in a very old iteration of the admin design we needed a data attribute containing the number of notifications in order to add extra spacing in the styles. This hasn't been necessary for a long time and there are easier ways to do it now than using observers.
2017-11-24 11:15:59 +00:00
Kevin Ansfield
14aa87ed39 Clean up markdown help toggle
no issue

The markdown help link was removed from the sidebar so the only link to toggle the markdown help modal is now the markdown editor yet we we still had a more general implementation with a confusing pass-through of closure actions.

- move the markdown modal toggle and display into the `{{gh-markdown-editor}}` component
2017-11-24 11:15:59 +00:00
Kevin Ansfield
74428efd8b
🐛 Fixed inability to re-upload the same redirects file (#912)
closes https://github.com/TryGhost/Ghost/issues/9266
- `emberx-file-input` passes a `resetInput` function through to it's action handler but we weren't doing that in our override component. Added the missing functionality and updated all of our handlers to use that instead of doing manual resets
- added a `setFiles` action to `{{gh-uploader}}` and yield it for use in block invocations
2017-11-22 17:04:48 +00:00
Kevin Ansfield
99c60d5060 🐛 Fixed missing errors on failed import
no issue
- bug was introduced in https://github.com/TryGhost/Ghost-Admin/pull/902 where the change to `response.payload.errors` from `error.errors` was missed
2017-11-16 14:04:33 +00:00
Kevin Ansfield
539f9cabb4
🎨 Added "Featured posts" filter and badge to stories list (#907)
closes https://github.com/TryGhost/Ghost/issues/9234
- add `featured` badge to stories/pages that have the featured flag
- add "Featured posts" to the post type filter dropdown
- simplified badge logic in `{{gh-posts-list-item}}`
2017-11-10 17:36:27 +00:00
Kevin Ansfield
ea34d49c89
🐛 Fixed failing Facebook URL validation for group urls (#906)
closes https://github.com/TryGhost/Ghost/issues/9160
- simplified FB validation to allow any valid FB url (autocomplete of raw usernames and facebook-like URLs is still in place)
- fixed a bug with sticky Twitter validation message, if you entered an invalid URL then changed it to an invalid username you still saw the invalid URL message (surfaced through new test helpers for validating facebook/twitter fields)
2017-11-10 16:38:30 +00:00
Kevin Ansfield
82d1473406 use windowProxy to avoid mangling URL during team acceptance tests 2017-11-10 14:27:47 +00:00
Kevin Ansfield
ddc7b857b5
Bump ember-ajax dependency (#902)
no issue
- upgrade `ember-ajax` to 3.0.0
- `ember-ajax` [now passes the payload through directly](https://github.com/ember-cli/ember-ajax/releases/tag/v3.0.0) rather than trying to normalize it so all our error handling needed to be updated
2017-11-03 22:59:39 +00:00
Aileen Nowak
6ef4c622ad 🎨 Added confirmation dialogs when leaving screens with unsaved changes (#891)
closes TryGhost/Ghost#9119, refs TryGhost/Ghost#8483

- Apps - AMP
   - Added `leave-settings-modal` component to Settings - Apps - AMP
- Apps - Slack
   - Added `leave-settings-modal` component to Settings - Apps - Slack
   - Added a `triggerDirtyState` action that will uses a new Array with the input data to trigger the dirty state on the parent settings model
- Apps - Unsplash
   - Added `leave-settings-modal` component to Settings - Apps - Unsplash
   - Used manual tracking of changes with using a custom `dirtyAttributes` property and a `rollbackValue` to manually rollback the `isActive` attribute on the model
- Code injection
   - Added `leave-settings-modal` component to Settings - Code injection
- Design
   - Added `leave-settings-modal` component to Settings - Design (only for navigation model)
   - Used manual tracking of changes with using a custom `dirtyAttributes`
   - Added an additional `updateLabel` action to underlying `gh-navitem` component which gets fired on the `focusOut` event, to detect changes on the label
- Team - User
   - Added `leave-settings-modal` component to Team - User
   - Used manual tracking of changes with using a custom `dirtyAttributes` to track changes in slug and role properties
2017-10-31 15:27:25 +00:00
Kevin Ansfield
72ff75b935
New tags input, drop selectize & jquery-ui deps (#892)
closes https://github.com/TryGhost/Ghost/issues/6458
- swap `ember-sortable` for `ember-drag-drop` in navigation UI
- extract PSM tag input into new `{{gh-psm-tags-input}}`
- add new `{{gh-token-input}}` that wraps `ember-power-select` and `ember-drag-drop` to replicate the previous selectize based tags input
- enhance `{{gh-psm-tags-input}}` behaviour to highlight selected primary tag and show "primary/internal" in selected tag titles
- 🔥 remove `selectize`
- 🔥 remove `jquery-ui`
- 🔥 remove unused `{{gh-navigation}}` component
2017-10-31 09:10:49 +00:00
Kevin Ansfield
238983a5df Match service/controller import to ember-modules-codemod style for consistency
no issue

Automated tools, code generators, and editor integrations are increasingly standardising on the import style used in `ember-modules-codemod`. Our import style differed a little with regards to service/controller injection imports which meant we were starting to see inconsistent naming.
2017-10-30 09:38:01 +00:00
Aileen Nowak
4eff42bdac Match client-side password validation to new server-side rules (#899)
refs TryGhost/Ghost#9150

- added a new validator for password validations that will take care of the rules client side
- Passwort rules added:
   - Disallow obviously bad passwords: 1234567890, qwertyuiop, asdfghjkl; and asdfghjklm
   - Disallow passwords that contain the words "password" or "ghost"
   - Disallow passwords that match the user's email address
   - Disallow passwords that match the blog domain or blog title
   - Disallow passwords that include 50% or more of the same characters: 'aaaaaaaaaa', '1111111111' and 'ababababab' for example.
- When changing the own password, the old password is not affected by the new validations
- Validation are running on
   - setup
   - signup
   - password change in Team - User (only new passwords are validated)
   - passwort reset
2017-10-26 11:02:17 +01:00
Kevin Ansfield
3da1702af9 Fix Ember deprecations and warnings (#895)
no issue 

- `controller.content` will no longer be an alias to `controller.model`
- split relationships and `attrs` in Post model, add missing transforms
- fix unknown `error` field in payload warning when `/users/me` returns 404 during tests
- fix unsafe style binding warnings
2017-10-13 16:39:49 +07:00
Katharina Irrgang
cb576b14d3 Display private RSS feed url in general settings (#888)
refs https://github.com/TryGhost/Ghost/issues/9001

- show private feed url if private blogging is enabled
- added a `.avoid-break-out` CSS utility class to prevent layout issues caused by non-breaking text such as long links
2017-10-05 10:59:14 +01:00
Aileen Nowak
bbbe6038b2 🎨 Added confirmation dialog when leaving settings screen with unsaved changes (#871)
closes TryGhost/Ghost#8483

- Added a new modal component that gets rendered when leaving general/settings after changes have been done but not saved
- Removed independent saving logic for social URL for consistent UX
2017-10-04 11:49:30 +01:00
Kevin Ansfield
56ba6e2171 🐛 Fixed missing "file too large" text for import uploads (#867)
closes https://github.com/TryGhost/Ghost/issues/8660

- detect a `413` when uploading an import and show the appropriate message
- refactor `{{gh-file-upload}}` to use closure actions
- add test selectors to import errors HTML
- note: doesn't include tests because `{{gh-file-upload}}` doesn't rely on the file input's `change` event (as used by our other uploader components to facilitate testing) and browsers don't allow us to artificially set and submit files
2017-09-22 21:59:05 +02:00
Kevin Ansfield
6cf39d49af Upload/Download redirects UI
closes TryGhost/Ghost#9028

- add upload/download UI to labs screen
  - displays success/failure state in the button for 5 secs after uploading
- minor refactor to remove redundant `{{#if}}` conditionals in general settings screen
- minor naming refactor of `onUploadFail` -> `onUploadFailure` for `{{gh-uploader}}`'s closure action
2017-09-21 17:01:40 +02:00
Kevin Ansfield
2e12987938 🎨 Enabled Unsplash integration by default (#862)
no issue

- Unsplash integration is enabled by default for all users
- it's no longer necessary to create your own Unsplash application and configure your application ID
2017-09-20 12:19:48 +02:00
Kevin Ansfield
d4faa15f46 Upgrade eslint dependencies (#855)
no issue

- bump ember-cli-eslint and eslint-plugin-ember
- fix indentation & "unnecessary escape chars" lint errors
2017-09-11 14:56:11 +07:00
Kevin Ansfield
6cb04e4c41 Removed defunct Ghost OAuth code (#848)
refs https://github.com/TryGhost/Ghost/issues/8958

- Ghost OAuth isn't coming back, time for the code to disappear and simply all the things
- fixes the `Usage of router is deprecated` notices that flood the console/test logs when testing
2017-09-04 21:17:04 +02:00
Kevin Ansfield
27c169b59b 🐛 Fixed "active" state of apps on apps index screen (#843)
no issue

On the apps index screen there were conditionals for each app so that active apps show "Active" instead of "Configure" when they are activated - the conditionals weren't working because the properties they check for weren't available in the template's context.

- add a new `settings/apps/index` controller that imports the `settings` service
- updates template conditionals to check for properties on the `settings` service
2017-08-30 14:31:04 +02:00
Erik Hanchett
e1c3ff26f9 🐛 Fix field focus when adding navigation items (#835)
closes TryGhost/Ghost#8764
- when adding a new nav item in the `design` controller, use jQuery to give focus to the name field of the last navigation item
2017-08-24 12:53:14 +01:00
Kevin Ansfield
8c2f054b04 🐛 Fix save button showing "Retry" when user slug field loses focus (#834)
no issue
- the `updateSlug` task never returned a value if there was no change needed, this meant that giving the slug field focus then blurring it again caused the "Save" button to become red with "Retry" text
- always return true from `updateSlug` - this stops the button from showing "Retry" and will instead show "Saved" which is a little less confusing
2017-08-22 14:59:49 +07:00
Kevin Ansfield
88449ed639 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00
Kevin Ansfield
852b9eec05 Remove usage of jquery-file-upload (#815)
closes https://github.com/TryGhost/Ghost/issues/6661
- refactor `gh-profile-image` component to use native browser functionality
- remove `jquery-file-upload` bower dependency
2017-08-18 10:27:42 +07:00
Seth Lilly
947017427a 🎨 Fix positioning of direction arrows in subscribers table (#824)
closes TryGhost/Ghost #8876
- Changed arrow styles to enable correct positioning. The sort arrow displayed below the `th` label; this CSS change fixes it.
- Capitalization change: opinionated, but changing capitalization of “Address” to match “Subscription Date”.
2017-08-17 11:46:10 +01:00
Kevin Ansfield
1e3191b811 Unsplash integration
closes https://github.com/TryGhost/Ghost/issues/8859, requires https://github.com/TryGhost/Ghost/pull/8895
- adds Unsplash app to app settings
  - enable/disable toggle
  - validation and testing of Unsplash App ID
  - Unsplash App ID field hidden if provided via Ghost config
  - adds `fetchPrivate` method to `config` service to pull config that requires authentication and updates authentication routines to fetch private config
- adds Unsplash buttons to editor toolbar and `{{gh-image-uploader}}`
  - only present when Unsplash app is enabled
  - opens Unsplash image selector when clicked
  - `{{gh-image-uploader}}` has a new `allowUnsplash` attribute to control display of the unsplash button on a per-uploader basis
- adds Unsplash image selector (`{{gh-unsplash}}`)
  - uses new `unsplash` service to handle API requests and maintain state
  - search
  - infinite scroll
  - zoom image
  - insert image
  - download image
- adds `{{gh-scroll-trigger}}` that will fire an event when the component is rendered into or enters the visible screen area via scrolling
- updates `ui` service
  - adds `isFullscreen` property and updates `gh-editor` so that it gets set/unset when toggling editor fullscreen mode
  - adds `hasSideNav` and `isSideNavHidden` properties
- updates `media-queries` service so that it fires an event each time a breakpoint is entered/exited
  - removes the need for observers in certain circumstances
2017-08-15 16:01:12 +01:00
Kevin Ansfield
0eac658b91 Refactor general UI state into a service
no issue
- moves general UI state control such as menu display, autonav, settings menu, etc into a `ui` service for easier use within components
- no longer required to jump through hoops passing state and actions down from application controller into components
- removes indirect "route" actions in favour of calling actions/methods directly on the `ui` service
2017-08-15 16:01:12 +01:00
John O'Nolan
ece1d8cef1 Resolve nightshift visual bugs
Closes https://github.com/TryGhost/Ghost/issues/8731, closes https://github.com/TryGhost/Ghost/issues/8742

- Visual bugs resolved
- Slack test message converted from alert to notiftication
- Slack test message notification copy update
- Increased size for notifications
2017-07-31 11:49:49 +04:00
Kevin Ansfield
c4ad8b78b0 🐛 fix filter dropdown issues
closes https://github.com/TryGhost/Ghost/issues/8729, closes https://github.com/TryGhost/Ghost/issues/8728
- remove the duplicated `max-height` rules for different parts of the power select dropdowns - they were interacting with each other and causing a large part of the lists to be unreachable
- bump the `bufferSize` so that enough dropdown items are rendered to fill the dropdown list
- filter the temporary tags that are created when using the PSM tags input so duplicates aren't visible in the tags dropdown filter
2017-07-21 19:01:54 -04:00
Kevin Ansfield
33be8ebcec 🐛 fix "failed" button flash on password reset (#791)
closes https://github.com/TryGhost/Ghost/issues/8688
- `reset` task wasn't returning a truthy value on success so `gh-task-button` flashed the "retry" state before the transition happened
2017-07-20 19:12:33 +07:00
Kevin Ansfield
6113b1a743 🐛 fix guard for inviting owner in setup/three (#786)
refs https://github.com/TryGhost/Ghost/issues/8692

- fixes the guard on setup/three against inviting the owner user set up
on setup/two (we were sending invites for every e-mail in the list
rather than only valid e-mails)
- adds a check to see if we get any invalid errors from the server and
will show those separately to the `x emails failed to send` alert
2017-07-20 12:08:34 +02:00
Kevin Ansfield
69539563c7 🐛 fix double-click on post to open editor (#780)
closes https://github.com/TryGhost/Ghost/issues/8675
- move `gh-posts-list-item` to closure actions
- add missing `openEditor` action in posts controller
2017-07-13 16:55:13 +07:00
Kevin Ansfield
ab41d8b84e 🎨 Focus editor content area by default (#768)
closes TryGhost/Ghost#8525

- always give focus to the editor content area by default when loading the editor
- allow content autosave to work for new posts (it was previously turned off for new posts)
- move transition-on-save behaviour from editor/new controller into the controller mixin's save routine
- cancel background autosave when "are you sure you want to leave?" modal is shown as it can cause the "leave" option to fail because it attempts to delete the post record that can be in flight (plus if we're saving anyway it doesn't make much sense to ask the user  🙈) - this is quite an edge-case as it will only happen if the user makes a content change to a draft post then tries to leave the screen within 3 seconds
- change the editor placeholder text
- wait for any save task to finish before exiting the new post route (fixes infinite loop and popup of "are you sure you want to leave?" modal that is then closed automatically straight away
- add a guard to the `gh-post-settings-menu` component so that if the authors query takes a while we don't end up trying to set a value when the component has already been removed
2017-07-10 17:09:50 +02:00
Kevin Ansfield
e7b378ea05 🚀 supercharge tags performance
closes https://github.com/TryGhost/Ghost/issues/8540
- use `{{vertical-collection}}` in the tags dropdown filter list, opening the dropdown is now virtually instant as it's not attempting to immediately render components for every tag in the list
- remove pagination/infinite scroll from tags screen
- load all tags when accessing the tags screen
  - will pause to show spinner if no tags have previously been loaded
  - if tags exist in the ember data store, show the list immediately and load/update list in the background
- use `{{vertical-collection}}` to render enough tags to fill the scrollable area with a small buffer and use occlusion and element re-use to swap tags in whilst scrolling (suuuuper fast no matter number of tags loaded)
- scroll tags into view when they are selected (keyboard nav now makes a lot more sense)
- tested with 875 tags and 2x/5x CPU throttling with no major slowdowns 🎉
2017-07-07 17:53:08 +01:00
Kevin Ansfield
016d3f882d 🔥 remove content screen keyboard shortcuts
closes https://github.com/TryGhost/Ghost/issues/8662
- removes `k`, `j`, `up`, `down` shortcuts for changing the active post (these were already mostly unusable in 1.0) and the associated `enter` and `ctrl/cmd+backspace` commands for opening and triggering the delete modal respectively
- removes the `c` shortcut for opening the new post screen
2017-07-07 10:37:24 +01:00
Aileen Nowak
a270d2b183 💅🏼 Imprve theme activation error messages (#756)
refs TryGhost/Ghost#8530

This PR takes care that the modals for theme activation gets the same treatment as theme upload modal:
- differentiate between normal and fatal errors
- list headings for each error type (fatal, normal or warning)
- update test
2017-06-22 19:19:01 +02:00
Kevin Ansfield
54416cbb7a 🐛 fix title not updating after import (#749)
closes https://github.com/TryGhost/Ghost/issues/8508
- manually set `config.blogTitle` when reloading settings after a
successful import
2017-06-22 11:51:38 +01:00
Katharina Irrgang
dfbbd53265 🐛 fix image upload for icons: reset input (#754)
closes TryGhost/Ghost#8545
2017-06-20 16:54:27 +07:00
Kevin Ansfield
7e5317ba0b 📖 update all support.ghost.org links to docs/help.ghost.org (#740)
no issue
- support.ghost.org has gone away, we now have self-host/dev
documentation on https://docs.ghost.org and user documentation at
https://help.ghost.org
2017-06-15 18:19:12 +01:00
Kevin Ansfield
f1c337c5f9 🐛 fix saving users when slug has been changed (#731)
closes https://github.com/TryGhost/Ghost/issues/8547
- `window.history.state` is no longer a thing (not sure if it's a recent browser change or because we switched to hash-urls) so the URL change logic after a successful user save needs to use `window.location.hash` instead
2017-06-09 00:04:16 +07:00
Kevin Ansfield
43a18115ba 🐛 fix IE11 bugs and styles (#724)
closes https://github.com/TryGhost/Ghost/issues/8384

- fixes image uploads on settings/general by reverting to jQuery for triggering the file dialog because IE11 doesn't support `MouseEvent` events or have the `.closest` method on native DOM elements
- gives all SVG elements an explicit `width` and `height` - if one property is set to `auto` or not specified IE11 will treat it as 100% of the container
- fixes horizontal scroll + scrollbar on the main app viewport
2017-06-01 23:02:03 +02:00