Commit Graph

2381 Commits

Author SHA1 Message Date
Kevin Ansfield
6bbb749e65 deps: ember-mocha@0.8.6 2016-01-13 11:29:59 +00:00
Kevin Ansfield
e394b4e95d deps: ember-cli-mocha@0.9.8 2016-01-13 11:28:59 +00:00
Kevin Ansfield
9b522457ef Merge pull request #6327 from halfdan/6326-lskey
Set localStorage key based on subdir
2016-01-12 21:22:20 +00:00
Hannah Wolfe
5b05ff9836 Merge pull request #6088 from kevinansfield/liquid-tether-modals
Modals refactor
2016-01-12 21:11:38 +00:00
Kevin Ansfield
9d67980a7e Refactor modals
refs #5798, closes #5018
- adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place
- adds spin-buttons to all modals with async behaviour
- adds/improves behaviour of inline-validation in modals
- improves re-authenticate modal to properly handle validation and authentication errors
2016-01-12 20:53:08 +00:00
Kevin Ansfield
55df94bbf6 deps: ember-hash-helper-polyfill@0.1.0 2016-01-12 20:49:46 +00:00
Kevin Ansfield
637aac9eb1 deps: ember-route-action-helper@0.2.0 2016-01-12 20:49:46 +00:00
Kevin Ansfield
9f0088222a deps: liquid-fire@0.22 2016-01-12 20:49:46 +00:00
Kevin Ansfield
b620c70263 deps: liquid-tether@0.1.9 2016-01-12 20:49:46 +00:00
Kevin Ansfield
b0e357138b Remove use of Ember.on
no issue
- removes the few uses of `Ember.on` for lifecycle hooks or event hooks where order may be important

