Commit Graph

2278 Commits

Author SHA1 Message Date
Austin Burdine 0e04b62640 deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06:00
Kevin Ansfield 17b3ced8c9 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 7ce3726589 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 976a2e6141 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 1c02a4182a 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 21fc4662ff 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 86f52081cc 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 4d98363c7c 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 a1e7c485a1 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 91e86bde61 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 21f384ff2b 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 777a7fed78 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 4d3e0d664f 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 056e3e465d Properly use htmlSafe styles 2015-11-20 17:48:48 -05:00
Hannah Wolfe e6ef39bc2c Fix & futureproof author filter
refs #5943
2015-11-20 10:13:30 +00:00
Hannah Wolfe 1097f1ce47 Update author query to use filter
refs #5943
2015-11-19 21:53:24 +00:00
Sebastian Gierlinger 6a2963ae20 Merge pull request #6049 from ErisDS/labs-text
Update public API labs flag text
2015-11-18 09:05:29 +01:00
Hannah Wolfe f45c9b1ecf Update public API labs flag text 2015-11-17 21:28:16 +00:00
Hannah Wolfe ff3062d5eb 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 c11dba5c90 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 1e73e8c678 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 798e5ff1e0 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 7db0ffbda2 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 8859d686d3 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 d98ad41008 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 5f68b5477a 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 63e3c33ea0 Merge pull request #5984 from sebgie/issue#5941
Move Public API behind labs flag
2015-11-02 16:15:50 +00:00
Hannah Wolfe df346ceb99 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 d2fda9cbce 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 8357361aec 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 8650f34665 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 14a182d691 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 8d32afdac4 Merge pull request #5969 from kevinansfield/routable-tags
Routable tags
2015-11-01 15:34:33 +00:00
Kevin Ansfield b06881be04 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 c7c90a3910 deps: ember-mocha@0.8.6 2015-10-28 09:40:40 +00:00
Nazar Gargol 3d6f4d15ba 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 4ecdf182e6 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 6ea49f3a03 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 8c52845cfe 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 8a7750add3 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
Kevin Ansfield 0006cb7ee9 Keep old `shouldBackgroundReloadRecord` behaviour ready for 2.0 upgrade
no issue
- adds `shouldBackgroundReloadRecord` override so that we keep the current behaviour (never background reload unless instigated manually) when we upgrade to Ember Data 2.0 which will always background-reload by default
2015-10-23 18:18:58 +01:00
Kevin Ansfield 5707a82528 Merge pull request #5967 from acburdine/issue-5933
Fix settings menu issue with devices that are less than 350px wide
2015-10-22 17:27:40 +01:00
Hannah Wolfe 4cf2aa3334 Merge pull request #5953 from kevinansfield/fix-invite-revoke
Fix "revoke invite" feature on /team page
2015-10-21 17:56:59 +01:00
Hannah Wolfe ff17c0191b Merge pull request #5952 from kevinansfield/tag-settings-ui
Minor tag settings validation updates & fixes
2015-10-21 17:40:53 +01:00
Hannah Wolfe 1765dc3f53 Merge pull request #5897 from kevinansfield/fix-cover-post
Fix empty image when navigating to new editor from an editor with image
2015-10-21 17:39:18 +01:00
Hannah Wolfe 3e822d32c0 Merge pull request #5975 from kevinansfield/bump-ember-tests-timeout
Increase timeout in ember tests
2015-10-20 19:17:36 +01:00
Kevin Ansfield 1ea8df72f7 Increase timeout in ember tests
no issue
- increases individual test timeout from 5sec to 15sec

It seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test failures we see.
2015-10-20 16:00:16 +01:00
Austin Burdine 58f7c8f6b2 fix session data loading in settings/labs
closes #5973
- updating session data loading to new esa 1.0 api
2015-10-20 07:50:41 -05:00
Kevin Ansfield fc10ebea96 Fix empty image when navigating to new editor from an editor with image
closes #5840
- calls `reset()` on the uploader when re-rendered with a blank image
- calls `reset()` and `initWithImage()` on the uploader when re-rendered with an image and the uploader is still in the "blank" state
2015-10-19 11:55:31 +01:00
Kevin Ansfield 3759930a77 Minor tag settings validation updates & fixes
refs #5845
- add tests for `tag-settings` validator
- add validation for tag slug length
- fix display of error message when saving tag fails on the server
- add max chars text to description char count, remove error message as the count/input colour already indicates an error
2015-10-19 10:45:41 +01:00