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

285 commits

Author SHA1 Message Date
Aileen Nowak 9b014fa323 🎨 Improved warning about authored posts being removed when deleting a user (#951)
closes TryGhost/Ghost#9405
- users were still not noticing the warning that a user's posts are deleted along with the user
- improves the confirmation dialog layout to be clearer and even more explicit about authored posts being deleted along with the user
2018-01-23 10:45:19 +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 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 bd83aab585 🐛 Fixed navigation url inputs when configured URL has special characters (#941)
closes https://github.com/TryGhost/Ghost/issues/9373

- using an `<a>` element to parse a URL does not behave as expected when the URL has special characters because the `host` attribute will show the Puny URL version. Eg. `exämple.com` will become `xn--exmple-cua.com`
- `{{gh-navitem-url-input}}` was failing to manipulate the URL value because of the difference between the Puny URL encoded URL and the raw configured URL with unicode chars
- uses the `URI` module that's bundled with the imported version of `google-caja` to parse the URL via regexes rather than relying on native browser parsing
2018-01-07 12:14:24 +01:00
Kevin Ansfield 9d5d56ccb0
Skip tests that touch vertical-collection to fix random Travis failures (#938)
refs https://github.com/TryGhost/Ghost/issues/8805
- `{{vertical-collection}}` causes async issues and random failures in our tests
- we can't upgrade to the latest version which includes a test wait helper because it's buggy in Firefox
- skip the tests for now
2018-01-03 17:14:12 +00:00
Kevin Ansfield 312bd68f4c Always use closure actions
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/closure-actions.md
2017-11-25 09:49:49 +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
Aileen Nowak d7cd0e94f4 🎨 Increased allowed lengths of tag names/slugs and user names (#905)
refs TryGhost/Ghost#8143

Increases existing input validation length (soft limits) of the following fields:
   - `tags.name`: 191 chars
   - `tags.slug`: 191 chars
   - `users.name`: 191 chars
2017-11-09 14:31:25 +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
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
Aileen Nowak acd7951e6e Increase password length validations for changes and signups (#897)
refs TryGhost/Ghost#9150

- Increase the password length in validators for signups, pw resets, and password changes for users to 10 instead of 8
- Update tests
2017-10-18 17:46:25 +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
Kevin Ansfield 68442c5676 Custom Post Templates UI (#878)
refs https://github.com/TryGhost/Ghost/issues/9060

- add `{{gh-psm-template-select}}` component
  - allows selection of a custom template for a post if the active theme has custom templates
  - loads themes on render, only hitting the server if not already in the store
  - disables select if post slug matches a `post-*.hbs` or `page-*.hbs` template
- adds `customTemplate` attr to `Post` model
- adds `templates` attr to `Theme` model with CPs to pull out custom vs post/page override templates
- add `.gh-select.disabled` styles to make disabled selects look visually disabled
2017-10-10 14:26:19 +02: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 fb3dbbdff8 Fixed normalization of attrs in Mirage config and tests (#872)
no issue

We weren't being consistent in our use of Mirage's `normalizedRequestAttrs()` method which meant that in certain cases Mirage's internal database had duplicated attrs, the original set being `camelCase` and the new/updated set being `underscore_case` which was not only confusing but can lead to errors or unexpected behaviour in tests.

- updated Mirage config to always normalize where necessary
- updated tests to always use `camelCase` attrs
- added `HEAD` route handler for gravatar to avoid unknown route noise in tests
2017-09-28 09:33:00 +07: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 92e43b7514 Fixed missing Unsplash icons when API doesn't return an unsplash setting (#865)
closes https://github.com/TryGhost/Ghost/issues/9031

- add a default value `unsplash` value to the `setting` model so that Unsplash is activated when the server doesn't return an `unsplash` setting
- update the `unsplash-settings` transform to always deserialize or serialize to `{isActive: true}` when the value is blank or not parsable
- add acceptance regression test covering API not returning an `unplash` setting
- add unit tests for the `unsplash-settings` transform
2017-09-21 11:13:31 +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
Austin Burdine 268b53e648 🐛 Fixed draft/scheduled/published date in content list (#852)
closes https://github.com/TryGhost/Ghost/issues/8917

- rename gh-format-timeago to gh-format-post-time
- add special handling for published & scheduled posts as per https://github.com/TryGhost/Ghost/issues/8917#issuecomment-327583767
- fix some timezone issues in acceptance tests
2017-09-07 13:17:36 +02: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
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 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 b3d1474f40 Bump dependencies (#826)
no issue
- rollup of minor dependency updates
- bump yarn.lock sub-dependencies
- remove deprecated use of `testSelector`
2017-08-11 16:28:05 +01:00
Kevin Ansfield 192f42cb84 Added regression tests for handling of HTML errors (#816)
closes https://github.com/TryGhost/Ghost/issues/8203
- rename `version-mismatch-test.js` to the more generic `error-handling-test.js`
- add tests to simulate receiving HTML errors (eg, the type of error received from CloudFlare for a gateway timeout)
2017-08-10 17:59:53 +07:00
Aileen Nowak 837f37de26 Added Twitter & Facebook data override fields to PSM (#814)
refs https://github.com/TryGhost/Ghost/issues/8334, requires https://github.com/TryGhost/Ghost/pull/8827
- added open graph and twitter fields to `Post` model
- added facebook and twitter card pane to PSM
- 💅🏼 Added preview styles for custom FB/Twitter cards
2017-08-03 15:45:14 +04:00
Aileen Nowak 01469369a0 🎨 Improved theme validation messages (#812)
closes TryGhost/Ghost#8530

- Changed the wording for activation and uploading a theme to separate between error and warnings in the title and the body text for the modal
- Changed the wording of "Activated successful with warnings/errors" to "Activation successful with (warnings || errors)"
2017-08-02 14:30:47 +04:00
Kevin Ansfield 7c1f6e14b8 ️ Added per-post code injection fields to PSM (#811)
- Remove gh-tab* components
    - The PSM was the only place where the `gh-tabs-manager`, `gh-tab`, and `gh-tab-pane` components were being used. These were very old components and did not work well with newer Ember versions and best practices.
    - 🔥 remove `gh-tab*` components
    - 💄 fix indents in `gh-post-settings-menu` template
    - 🎨 add support for named subviews ready for additional PSM panes

- Added per-post code injection fields to PSM
    - add "Code Injection" pane to the PSM
    - implement `codeinjectionHead` and `codeinjectionFoot`  attributes on `Post` model and save values from PSM
    - use CodeMirror for the PSM code injection fields
2017-08-02 13:32:51 +04:00
Kevin Ansfield 45210fb8bf ️ Add "Excerpt" field to post settings menu (#810)
refs TryGhost/Ghost#8793

- add `customExcerpt` attr to Post model + reorder attrs to be alphabetical
- add "Excerpt" field to PSM
- add validation for `customExcerpt` length (max 300 chars)
- add style adjustments for custom excerpt UI
2017-08-01 12:24:46 +04:00
John O'Nolan 9b8362634b 🎨 Reorder fields in blog setup form (#808)
closes https://github.com/TryGhost/Ghost/issues/8622 by inadvertent knock-on effect.

People were having trouble with automatically entering password verification in blog title field. This re-orders the form to a more "normal" flow where password field is the last item on the page, so no risk of double-typing it.
2017-07-31 17:06:25 +04:00
Kevin Ansfield 5f215dc56a fix slack tests (#807)
refs ece1d8cef1
- alert was switched for a notification so tests needed updating
2017-07-31 13:25:09 +04:00
Kevin Ansfield 68fe624078 🎨 use blue instead of yellow for warning alerts (#792)
closes https://github.com/TryGhost/Ghost/issues/8680
2017-07-20 16:00:41 +02:00
Aileen Nowak ab67f40600 🎨 Publish menu wording and saving states improvements (#788)
closes TryGhost/Ghost#8696

- Changes the `gh-save-button` component to allow a custom `runningText` which would be rendered in the button when the current task is running.
- Adds a `runningText` CP to `gh-publishmenu` component, which will render (depending of post status and desired save type) 'Unpublishing', 'Publishing', 'Scheduling', 'Updating', 'Unpublishing', 'Rescheduling', and 'Unscheduling'.
2017-07-20 11:46:31 +01:00
Aileen Nowak 3756f8a7da 💄 Theme upload modal style improvements (#784)
no issue

With GScan sending error details now, the modal was a bit overloaded.

This PR adds a toggle for each error rule which - when clicked - shows the details and the affected files.
2017-07-20 11:30:45 +01: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 a9c8d7258c 🐛 fix autosave+transition on title blur with empty title (#767)
refs TryGhost/Ghost#8525
- fix `saveTitle` action
	- don't abort title save when we have an empty title
	- force a "dirty" state so that the save actually happens
- add acceptance test for title blur behaviour
- extract multiple instances `"(Untitled)"` into a const
2017-07-10 18:33:05 +07:00
Kevin Ansfield 9c4ae87d8f 🐛 prevent session sync issues with multiple tabs/refreshes (#772)
refs https://github.com/TryGhost/Ghost/issues/8616

- only refresh tokens on boot if we last refreshed more than 24hrs ago - this should prevent rapidly changing access/refresh tokens when opening new admin tabs or refreshing whilst other tabs are open
- fix token refresh test which was testing it's own behaviour instead of the applications 🙈

This may not be the full solution to the session issues but it closes one potential culprit and should at least reduce token churn which can only help track down the real cause.
2017-07-10 12:18:19 +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
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
David Wolfe fd52adeb1f Update post save button texts (#736)
closes https://github.com/TryGhost/Ghost/issues/8536, closes https://github.com/TryGhost/Ghost/issues/8500

- Post save button will now display publish/un-publish/schedule/un-schedule/re-schedule/update
- On successful save button will display published/un-published/scheduled/un-scheduled/re-scheduled/updated
2017-06-15 18:35:23 +01:00
Katharina Irrgang 7ffc3c47ab 🎨 improve theme results (#726)
closes TryGhost/Ghost#8222

- there are fatal and normal errors
- fatal === can't activate a theme
- the normal errors are only returned in development mode (!)
- Separate between `fatal` and normal errors and group them
2017-06-06 13:09:52 +07:00
Kevin Ansfield d2a7466b7d 🐛 fix issue with re-uploading a deleted theme (#725)
closes https://github.com/TryGhost/Ghost/issues/8515

- ensure the theme record is removed from the store when deleting because theme IDs get re-used unlike other models
2017-06-01 15:44:04 +02:00
Kevin Ansfield 6d9997cccd 🔥 remove markdown attribute from Post model (#720)
refs https://github.com/TryGhost/Ghost/issues/8479

- remove unused `ed-image-manager` util
- remove `markdown` attribute from Post model
2017-05-30 15:36:42 +02:00
Kevin Ansfield f5227fce01 🎨 team + apps header consistency (#716)
refs https://github.com/TryGhost/Ghost/issues/8464

- fix padding on user actions button
- match user screen heading to other screens
- match app screen headers to other screens, update form styles
- change header link colour to match non-link colour
- fix team acceptance test
- fix canvas top padding so header elements always align
- reduce header font size
2017-05-30 15:23:38 +02:00
Kevin Ansfield 7eefbba69f 💄🐷 sort-imports eslint rule (#712)
no issue

- adds `eslint-plugin-sort-imports-es6-autofix` dependency
  - implements ESLint's base `sort-imports` rule but has a distinction in that `import {foo} from 'bar';` is considered `multiple` rather than `single`
  - fixes ESLint's autofix behaviour so `eslint --fix` will actually fix the sort order
- updates all unordered import rules by using `eslint --fix`

With the increased number of `import` statements since Ember+ecosystem started moving towards es6 modules I've found it frustrating at times trying to search through randomly ordered import statements. Recently I've been sorting imports manually when I've added new code or touched old code so I thought I'd add an ESLint rule to codify it.
2017-05-29 20:50:03 +02:00
Kevin Ansfield 9db932ee48 streamline image uploads in settings/general (#702)
refs TryGhost/Ghost#8455

- ensure `uploadUrls` and `errors` are cleared in `gh-uploader` when new uploads are started
- yield `isUploading` in `gh-uploader` component
- replace image upload modals in settings/general with in-page uploads
2017-05-23 10:50:04 +02:00
Aileen Nowak 371b9fd78e 🐛 Make cmd+s work for all save-buttons (#700)
closes TryGhost/Ghost#8443
- Fixes a bug where the keyboard shortcut `cmd+s` would cause a `Maximum call stack size` error and not save.
- Wherever there is a `save` button, the keyboard shortcut to save works now.
2017-05-18 11:48:37 +01:00
Aileen Nowak c00af2554e 🎨 User profile settings page layout updates (#695)
closes TryGhost/Ghost#7134

Overhaul of the user settings page to make it more consistent with other settings panels.
The hardly readable validation for user "Full Name" is redundant as well, as the input field for it now has the same styles as the other input fields.
2017-05-17 13:24:31 +01:00
Rodney Folz 7457ffb26d 🐛 permit Facebook usernames with less than 5 chars (#632)
refs https://github.com/TryGhost/Ghost/issues/8296
- permit Facebook usernames with less than 5 chars
    - brands are allowed to have Page names with less than 5 chars (ex: facebook.com/nike)
    - current/former employees are allowed to have usernames with less than 5 chars (ex: facebook.com/zuck)
2017-05-15 19:26:34 +01:00
Aileen Nowak 627a71e1a4 🗜 Database soft limits (#683)
closes TryGhost/Ghost#8143

- uses new soft limits in validation:
	- post title to 255
	- meta title (post and tag) to 300
	- meta description (post and tag) to 500
2017-05-15 13:58:32 +02:00
Kevin Ansfield 16438f8c68 bump dependencies (#673)
no issue
- autoprefixer@7.0.1
- broccoli-funnel@1.2.0
- codemirror@5.25.2
- coveralls@2.13.1
- ember-cli@2.13.1
- ember-cli-babel@6.1.0
- ember-cli-chai@0.4.0
- ember-cli-code-coverage@0.3.12
- ember-cli-dependency-checker@1.4.0
- ember-cli-eslint@3.1.0
- ember-cli-htmlbars@1.3.2
- ember-cli-htmlbars-inline-precompile@0.4.2
- ember-cli-mocha@0.14.3
- ember-cli-test-loader@2.1.0
- ember-composable-helpers@2.0.1
- ember-data@2.13.1
- ember-light-table@1.8.6
- ember-native-dom-helpers@0.4.0
- ember-power-datepicker@0.3.0
- ember-power-select@1.8.2
- ember-route-action-helper@2.0.3
- ember-simple-auth@1.3.0
- ember-source@2.13.0
- ember-test-selectors@0.3.3
- fs-extra@3.0.1
- liquid-fire@0.27.3
- liquid-wormhole@2.0.5
- loader.js@4.4.0
- fix async issue in editor title placeholder test
- adds `targets.js` so that babel will only polyfill for the lowest common denominator
2017-05-09 18:15:04 -05: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
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
Kevin Ansfield 1f3b79e289 💄 refactor acceptance tests to use async/await (#663)
no issue
- replaces `andThen(() => {}` blocks with usage of `async/await`
2017-04-25 00:29:48 +12:00
Ryan McCarvill df8bb6fbe7 🐝 Strip HTML from title (#665)
closes https://github.com/TryGhost/Ghost/issues/8353
- if a user pastes or inserts HTML into the title in some other way (modifying the dom, having a plugin mutate the dom, etc) then strip the HTML and insure that the title is always unstyled and plain text
2017-04-24 12:37:30 +01:00
Kevin Ansfield 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 ff12348433 💄 convert editor acceptance tests to async/await (#654)
no issue
- `async/await` cuts down on some boilerplate `andThen(() => { ... })` code and makes it more explicit which methods are async and will wait for run-loop/promise behaviour to finish before continuing
2017-04-20 01:21:37 +12:00
Kevin Ansfield 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 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 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 02e8ed023a fix timezone errors in editor tests (#638) 2017-04-11 15:48:20 +01:00
Kevin Ansfield 34cb65df5c new publish menu and date/time picker (#588)
closes https://github.com/TryGhost/Ghost/issues/8249

- replaces the old split-button publish/schedule/update button with a less confusing menu system
- adds a `{{gh-date-time-picker}}` component that contains a datepicker with separate time input
- replaces the date text input in the post settings menu with `{{gh-date-time-picker}}`
  - disabled when post is scheduled, only way to update a scheduled time is via the publish menu
  - validates date is in the past when draft/published so there's no confusion with scheduling
- displays saving status in top-left of editor screen
- refactor editor (auto)saving processes to use ember-concurrency

Other minor changes:
- adds `post.publishedAtBlog{TZ,Date,Time}` properties to Post model to allow working with `publishedAt` datetime in the selected blog timezone rather than UTC
- adds a `beforeSave` hook to `validation-engine` that is called after successful validation and before the Ember Data save call is made
- adds validation of `publishedAtBlog{Date,Time}` to post validator
- prevent gh-task-button showing last task state on first render
- fixes bug where clicking into and out of the published date input in the PSM without making any changes saves a published date for draft posts
2017-04-11 14:39:45 +01:00
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
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
Ryan McCarvill 482543abed 🚨 Move markdown tests (#602)
refs https://github.com/TryGhost/Ghost/issues/8201
- Markdown tests are now integration tests rather than acceptance.
2017-03-24 10:00:43 +00: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
Kevin Ansfield e87762c723 fix broken gh-image-uploader tests 2017-03-17 19:15:02 +02: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
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
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
Kevin Ansfield bc4e607661 🎨 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 df3da411df 🎨 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 bd65c1efd4 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 dafd5109b4 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
Kevin Ansfield 89776fb169 🔥 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
Kevin Ansfield dc351d3073 add dropdown filters for post type, author, and tag (#554)
refs TryGhost/Ghost#7860
- removes post type filter links
- adds dropdown filters for post type, author, and tag
- replaces custom refresh on query params change with Ember's standard `refreshModel` config
2017-03-02 12:35:09 -06:00
Kevin Ansfield 90be933bfe 🐛 display correct expired/expires text for invites (#550)
closes https://github.com/TryGhost/Ghost/issues/8055

- use `expired` if the date is in the past, otherwise `expires`
- fix mirage factories to use `moment.valueOf` instead of `moment.unix` for invite `expires` attributes
2017-02-27 13:11:39 +00:00
Kevin Ansfield ec6a47f774 fix tests for new themes table styles (#553) 2017-02-27 12:34:46 +00:00
Kevin Ansfield 0f4ea73254 rename settings/navigation -> settings/design, move theme management (#543)
no issue

- following from the `settings/general` redesign, navigation and themes management are now co-located in `settings/design`
2017-02-21 19:04:50 +00:00
Kevin Ansfield c43974c14b fetch themes from /themes endpoint (#542)
refs https://github.com/TryGhost/Ghost/pull/8022

- use `/themes` API endpoint to fetch list of themes instead of `settings[0].availableThemes`
2017-02-21 18:28:44 +00:00
Kevin Ansfield 5674498759 accordion toggles for settings sections 2017-02-21 13:03:44 +00:00
Kevin Ansfield 1ff1a8306f fix settings/general acceptance tests 2017-02-21 13:03:44 +00:00
Austin Burdine 2093463568 🐛 disable failing test temporarily 2017-02-17 12:31:12 -06:00
Kevin Ansfield d12a9901fb update tests for HTML changes 2017-02-17 10:14:16 +00:00
John O'Nolan 51cdd60b3e Style updates to new app frame for all other screens 2017-02-17 10:14:16 +00:00
Kevin Ansfield 503e8d8263 Update styles for content screen, buttons, and app frame
* Updates styling on content management screen, replaces button styles, tweaks application frame style
2017-02-16 19:50:05 +00:00
Kevin Ansfield 68e59de195 refresh access token on app boot (#524)
refs https://github.com/TryGhost/Ghost/issues/5202

- refresh the access token after a successful authenticated application boot so that the session lifetime is continually extended
2017-02-10 14:35:45 +01:00
Aileen Nowak 7af0f51b53 Blog icon uplod (#397)
refs TryGhost/Ghost#7688
- Adds new upload functionality for a blog icon in general settings.
- Icons will be uploaded to a new endpoint `uploads/icons` to trigger different validations.
2017-01-26 11:17:34 +00:00
Kevin Ansfield b73a3f0b29 New content screen prototype (#503)
refs https://github.com/TryGhost/Ghost/issues/7860

- remove preview pane from content screen
- add basic post status filters
- replace custom infinite scroll with ember-infinity and increase trigger threshold for improved scroll behaviour

Commits:
* basic content list + filter using existing infinite scroll and pagination
* swap our custom pagination + infinite loader for `ember-infinity`
* minor cleanups
* reset scroll position when changing filter
* fix tests
* remove client-side sorting step as we no longer have a live collection
* remove unused `mobile-index-route`
* add acceptance tests for content screen filters
2017-01-25 21:05:28 +01:00
Aileen Nowak b93fb0443e AMP app integration (#483)
refs TryGhost/Ghost#7769
- adds Google AMP to `apps` in order to disable and enable it on request.
2017-01-20 09:33:54 +00:00
Kevin Ansfield 7652969747 🏃 improve navigation responsiveness with loading substates (#495)
no issue
- add loading substates for all routes that previously blocked transitions until their model had finished loading
  - enables immediate response on navigation click
  - loading templates include the title bar to provide immediate indication of which page is loading
  - loading templates include a new `{{gh-loading-spinner}}` component that will only show the spinner after 200ms to avoid flashing a spinner for users on fast connections
- updated Version Mismatch tests to match new behaviour of intermediate transitions when navigating
2017-01-17 17:44:08 -06:00
Austin Burdine f110a97c70 Update acceptance tests to use new mirage api 2017-01-13 15:59:37 +00:00
Tobias Bieniek 53bc0db409 tests/acceptance/editor: Restore clock early
This was never restored *after* the andThen() since that is async
2016-12-09 18:58:55 +01:00
Kevin Ansfield 4a604ce64f Update code to match eslint rules
no issue
- switch `jscs` and `jshint` inline config to `eslint` config
- fix eslint errors, predominantly in tests where the config now the main app config more closely
2016-11-14 13:26:00 +00:00
Kevin Ansfield c33e801149 Fetch config from endpoint rather than meta tags (#368)
refs TryGhost/Ghost#7628 (issue), refs TryGhost/Ghost#7631 (required)

- update `config` service to fetch from public configuration endpoint
- add `beforeModel` to `application` route to fetch config and pause further processing until the request is complete
- remove `<meta name="env-*">` tags from generated `default.hbs` and internal testing `index.html`
- add mirage config to simulate configuration endpoint and helper to simulate enabled oauth config
- update `ghost-oauth2` torii provider to use auth server URL from server-provided config
2016-10-28 14:07:50 +01:00
Ryan McCarvill 7872faea87 New editor layout (#355)
- the title is now part of the content
- new ways to navigate from the title to the content
- the new editor contains updated toolbar behavior
- the new editor contains markdown like commands
2016-10-24 11:55:55 +01:00
Kevin Ansfield 03096936f5 deps: ember@2.8.2 2016-10-07 17:32:30 +01:00
Kevin Ansfield 1f36c94109 deps: ember-light-table@1.4.2 (#307)
no issue

- update `ember-light-table` to 1.4.2
- remove `gh-light-table` override component as scrolling has been fixed
- disable the infinite scroll acceptance test for now because Chrome has issues detecting the position of the scroll trigger when the app is rendered into the zoomed container during testing
2016-10-07 13:58:53 +01:00
Kevin Ansfield 0a163d7333 Ghost.org OAuth support (#278)
issue TryGhost/Ghost#7452, requires TryGhost/Ghost#7451
- use a `ghostOAuth` config flag to switch between the old-style per-install auth and centralized OAuth auth based on config provided by the server
- add OAuth flows for:
  - setup
  - sign-in
  - sign-up
  - re-authenticate
- add custom `oauth-ghost` authenticator to support our custom data structure
- add test helpers to stub successful/failed oauth authentication
- hide change password form if using OAuth (temporary - a way to change password via oauth provider will be added later)
2016-09-30 13:43:40 +02:00
Kevin Ansfield 87e1c5afa5 use ember-ajax in place of ember-data's networking (#283)
closes #7014
- uses the `AjaxServiceSupport` mixin from `ember-ajax` to replace Ember Data's internal `ajax` method with our own ajax service
- normalizes all error handling to use `ember-ajax` style errors
- default to the `application/vnd.api+json` content-type so that we don't have a mix of urlencoded and plain JSON content
- fix `normalizeErrorResponse` in our `ajax` service so that it doesn't add an empty `errors` array to payloads
2016-09-26 11:59:04 -05:00
Kevin Ansfield 3afc43e2d2 replace gh-select-native with one-way-select (#286)
no issue
- removes `gh-select-native` component as ember-one-way-control's `one-way-select` component offers the same one-way-binding but also allows element attributes to be set
2016-09-26 11:39:43 -05:00
Kevin Ansfield 5913827646 Separate invites and users (#277)
closes https://github.com/TryGhost/Ghost/issues/7420, requires https://github.com/TryGhost/Ghost/pull/7422
- adds a new `Invite` model with associated serializer and test setup
- updates team screen to use invites rather than existing users with the "invited" property
- updates signup process to work with new invite model
- updates setup process to create invites instead of users
- swaps usage of `gh-select-native` for `one-way-select` in the invite modal so that attributes can be set on the `select` element
- updates resend invite process to account for server returning a new model
- rewrites the invite management tests and fixes mirage mocks for invite endpoints
- sorts invites by email address to avoid jumping invites when re-sending
2016-09-26 18:03:53 +02:00
Ryan McCarvill c34e0161ff Mobile-Doc based editor (#291)
refs TryGhost/Ghost#7429, requires TryGhost/Ghost#7437

Added Ghost-Editor (based on mobiled doc).
-------------------
- Added mobiledoc editor
- Fixed problems with workflow and auto saves
- Integrated basic toolbar
- Removed all editor related tests, everything bar the most basic acceptance tests will be in the ghost-editor repository.
- Commented out tests which relied on Ember Helpers that are not compatable with mobile-doc, workarounds are inbound shortly.

This is the first integration of ghost-editor. It's styled enough to work, however it is not anywhere approaching something that looks remotely like what the finished thing will be.

Early ALPHA, development build. Tread cautiously.
2016-09-26 15:04:20 +02:00
Kevin Ansfield 1ee787ed42 display warnings after theme upload (#262)
refs TryGhost/Ghost#7362, requires TryGhost/Ghost#7367
- display any gscan warnings we get back from a successful upload to cater for the downgrade of missing `{{asset}}` helpers from an error to a warning
2016-09-14 18:34:07 +01:00
Austin Burdine a13502972c remove mime-type validations in favor of extension validation (#256)
refs TryGhost/Ghost#7292
- remove accept mime type validations
- validate on file extension only
- fix tests
2016-09-14 09:54:16 +01:00
Kevin Ansfield a9f17cbfb6 detailed theme validation errors (#226)
no issue
- display the detailed validation errors that we get back from gscan so that users know how to fix their themes
2016-08-24 20:22:20 +02:00
Kevin Ansfield e543392137 🐛 fix highlighted number of posts when deleting a user (#144)
closes https://github.com/TryGhost/Ghost/issues/7136
- pass user into the modal when displaying
- fix the user->model alias in the modal component
- update mirage user endpoints to respect `?include=count.posts` param
2016-08-24 07:26:29 -06:00
Kevin Ansfield 69c51940af add final theme management acceptance tests
refs https://github.com/TryGhost/Ghost-Admin/pull/210
- adds missing acceptance tests for theme deletion
- adds theme deletion endpoint to mirage config
- fixes mirage settings update endpoint (was previously removing config that the client didn't send and also losing the `type` key for all entries preventing the `GET` request from working properly)
2016-08-23 15:27:46 +01:00
Kevin Ansfield 5581c6ba5a theme management UI
refs https://github.com/TryGhost/Ghost/issues/7204, requires https://github.com/TryGhost/Ghost/pull/7209

- replaces theme dropdown with a table
- adds theme upload modal
    - validates theme mime type
    - prevents upload of `casper.zip` (default Casper theme can't be overwritten)
    - warns if an upload will overwrite an existing theme
    - gives option of immediately activating the uploaded theme or closing after successful upload
- adds theme activation link/action
- adds theme download link/action
- adds theme deletion modal
    - warns about no undo possibility
    - offers possibility to download theme
- modifies mirage config to handle theme changes
2016-08-23 12:42:38 +01:00
Kevin Ansfield 4d59fdb8fb validate file uploads against "accept" mime-type before uploading (#214)
closes https://github.com/TryGhost/Ghost/issues/7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
- adds mime type validation to labs importer (basic implementation, should be replaced with uploader components once they have been refactored)
2016-08-22 05:45:33 -06:00
Austin Burdine a3a00bfd34 fix cross-browser support (#164)
closes https://github.com/TryGhost/Ghost/issues/7149
- fix tests in Safari
- fix template tag issue in IE and edge
- various IE css fixes
2016-08-06 09:04:06 +02:00
Kevin Ansfield 198b7e9517 Fix blank signup screen (#135)
closes https://github.com/TryGhost/Ghost/issues/7117
- adds guard to `sanitizeInput` method of `gh-trim-focus-input` for null/undefined values
- adds acceptance test for successful signup screen flow
- removes unneeded validation/update handling for a non-editable email field
- adds "At least 8 characters" placeholder to password field
- fixes enter key not submitting the form when name or password field has focus
2016-07-22 07:36:50 -06:00
Austin Burdine 4beb52f713 ensure validation errors are shown on post save (#136)
closes TryGhost/Ghost#7120
- fix error handling in editor-base-controller
- adds failing test fixed by this change
2016-07-22 10:14:32 +01:00
Kevin Ansfield ab14b78282 Fix editor error handling (#128)
closes https://github.com/TryGhost/Ghost/issues/7099
- update editor base controller's `showErrorAlert` method to handle `AdapterError` or `AjaxError` objects
- update PSM's error handling so that we don't pass an error object wrapped in an array to `showAPIError`
- add missing title attribute to Mirage's Post factory
- remove some leftover `console.log`s
2016-07-18 17:23:43 -06:00
Kevin Ansfield 690dc9dffb Refactor error handling
closes https://github.com/TryGhost/Ghost/issues/6974
- update "change password" fields/process to use inline validations
- remove `notifications.showErrors` and update all uses of it to `showAPIError`
- display multiple API errors as alerts rather than toaster notifications
- refactor `notifications.showAPIError`
  - remove `notifications.showErrors`, use a loop in `showAPIError` instead
  - properly determine the message from `AjaxError` or `AdapterError` objects
  - determine a unique key if possible so that we don't lose multiple different alerts
- add `ServerUnreachable` error for when we get a status code of 0 (eg, when the ghost service has been shut down)
- simplify error messages for our custom ajax errors
2016-07-08 15:16:54 +01:00
Kevin Ansfield e4c0aaf7b9 "400 Version Mismatch" error handling
refs https://github.com/TryGhost/Ghost/issues/6949

Handle version mismatch errors by:
- displaying an alert asking the user to copy any data and refresh
- disabling navigation so that unsaved data is not accidentally lost

Detailed changes:
- add `error` action to application route for global route-based error handling
- remove 404-handler mixin, move logic into app route error handler
- update `.catch` in validation-engine so that promises are rejected with the
  original error objects
- add `VersionMismatchError` and `isVersionMismatchError` to ajax service
- add `upgrade-status` service
  - has a method to trigger the alert and toggle the "upgrade required" mode
  - is injected into all routes by default so that it can be checked before
    transitioning
- add `Route` override
  - updates the `willTransition` hook to check the `upgrade-status` service
    and abort the transition if we're in "upgrade required" mode
- update notifications `showAPIError` method to handle version mismatch errors
- update any areas where we were catching ajax errors manually so that the
  version mismatch error handling is obeyed
- fix redirect tests in editor acceptance test
- fix mirage's handling of 404s for unknown posts in get post requests
- adjust alert z-index to to appear above modal backgrounds
2016-07-08 14:56:26 +01:00
Austin Burdine a9ce94de9f convert ember imports to ember-cli-shim imports where possible (#95) 2016-06-30 11:21:47 +01:00
Aileen Nowak 6ce7e14fd7 Scheduler UI
refs TryGhost/Ghost#6413 and TryGhost/Ghost#6870

needs TryGhost/Ghost#6861

- **Post Settings Menu (PSM)**:'Publish Date' input accepts a date from now, min. 2 minutes to allow scheduler processing on the server. Also, there will always be some delay between typing the date and clicking on the 'Schedule Post' button. If the user types a future date for an already published post, the date will be reseted and he sees the message, that the post needs to be unpublished first. Once, the date is accepted, the label will change to 'Scheduled Date'.

- adds a CP 'timeScheduled' to post model, which will return `true` if the publish time is currently in the future.

- **Changes to the button flow in editor**:
- if the the CP `timeScheduled` returns true, a different drop-down-menu will be shown: 'Schedule Post' replaces 'Publish Now' and 'Unschedule' replaces 'Unpublish'.

- Covering the _edge cases_, especially when a scheduled post is about to be published, while the user is in the editor.
	- First, a new CP `scheduleCountdown` will return the remaining time, when the estimated publish time is 15 minutes from now. A notification with this live-ticker is shown next to the save button. Once, we reach a 2 minutes limit, another CP `statusFreeze` will return true and causes the save button to only show `Unschedule` in a red state, until we reach the publish time
	- Once the publish time is reached, a CP `scheduledWillPublish` causes the buttons and the existing code to pretend we're already dealing with a publish post. At the moment, there's no way to make a background-fetch of the now serverside-scheduled post model from the server, so Ember doesn't know about the changed state at that time.
	- Changes in the editor, which are done during this 'status freeze'-process will be saved back correctly, once the user hits 'Update Post' after the buttons changed back. A click on 'Unpublish' will change the status back to a draft.
	- The user will get a regular 'toaster' notification that the post has been published.

- adds CP `isScheduled` for scheduled posts
- adds CP `offset` to component `gh-posts-list-item` and helper `gh-format-time-scheduled` to show schedule date in content overview.
- sets timeout in `gh-spin-button` to 10ms for `Ember.testing`
- changes error message in `gh-editor-base-controller` to be in one line, seperated with a `:`

TODOs:
- [x] new sort order for posts (1. scheduled, 2. draft, 3. published) (refs TryGhost/Ghost#6932)
- [ ] Move posts sorting from posts controller to model and refactor to use `Ember.comparable` mixin
- [x] Flows for draft -> scheduled -> published like described in TryGhost/Ghost#6870 incl. edge cases and button behaviour
- [x] Tests
- [x] new PSM behaviour for time/date in future
- [x] display publishedAt date with timezone offset on posts overview
2016-06-13 17:01:42 +02:00
Austin Burdine 7d693c1f96 internal tags feature
refs TryGhost/Ghost#6165
- change behavior to use 'visibility' property
- add tests
2016-06-13 08:21:41 -06:00
Hannah Wolfe e704d5f41a Merge pull request #63 from kevinansfield/add-ghost-desktop-update-tests
Fix and add tests for Ghost Desktop manual update notification
2016-06-13 14:10:20 +01:00
Kevin Ansfield 37ff17b738 Fix and add tests for Ghost Desktop manual update notification
closes #51
- move the check into the `afterModel` hook so that it's always performed on app load (previously it would only be displayed after going through the sign-in process)
- change the alert type to `warn` so that it matches our existing types (success, warn, error)
- don't rely on the `.htmlSafe()` prototype extension
- add basic tests for the upgrade alert display
2016-06-13 13:40:41 +01:00
Kevin Ansfield fb88dda5a8 Merge pull request #61 from acburdine/jscs-update
Update grunt-jscs and ember-suave to 3.0.0
2016-06-13 08:49:11 +01:00
Austin Burdine ed2c5f328d deps: grunt-jscs,ember-suave@3.0.0
replaces #41, #60
- update ember-suave and grunt-jscs to 3.0
- standardize Ember global de-structuring rules across app & tests
2016-06-11 13:39:31 -06:00
Aileen Nowak 31d14c35f2 Add UTC timezone as default in settings model
no issue

- Changes the default timezone from 'Europe/Dublin' to 'Etc/UTC' in setting model
- Updates acceptance test for settings general to expect more timezones in list and different default
- adds mirage fixtures values
2016-06-11 12:24:04 +02:00
Kevin Ansfield 1d5e410fdd deps: ember@2.6.0
no issue
- bugfix & cleanup release https://github.com/emberjs/ember.js/releases/tag/v2.6.0
- fix tests that were relying on not having the `rootURL` prefixed in `href`s
2016-06-09 16:58:09 +01:00
Kevin Ansfield 604fda4348 Update package.json details, rename module to ghost-admin
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Aileen Nowak be8b31ec85 Timezones: Always use the timezone of blog setting
closes TryGhost/Ghost#6406

follow-up PR of #2

- adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings
- `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field.
- gets `availableTimezones` from `configuration/timezones` API endpoint
- adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside
- when switching the timezone in the select box, the user will be shown the local time of the selected timezone
- `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already
- added clock service to show actual time ticking below select box
- default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London'
- if no timezone is saved in the settings yet, the default value will be used
- shows the local time in 'Publish Date'  in PSM by default, until user overwrites it
- adds dependency `moment-timezone 0.5.4` to `bower.json`

---------

**Tests:**

- sets except for clock service in test env
- adds fixtures to mirage
- adds `service.ajax` and `service:ghostPaths` to navigation-test.js
- adds unit test for `gh-format-timeago` helper
- updates acceptance test `general-setting`
- adds acceptance test for `editor`
- adds integration tests for `services/config` and `services/time-zone`

---------

**Todos:**

- [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input`
- [x] Acceptance test: `editor`
- [ ] Unit tests: `utils/date-formatting`
- [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-06-03 16:23:39 +02:00
Kevin Ansfield 3ce26bc347
Improve uploader tests + test subscribers CSV import
no issue
- override `x-file-input` in `gh-file-input` to look for a custom property on the change event if we are in testing mode (this is necessary because Ember 2.5+ use native rather than jQuery events so `target.files` is readonly, see https://github.com/emberjs/ember.js/issues/13540)
- migrate unit tests for the uploader components to the integration tests
- add skipped acceptance tests for the subscribers CSV import now that it's possible to simulate file uploads
2016-05-27 13:34:31 +01:00
Kevin Ansfield a45c0884c3 Fix unwanted clearing of social inputs on blur with no edits
no issue
- updates the logic to expect `null` scratch values as the scratch values won't be set until the input value has changed
- adds tests for initial value display and regression tests for the cleared input bug
2016-05-17 19:14:14 +01:00
Aileen Nowak 7923641cb1 Fixes error in validation
closes #6826

- refactors the validation of facebook and twitter input field in `general.js` and `user.js` controller
	- Example validations for facebook:
		- `facebook.com/username` will be corrected to the full URL
		- `user` will show error `Your Page name is not a valid Facebook Page name' for `general.js` and `Your Username is not a valid Facebook Username` for `user.js` as the username in facebook has to be at least 5 characters long
		- `twitter.com/username` will be autocorrected to the valid facebook URL incl. the `username`
	- Example validations for twitter:
		- `twitter.com/user_` will be corrected to the full URL
                - `user:99` will show error `Your Username is not a valid Twitter Username`
                - `facebook.com/username` will be autocorrected to the valid twitter URL incl. the `username`
- updates both acceptance tests
- adds further validation for facebook pages in general settings and user. Submitting a url which incl. `/page/` or `/pages/` will now accept any username followed incl. further `/`.
- adds a custom transform `facebook-url-user` which will extract the username (if it's a facebook page, incl. `pages/`) to store only this in the backend
- uses the `twitter-url-user` transform now also for user
2016-05-17 17:44:23 +01:00
Kevin Ansfield 9d522e38b2 Merge pull request #6830 from acburdine/no-show-nav-menu
Don't show the nav menu when on a 404 route and not signed in
2016-05-16 11:01:44 +02:00
Austin Burdine 2f58e17b7e update document title on blog title change
no issue
- force document.title to recompute when the blog title is changed in settings/general
2016-05-15 18:41:28 -06:00
Austin Burdine 6ebaffa041 don't show the nav menu when on a 404 route and not signed in
no issue
- fixes problem when the nav menu would be shown on an error404 route when the user is not logged in
- adds failing test that passes with this change
2016-05-13 19:02:55 -06:00
Kevin Ansfield 6a07a0a985 Fix display of server-provided validation error when adding subscriber
no issue
- make the check for "email" in the server provided error case-insensitive
2016-05-11 19:56:58 +02:00
Kevin Ansfield f69c5125e6 Subscribers: Admin UI updates & fixes
Update for synchronous feature service

Add client-side handling of server-side errors when adding subscribers
- display server-provided error message when we get a server error
- fix the ajax util's `getRequestErrorMessage` method so that it works correctly with Ember's `InvalidError` object instead of the previous request object that it was receiving (*TODO:* this really needs looking at properly so we aren't losing details and Ember Data can do it's stuff)

Styling updates
- proper icon for ascending/descending
- change hover colour to green for "Import CSV" button

Delete subscriber button with confirm modal
- display delete button when hovering over a subscriber row (WARN: really ugly button, styles definitely want looking at)
- show confirm modal when clicking the delete button
- delete subscriber, remove from table, and update total on confirm
2016-05-11 11:22:35 +02:00
Kevin Ansfield 67765897b2 Subscribers: Admin User Interface v1
Initial Subscribers screen
- set up mocked api endpoints
- basic subscribers screen with data loading, infinite scroll

"Add Subscriber" screen
- uses modal to display a new subscriber form
- validates subscriber e-mail address
- moves pagination from route into controller to use filtered/sorted CPs on top of a live-query so that new subscribers are added to the list and the total can be properly managed

TODO:
- there is currently a pretty serious performance issue where the whole table is re-rendered when the live-query is updated. `ember-light-table` doesn't allow for live-binding and has no options to easily manipulate it's rows using an external interface - it's possible to move the page loading into the component so we only render new rows but that leaves it difficult to react to new subscribers being added through the UI. I believe the number of components used within the table is also adding to the performance problems.
  - most likely solution is to drop `ember-light-table` in favour of rendering the table directly - glimmer should do a good job of fast updates even though the underlying array will be completely swapped out

"Import subscribers" screen
- uses modal to display an import subscribers CSV file upload form
- displays upload progress
- displays import stats and reloads subscribers table once import has completed
- adds `gh-file-uploader` component (NB. pared down copy of `gh-image-uploader`, ripe for some refactoring)
- fixes subscribers acceptance test failing because fixtures did not have the labs flag enabled

Unfortunately this doesn't have 100% test coverage as we're limited in how we can simulate file uploads 😞

Fix performance issues with subscribers table
- moves the table definition from the component up to the controller
- switches back to manually manipulating table rows instead of using a live-query

This is a quick-fix in that it allows us to continue using the `ember-light-table` component but it does mean that we lose some flexibility that the live-query gave us. For now it's not much of an issue and it allows us to defer deeper performance/flexibility work until we have a concrete need and requirements.

Hook up Export CSV button
- use a hidden iFrame to trigger the browser to hit the CSV export endpoint and download the file

Re-order subscribers table by clicking column headers
- displays currently sorted column and sort direction
- clicking a column header re-fetches the data from the server with the appropriate query params

Fix scroll triggers for infinite pagination + icon change
- adds a debounce as well as the throttle so that we always get a final scroll trigger once scrolling has stopped
- changes the subscribers icon from the temporary team icon to the mail icon
2016-05-11 10:28:11 +02:00
Aileen Nowak 0f9645f97d Structured Data 3.0
closes #6534
- new input fields in general settings incl. validation
- facebook and twitter as new models in settings.js
- adds values for facebook and twitter to default-settings.js
- adds blog helpers for facebook and twittter
- rather than saving the whole URL, the Twitter username incl. '@' will be extracted from URL and saved in the settings. The User will still input the full URL. After saving the blog setting, the stored Twitter username will be parsed again as the full URL and available in the input field. A custom transform is used for this.
- adding meta fields to be rendered in {{ghost_head}}:
	- '<meta property="article:publisher" content="https://www.facebook.com/page" />' and
	- '<meta name="twitter:site" content="@user"/>'
- adds facebook and twitter to unit test for structured data
- adds unit test for general settings
- adds acceptance test for new input fields in general settings
- adds a custom transform for twitter model to save only the username to the server
- adds unit test for transform
2016-05-08 17:43:59 +02:00
Aileen Nowak e99569b6f4 Slack integration
closes #6584
- Frontend Changes:
	- adds 'Apps' to Navigation Menu
	- adds 'Slack' as nested page to Apps
	- adds `apps.css`
	- adds `slack-integration` model and uses `slack-settings` custom transform to parse JSON file
	- adds validation for `slack` model
	- adds fixtures and `slack/test` API endpoint to Mirage
	- adds acceptance tests for `apps-test` and `slack-test`
	- adds unit tests for `slack-settings` and `slack-integration`
- Backend Changes:
	- adds API endpoint `slack/test` to send Test Notification
	- adds default-values for slack model
	- sends payload to slack:
		- text: the url of the blogpost / test message
		- icon_url: url to ghost logo
		- username: Ghost
	- adds `slack/index.js` to send webhook to slack if
		- a new post is published (if slack webhook url is saved in settings)
		- user clicks on 'Send Test Notification' in UI
	- adds `slack.init()` to `server.index.js` to add event listener
	- adds unit test for `slack/index`
2016-05-08 12:49:15 +02:00
Kevin Ansfield d4ca5ced75 Don't share errors and hasValidated references between validator instances
no issue
- ensure that each validator instance gets it's own `errors` and `hasValidated` objects
- updates some uses of `ValidationEngine` that were relying on side-effects of the unintended reference sharing
- fixes issue with add subscriber modal displaying an error state after opening if it previously had errors when closing
2016-04-25 10:56:11 +01:00
Austin Burdine d0a2dcba14 allow ember to specify jQuery version
- fix slight acceptance test bug
2016-04-19 14:08:36 -05:00
Hannah Wolfe 1ebe96b284 Merge pull request #6651 from kevinansfield/uploader-js-must-die
Replace jQuery-based uploader.js with ember components
2016-04-14 16:57:57 +01:00