`Ember.on` use is discouraged so although we haven't used it often I felt like we should ensure we're consistent throughout the codebase. There's a great article with details of why it's discouraged here: http://notmessenger.com/proper-use-of-ember-on/
2016-01-12 20:48:15 +00:00
Fabian Becker
11290de91c Set localStorage key based on subdir
closes #6326
2016-01-12 17:12:59 +01:00
Kevin Ansfield
29652eb6a4 Merge pull request #6321 from AileenCGN/test
Minor usability improvements for editor screen #6318
2016-01-12 09:49:08 +00:00
Hannah Wolfe
8f7bb4c8b2 Merge pull request #6317 from kevinansfield/quick-fix-unnecessary-leave-editor-modal
Quick-fix for unnecessary "discard changes" modals
2016-01-12 09:39:59 +00:00
AileenCGN
9b6d1c7a36 Minor usability improvements for editor screen
closes #6318
2016-01-11 20:34:04 +02:00
Hannah Wolfe
66163356a2 Merge pull request #6307 from kevinansfield/fix-step3-endless-spinner
Redirect after setup step 3 even if invite requests time out
2016-01-11 18:10:27 +00:00
Kevin Ansfield
cd9595b3aa Quick-fix for unnecessary "discard changes" modals
closes #6315
- don't set the `slug` attribute if we get an empty string back from the slug generator to prevent dirty attributes being triggered for `null` getting changed to `''`
2016-01-11 15:58:07 +00:00
Hannah Wolfe
3a68b02278 Merge pull request #6300 from kevinansfield/fix-missing-tags-bug
Fix disappearing tags when tag input's selection is swapped out
2016-01-09 16:32:59 +00:00
Hannah Wolfe
c2485b13a9 Merge pull request #6291 from kevinansfield/fix-private-safari-login
Use AdaptiveStore for cookie fallback if local storage is unavailable
2016-01-09 13:00:19 +00:00
Hannah Wolfe
7348b92e67 Merge pull request #6286 from kevinansfield/fix-slow-post-navigation
Fix posts navigation slowdown when lots of posts are loaded
2016-01-09 12:42:21 +00:00
Hannah Wolfe
9298cb5772 Merge pull request #6285 from kevinansfield/fix-unresponsive-search
Fix unresponsive search
2016-01-08 17:21:59 +00:00
Kevin Ansfield
b65efac3c5 Transition after setup step 3 submission even if invite takes a long time
refs #5779
- adds a timeout of 4 seconds to step 3 submission so that we transition even if we haven't heard back from the server yet. Notification alerts will be displayed asynchronously once all server requests have returned.
- adds a message to check e-mail configuration to step 3 invitation failure alert
2016-01-08 17:06:41 +00:00
Hannah Wolfe
bf686b6b43 Merge pull request #6254 from kevinansfield/fix-profile-image
Fix teardown of gh-profile-image when fileStorage=false
2016-01-08 15:54:25 +00:00
Kevin Ansfield
edf685d7d3 Fix disappearing tags when input's selection is swapped out
closes #6257
- update the `_onChange` event handler in `gh-selectize` component so that the re-ordering process isn't hit when the underlying objects have changed
2016-01-06 12:21:39 +00:00
Kevin Ansfield
742ef39024 Fill in pending tests setup acceptance tests
refs #6039
- test the sad paths in the setup process
2016-01-05 17:03:22 +00:00
Kevin Ansfield
63a525f4ad Use AdaptiveStore for cookie fallback if local storage is unavailable
closes #5829
- switch application session store to inherit from ESA's `AdaptiveStore` instead of `LocalStorageStore`
2016-01-05 13:16:41 +00:00
Kevin Ansfield
ea3bf21a84 Fix posts navigation slowdown when lots of posts are loaded
refs #6274
- adds `active-link-wrapper` mixin that tracks the `active` state of child links and adds/removes a `.active` class on the mixed-in element
- removes the passed-in `active` attribute on `gh-posts-list-item` component that forced every item in the content list to be re-rendered each time the currently selected post changed
2016-01-04 16:55:36 +00:00
Kevin Ansfield
677a2bfb8a Fix unresponsive search
closes #6274
- any time the search content is refreshed, start with a clean array instead of performing expensive object comparisons to remove existing content
2016-01-04 12:04:57 +00:00
Austin Burdine
58e32f6774 fix autoscoping of _this in settings/navigation
closes #6267
- adds a hardcoded this because babel's autoscoping isn't triggered by default
2015-12-27 17:25:36 -07:00
Kevin Ansfield
71e36c9f6c Fix teardown of gh-profile-image when fileStorage=false
closes #6253
- don't expect the file input to be present in `willDestroyElement`
2015-12-21 11:08:49 +00:00
Austin Burdine
cff44366a8 fix authentication error if setup/two is re-submitted
closes #6226
- adds calls to oauth middleware on PUT /authentication/setup/
- prevent setup/two from trying to log in again if user is already logged in
2015-12-18 12:18:13 -07:00
Kevin P. Kucharczyk
89b872ab1a Fix duplicate URL input field in image uploader
closes #6224
- Add .js-button-accept to removeExtras call
- Check for .js-url container existence before prepending it
- Remove redundant .init() call
2015-12-16 21:36:49 +01:00
Kevin Ansfield
b006eda9f0 Fix password reset
closes #6229
- removes `_super` call in the reset route's `setupController` hook to avoid a `model` property being set which was being picked up by the validation engine
- throw the error if we fail in the password reset process from something we aren't expecting
2015-12-15 21:51:36 +00:00
Kevin Ansfield
513ed0834b Merge pull request #6204 from kevinkucharczyk/unable-to-remove-small-background-image
Fix hidden delete button in image uploader for short images
2015-12-15 13:54:32 +00:00
Kevin Ansfield
ed62566946 Merge pull request #6160 from garyc40/bug-checkbox-labels
Checkbox labels are cut off on mobile.
2015-12-15 13:09:14 +00:00
Kevin Ansfield
c505262630 Remove setScrollClassName mixin and usage
no issue
- removes `setScrollClassName` mixin that was previously used to add a `.scrolling` class to scrollable elements that showed a shadow at the top of boxes when not scrolled to the top
2015-12-15 12:00:57 +00:00
Hannah Wolfe
e6f3c2442e Merge pull request #6200 from kevinansfield/reset-tags-scope-on-deactivate
Reset shortcuts scope when leaving tags route
2015-12-10 18:41:23 +00:00
Kevin P. Kucharczyk
71a92f6b75 Fix hidden delete button in image uploader for short images
closes #6194
- removed min-height animation from image uploader
2015-12-10 18:45:46 +01:00
Hannah Wolfe
54cfe71b79 Merge pull request #6184 from kevinansfield/fix-date-input
Fix changing text and jumping caret in PSM's date input
2015-12-10 16:29:36 +00:00
Hannah Wolfe
4819b8ae0b Merge pull request #6181 from kevinansfield/fix-404-handler
Prevent 404-handler mixin from erroring on non-adapter errors
2015-12-10 16:26:07 +00:00
Kevin Ansfield
e78b3730b2 Reset shortcuts scope when leaving tags route
refs #6191, #6192
- adds additional safeguard to tags route to ensure keymaster scope doesn't get stuck in a non-default scope that may break shortcuts elsewhere
2015-12-10 12:27:48 +00:00
Hannah Wolfe
3c25d768d8 Merge pull request #6153 from kevinansfield/fix-subdir-nav-issues
Fix sub-dir being added to navigation urls when installed in sub-dir
2015-12-09 21:27:43 +00:00
Kevin Ansfield
6bb32c2fe7 Fix changing text and jumping caret in PSM's date input
refs #5777
- adds new `gh-datetime-input` that takes a one-way-bound value and formats it, only triggering the supplied `update` action on focus-out
- fixes bug in PSM's `setPublishedAt` action if model's `published_at` is a Date object not a Moment object
2015-12-08 10:13:17 +00:00
Kevin Ansfield
9baa34500b Prevent 404-handler mixin from erroring on non-adapter errors
no issue
- add a check for existence of `error.errors` as that won't be present on non-404 errors - fixes non-404 errors such as "no action handled x" being hidden by a completely different error
2015-12-07 18:37:35 +00:00
Kevin Ansfield
f02fce75c3 Merge pull request #6178 from syaiful6/select-native
Fix Select Component
2015-12-07 10:40:40 +00:00
Syaiful Bahri
878e7b5678 Fix Select Component
jQuery instance isn't iterable, so we cant destructuring it.

