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

92 commits

Author SHA1 Message Date
Austin Burdine 438c8a52d9 cleanup feature service error handling 2016-02-09 13:39:15 -06:00
Kevin Ansfield f7f9b56359 Continuation of #6207 (convert feature controller to service)
refs #6207, #6207
- updates tests for new async behaviour
- fixes tests failing on validation errors
- fixes `feature.labs` not updating after successful save
2016-02-09 08:37:44 -06:00
Austin Burdine 75f775ec1c convert feature controller to service
closes #6170
- add gh-feature-flag component to create a checkbox (reduce duplicate code)
2016-02-09 08:37:44 -06:00
Hannah Wolfe 1da33c3693 Merge pull request #6439 from kevinansfield/fix-nav-validation
Fix navigation item validation behaviour
2016-02-08 20:15:18 +00:00
Kevin Ansfield e6bbe22573 Test client using real browsers on Travis
no issue
- drop phantomjs tests both locally and on Travis
- instruct Travis to install latest Chrome and Firefox
- start an X server when running the client tests on Travis
- update testem config to start Chrome and Firefox in both local and CI tests
- fix testing preview sizing in Firefox as it doesn't support `zoom: 50%` style
- improve infinite scroll testing to be more reliable
- fix post acceptance test to handle both mobile and desktop views
2016-02-08 16:10:40 +00:00
Kevin Ansfield 83551b8dfb validate nav items when clicking the + button, ignoring last item if blank 2016-02-08 14:20:57 +00:00
Sebastian Gierlinger 5496d5b5d7 Merge pull request #6444 from kevinansfield/fix-mixed-content-warnings
Fix mixed content security warnings due to gravatar images
2016-02-08 10:03:39 +01:00
Kevin Ansfield 2a3dc231b7 Fix mixed content security warnings due to gravatar images
no issue
- switches gravatar URL generation to use protocol-relative URLs in `gh-profile-image` component
2016-02-05 16:48:15 +00:00
Austin Burdine dbf7943391 fix 404 acceptance tests 2016-02-05 06:16:29 -06:00
Kevin Ansfield 0fcafaebd6 Merge pull request #6430 from halfdan/6428-add-trailing
Add trailing slashes on relative URL unless [.?#]
2016-02-03 17:36:34 +00:00
Kevin Ansfield f01b4bad30 Merge pull request #6392 from kevinkucharczyk/post-invalid-id-404
Fix posts.post route not redirecting to 404
2016-02-03 17:04:48 +00:00
Kevin Ansfield 0ead35484f Merge pull request #6373 from kevinkucharczyk/standardise-camelcase
Standardise client property names to camelCase
2016-02-03 16:41:23 +00:00
Fabian Becker 59379ab99b Add trailing slashes on relative URL unless [.?#]
closes #6428
2016-02-03 17:11:44 +01:00
Kevin Ansfield 53b798d466 Acceptance tests for password reset flow on signin screen
refs #6039
- adds `/authentication/passwordreset` endpoint to mirage config
- tests the "Forgot?" link behaviour on the signin form

NB: This will fail until #6425 is merged as this tests the correct behaviour rather than the currently broken behaviour ;-)
2016-02-02 12:22:41 +00:00
Kevin P. Kucharczyk 44400e742b Fix missing tags list link on mobile
closes #6397
- don't pass isMobile to gh-tag-settings-form
- add gh-tag-settings-form test for mobile settings.tags link
2016-01-26 18:42:13 +01:00
Kevin P. Kucharczyk edc52ed65b Fix posts.post route not redirecting to 404
closes #6385
- redirect to 404 when post is not found
- replace replaceRoute calls with replaceWith calls in routes (replaceRoute is only available on controllers)
- add post mirage factory
- add acceptance test for post 404 redirection
2016-01-26 15:25:53 +01:00
Kevin Ansfield eb127990f1 Fix 401 error when uploading images
closes #6377
- restores ajax prefilter initializer that was removed in #6243
- adds regression test for standard `$.ajax` requests sending Authorization header

This can be removed once we no longer have jquery plugins that make internal ajax calls that don't go through ember-ajax.
2016-01-25 11:11:29 +00:00
Kevin P. Kucharczyk 24cc72cafd Standardise client property names to camelCase
closes #6018
- added keyForAttribute method in application serializer
- override keyForAttribute in settings serializer to not apply camelCase/underscore conversion
- rename under_scored properties to camelCased
2016-01-23 19:12:22 +01:00
Austin Burdine e24e85d94a deps: ember-ajax@0.7.1 2016-01-18 09:37:14 -06:00
Austin Burdine be1bf27285 refactor slug-generator object into a service
refs #6243
2016-01-15 09:43:17 -06:00
Kevin Ansfield ce70ebb1a8 Isolate all markdown editor behaviour into gh-editor component
no issue
- move all existing markdown editor behaviour out of the editor controller and isolate it into a single component that can be swapped out
- split the `register/remove` functions of the `shortcuts-route` out into a separate `shortcuts` mixin
2016-01-13 12:01:31 +00:00
Kevin Ansfield 97bb577496 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
Hannah Wolfe 37e6aab856 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 21c7274a3b 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 ea0d6bd4b6 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
Hannah Wolfe 183957ac33 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
Austin Burdine 1822afcaf7 add team acceptance test 2015-12-06 15:24:06 -06:00
Kevin Ansfield 6ac50f0ad1 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
Austin Burdine 26018c43d3 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 94d07f8ef7 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
Kevin Ansfield 04632e4e25 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
Austin Burdine f9b4c89e51 deps: ember/ember-data@2.2.0 2015-11-30 12:23:47 -06:00
Austin Burdine 0e04b62640 deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06: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
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
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 4200e8f262 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
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
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 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 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
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