closes https://github.com/TryGhost/Ghost/issues/6171
2015-12-07 16:44:54 +07:00
Austin Burdine
fc31ad69d2 add team acceptance test 2015-12-06 15:24:06 -06:00
Hannah Wolfe
f44d7441bb Merge pull request #6161 from kevinansfield/jscs-deps
deps: jscs@2.6.0 & ember-suave@1.2.3
2015-12-04 10:33:19 +00:00
Kevin Ansfield
d2ada96e4e Merge pull request #6098 from acburdine/tag-404
Fix 404 error handling in editor, tags, and team routes
2015-12-04 10:20:22 +00:00
Kevin Ansfield
16f83c9c71 deps: jscs@2.6.0 & ember-suave@1.2.3
no issue
- fixes an error that popped up after ember-suave's `brocolli-jscs` dependency moved to `2.6.0` which duplicated some of the rules that `ember-suave` used to implement
2015-12-04 09:58:03 +00:00
Austin Burdine
9d333533ac fix 404 error handling in editor, tags, and team routes
closes #6094
- adds 404-handler mixin
- applies mixin to settings/tags/tag, editor/edit and team/user routes
- adds adapter-error test helper to override the default adapter error
2015-12-03 16:37:23 -06:00
Hannah Wolfe
52986b5033 Merge pull request #6122 from kevinansfield/slug-query-with-include
Add count.posts support to user model on client
2015-12-03 14:48:21 +00:00
Gary Cao
468a2d87ed Checkbox labels are cut off on mobile.
closes #6089
2015-12-02 18:28:50 +09:00
Kevin Ansfield
300f7d0226 Remove $ from jshint's predef, always use Ember's $
no issue
- fixes problems with "re-definition of $" errors
2015-12-01 20:52:25 +00:00
Kevin Ansfield
ca3b612779 Fix sub-dir being added to navigation urls when installed in sub-dir
refs #4989
- fix handling of urls relative to base domain when ghost is installed in a sub folder

Fixes an issue when ghost was installed to a sub-dir, e.g. `example.com/blog` and an attempt to link to `example.com/` or `example.com/something-else` would always be re-written to `example.com/blog/` or `example.com/blog/something-else`.
2015-12-01 15:23:21 +00:00
Sebastian Gierlinger
425eada226 Merge pull request #6152 from kevinansfield/cleanup-dependency
Remove unused `ember-resize` dependency
2015-12-01 14:58:24 +01:00
Kevin Ansfield
76e2fe229a Merge pull request #6147 from garyc40/bug-uploader-bind
Properly binds "this" in uploader.js
2015-12-01 13:08:00 +00:00
Kevin Ansfield
f23166190d Remove unused ember-resize dependency
no issue
- removes `ember-resize` dep that crept back in under the radar in the Ember 2.2 update
- updates `ember-cli-build`'s test dependencies to match the format specified in http://ember-cli.com/managing-dependencies/#test-assets
2015-12-01 11:03:53 +00:00
Gary Cao
302fa98361 Properly binds "this" in uploader.js
closes #6146
2015-12-01 12:50:31 +09:00
Austin Burdine
46786e7065 deps: ember/ember-data@2.2.0 2015-11-30 12:23:47 -06:00
Austin Burdine
77a44907a9 deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06:00
Kevin Ansfield
e01ffa3620 Always call _super when using Ember hooks
no issue
- review use of Ember core hooks and add a call to `this._super` if missing
- fix a few occurrences of using the wrong component lifecycle hooks that could result in multiple/duplicate event handlers being attached

`_super` should always be called when overriding Ember's base hooks so that core functionality or app functionality added through extensions, mixins or addons is not lost. This is important as it guards against issues arising from later refactorings or core changes.

As example of lost functionality, there were a number of routes that extended from `AuthenticatedRoute` but then overrode the `beforeModel` hook without calling `_super` which meant that the route was no longer treated as authenticated.
2015-11-30 12:45:37 +00:00
Kevin Ansfield
2f4f6db133 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Kevin Ansfield
71e956a9eb Merge pull request #6108 from mixonic/no-rerender-selectors
Unify mobile state in JS, drop resize
2015-11-30 08:45:03 +00:00
Hannah Wolfe
1f13fb4c65 Merge pull request #6129 from kevinansfield/invalid-origin-errors
Display error message on setup if origin doesn't match config.js url
2015-11-27 00:25:57 +08:00
Kevin Ansfield
6c3336976e Display error message on setup if origin doesn't match config.js url
refs #6106
- add error handler for authentication step of blog setup
- move setup acceptance test out of 'settings' folder
2015-11-26 11:22:16 +00:00
Kevin Ansfield
e0c368bd90 Fix missing error on signin when server has gone away
no issue
- `session.authenticate` calls out to jQuery for the ajax request which then raises it's own error but returns nothing when the server is not reachable. This is a quick fix so that we don't error and can pass through to the default error handler in the authentication step.
2015-11-26 11:15:17 +00:00
Matthew Beale
e79b07fd31 Unify mobile state in JS, drop resize
In `gh-content-view-container` the visibility of another DOM node was
being used to detect if a given view was mobile or not. This means the
UI needed to have layout forced (and DOM rendered) before the content
view container would render a second time. This is slow interaction with
the DOM (forcing layout) and slow for Ember's renderer (it needs to
render the container once with a default, then again when the value
changes).

Additionally there were two ways resize was being observed. The
`Window.matchMedia` API was used for some styles and the `ember-resize`
addon used to detect other changes. Here I've unified around just the
`Window.matcheMedia` API but abstracted it behind a service.

Sizes are exposed as properties that can be bound to or used directly in
templates.
2015-11-25 11:54:08 -05:00
Kevin Ansfield
259559e6b2 Add count.posts support to user model on client
no issue
- moves adapter tests from unit to integration as we are not testing them in isolation
- add test for querying user's by slug with `include=count.posts`
- add `count` attribute to User model
2015-11-24 17:11:35 +00:00
Kevin Ansfield
9416e753dd Specify full SHAs when importing packages in bower.json
no issue
- removes warning: `bower password-generator#49accd7    short-sha Consider using longer commit SHA to avoid conflicts`
- fixes error: `bower jqueryui-touch-punch#*    error key must be a string or number. undefined`
2015-11-24 16:39:14 +00:00
Kevin Ansfield
c151be05de Update client for tag.post_count -> tag.count.posts rename
refs #6105
- adds `raw` ember-data transform to handle standard JSON `count` attribute
- update mirage factory to return correct `count.posts` format
- rename all uses of `post_count` to `count.posts`
2015-11-23 19:57:56 +00:00
Kevin Ansfield
933d6cd677 Merge pull request #6099 from acburdine/user-adapter
Implement custom user adapter to pull users by slug
2015-11-23 14:52:01 +00:00
Austin Burdine
31e4c9f753 implement custom user adapter to pull users by slug
closes #6095
- implements custom user adapter for the `/team/:slug/` route
- abstracts slug-url behavior into a mixin (used in /settings/tags/ as well)
- adds unit tests for both tag and user adapters
2015-11-23 07:48:08 -06:00
Matthew Beale
3e881027cc Use private properties for unobserved render state
* Drop set for local private editor property
* Only run preview setup on didInsertElement
* Drop set for local scrollWrapper prop
* Selectize setup on afterRender instead of next
* Use local props for editor save timers
2015-11-21 09:25:21 -05:00
Matthew Beale
6aa171077e Properly use htmlSafe styles 2015-11-20 17:48:48 -05:00
Hannah Wolfe
43bb09ef23 Fix & futureproof author filter
refs #5943
2015-11-20 10:13:30 +00:00
Hannah Wolfe
f285f8f948 Update author query to use filter
refs #5943
2015-11-19 21:53:24 +00:00
Sebastian Gierlinger
02429072ce Merge pull request #6049 from ErisDS/labs-text
Update public API labs flag text
2015-11-18 09:05:29 +01:00
Hannah Wolfe
3031a17728 Update public API labs flag text 2015-11-17 21:28:16 +00:00
Hannah Wolfe
0508f5775d Merge pull request #6076 from kevinansfield/setup-flow-test
Add acceptance test for setup flow happy-path
2015-11-16 21:47:45 +00:00
Hannah Wolfe
c9e7b6e906 Merge pull request #6071 from kevinansfield/fix-store-push-deprecations
Fix `store.push` deprecations in user model test
2015-11-16 21:27:39 +00:00
Kevin Ansfield
675a1221fa Add acceptance test for setup flow happy-path
refs #6039
- add `jquery-deparam` ember testing dependency for use in mirage config
- setup necessary mirage fixtures & endpoints for successful testing of setup flow's happy-path
- add happy-path acceptance test for setup flow
2015-11-15 11:51:19 +00:00
Kevin Ansfield
2b2050bd27 Fix store.push deprecations in user model test
no issue
- `store.push` now accepts a single argument that is a JSON API compliant object (http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_internal-format-change-to-json-api)
2015-11-12 15:18:08 +00:00
Kevin Ansfield
074346f6ce Fix auth regressions after ESA 1.0 upgrade
refs #6039, closes #6047, closes #6048

- delete old/unused fixtures file
- add failing tests for #6047 & #6048
- redirect to sign-in if we get a 401 when making an API request
- fix incorrect `this.notifications` call in tag controller
- raise `authorizationFailed` action in application route's `sessionInvalidated` hook so that it can be handled by leaf routes (fixes re-auth modal display)
- close "saving failed" alert when successfully re-authenticated
- adds a "window-proxy" util so that we can override `window.*` operations in tests
- fix `gh-selectize` attempting to register event handlers when the component has already been destroyed
2015-11-12 12:56:27 +00:00
Kevin Ansfield
e6cef8fcb9 Fix ember browser tests to always use full height of preview container
no issue
- adds style to client/tests/index.html to force preview container and inner element to always fill 100%
- fixes issue with infinite-scroll test failing in browser but passing in phantomjs
2015-11-04 15:43:05 +00:00
Kevin Ansfield
eedcdf2f17 Set up ember-cli-mirage and update existing acceptance tests
refs #6039
- adds ember-cli-mirage dependency
- sets up mirage to match our API endpoints and responses
- adds fixture data for settings that are always present for all blogs
- converts existing acceptance tests to use mirage
2015-11-03 15:35:58 +00:00
Hannah Wolfe
a8c539f30b Merge pull request #6017 from kevinansfield/finalize-debounced-gravatar
Finish changes in #5807 (debounced gravatar load in gh-profile-image)
2015-11-02 18:14:53 +00:00
Hannah Wolfe
f3f4488c23 Merge pull request #5984 from sebgie/issue#5941
Move Public API behind labs flag
2015-11-02 16:15:50 +00:00
Hannah Wolfe
765c884ba8 Merge pull request #6010 from kevinansfield/drag-drop-tags
Drag-n-drop re-ordering of tags in post settings menu
2015-11-02 16:15:33 +00:00
Kevin Ansfield
ffd282f28b Add tags to auto-complete search
refs #5845
- display matched tags in auto-complete dropdown, load tag edit screen when selected
- fix bug where only 1 search item with the same ID would be displayed (eg. if a post and tag both had an ID of 1 it would only show the first-loaded item)
2015-11-02 15:34:13 +00:00
Kevin Ansfield
aa02c85756 Use tag slugs in URLs for tag management and add front-end edit redirect
refs #5845
- adds custom adapter for tags so that `store.queryRecord('tag', {slug: 'tag-slug'})` hits the `/tags/slug/tag-slug` endpoint instead of `/tags/?slug=tag-slug`
- updates tag management screens to use tag slugs instead of IDs
- adds `/tag/:slug/edit` redirect to front-end
2015-11-02 14:56:59 +00:00
Sebastian Gierlinger
618d36c394 Move Public API behind labs flag
closes #5941
- added UI to labs page
- added method to determine if full authentication is required
- updated public_api tests to enable public api first
2015-11-02 14:18:58 +01:00
Kevin Ansfield
706b9ac669 Mobile fixes for tag management UI
refs #5845, #5969
- when on mobile devices tag management UI will only display a list and when a tag is accessed the tag settings form will slide in from the right
- tag settings form header has a 'back' button when on mobile to go back to tags list
- switching from mobile to standard modes will auto load the first tag as per standard tags screen on desktop
- if no tags are present then the blank-slate template will be shown when on mobile
2015-11-02 13:18:10 +00:00
Hannah Wolfe
2c7a4f9328 Merge pull request #5969 from kevinansfield/routable-tags
Routable tags
2015-11-01 15:34:33 +00:00
Kevin Ansfield
9771b51e1b Finish changes in #5807 (debounced gravatar load in gh-profile-image)
refs #5807, #5797
- add configurable debounce period
- rename `hasEmail` to `displayGravatar` to better reflect it's purpose
- add tests
2015-10-29 11:30:30 +00:00
Kevin Ansfield
2d6266cd75 deps: ember-mocha@0.8.6 2015-10-28 09:40:40 +00:00
Nazar Gargol
ae430f821a Adds debounced email validation and gravatar loading on second setup/signup screen
closes #5797
- adds debounced email validation as user types
- adds debounced gravatar loading for valid email
2015-10-28 09:40:40 +00:00
Kevin Ansfield
89b7ff3320 Routable tags
refs #5845
- Updates tag settings screen to match content screen behaviour. Each now tag has it's own route that is link-able from other areas of the app
- Updates a number of places where jQuery event handler code was not wrapped in Ember's run loop
2015-10-27 12:48:41 +00:00
Kevin Ansfield
3c888174cb Update admin area queries to use new filter parameter
refs #6005
- updates use of the query params removed in #6005 to use new `filter` param
2015-10-27 12:13:35 +00:00
Kevin Ansfield
48c0a3e097 Drag-n-drop re-ordering of tags in post settings menu
refs #5976
- adds `onChange` handler to `gh-selectize` component to update the `selection` property when selectize's value is changed (eg, by the drag_drop plugin updating the order)
- adds the `drag_drop` plugin to the list of selectize plugins used by the tags input on the post settings menu
2015-10-26 18:05:25 +00:00
Kevin Ansfield
56de42b280 Remove unused tags search CSS
no issue
- delete old/unused CSS that was used for an old tag component
2015-10-23 18:18:58 +01:00