Commit Graph

128 Commits

Author SHA1 Message Date
Aileen Nowak b134b24679
Updated links to docs (#1276)
no issue
2019-07-22 16:53:24 +08:00
Peter Zimon 183e22e0bf 🎨 Updated admin area design and usability (#1232)
refs. https://github.com/TryGhost/Team/issues/205

Major update to Ghost Admin UI including:
- improved general consistency (typography, colors and contrast, UI components, icons)
- new design for post and pages lists, improved discoverability of filters 
- search moved to modal
- account menu is decoupled from ghost logo
- further usability fixes
2019-06-18 11:47:20 +01:00
Renovate Bot 79fa0980af Update dependency ember-mocha to v0.16.0
no issue

- removes now-unneeded `adapter-error` override helper
- comments out the `gh-post-settings-menu` unit tests because the top-level `describe.skip` was causing all further unit tests to be skipped
2019-06-17 15:32:09 +01:00
Kevin Ansfield fdb4b46fd2 Updated for breaking changes in ember-cli-mirage@1.0.0 2019-05-27 09:58:33 +01:00
Kevin Ansfield 371639f497 🐛 Fixed missing errors and confusing button text in theme upload modal
no issue
- fixed "Active with errors" button successful theme upload with no warnings/errors
- fixed fatal errors not showing due to change in API error response
- fixed "Retry" button not showing when there were fatal errors
- fixed "Upload successful!" message after clicking "Retry" on a failed upload
2019-04-15 22:43:29 +01:00
Kevin Ansfield 55ed3322c8 🐛 Fixed missing error details when activating a theme with fatal errors
no issue
- the API response for theme activation when a fatal validation error occurred has changed but the client wasn't updated resulting in a modal containing an "Activation failed" header but no details
- updates the error details extraction path and adjusts the tests to match the real API response
2019-04-11 11:00:40 +01:00
Kevin Ansfield f0ad9dcdc4 🐛 Fixed missing error notification when attempting to activate an invalid theme
no issue
- updates error handling to work with new v2 error response formats
  - `.errorType` -> `.error`
  - `.errorDetails` -> `.details`
2019-03-25 11:32:29 +00:00
Zimo 5ace095332 Fixed tests for tags case changes
refs. 5dcf5b9651
2019-03-25 10:19:51 +01:00
Zimo 5dcf5b9651 Fixed button and title cases for Tags screen
no refs.
Set "New tag" button and "Tag settings" to sentence case to be consistent with the rest of the UI. (Previously they were title case.)
2019-03-25 09:37:44 +01:00
Kevin Ansfield c91cd8b330 Fixed custom integrations acceptance test 2019-03-19 12:07:41 +00:00
Kevin Ansfield 850d56e60e
Renamed ghostHead/Foot settings to codeinjectionHead/Foot (#1107)
closes https://github.com/TryGhost/Ghost/issues/10560
- match changes in the API
2019-03-05 10:40:19 +00:00
Kevin Ansfield 05a92defae Fixed custom integrations acceptance test 2019-02-26 15:22:04 +07:00
Kevin Ansfield d2a112723b Fixed general settings acceptance test 2019-02-26 09:15:19 +07:00
Kevin Ansfield e3d5689fe1 Updated gh-uploader to work with new /images/upload/ endpoint 2019-02-25 23:01:49 +07:00
Kevin Ansfield b34269b66c Updated config service to use new /site/ and /config/ endpoints 2019-02-25 21:47:17 +07:00
Kevin Ansfield 50c20c1526 Fixed custom integration test in Travis 2019-02-23 18:20:24 +07:00
Kevin Ansfield 20c63cc14a Fixed integration acceptance test 2019-02-23 17:57:17 +07:00
Nazar Gargol 8f03ac3611 Renamed /uploads* endpoints to /images*
refs #10438
2019-02-22 18:16:25 +07:00
Peter Zimon b63f5f59d0
Left navigation menu update (#1102)
refs. [f8b03f5](f8b03f50b6)

- added icons for members and pages
- improved view site link visibility
- added view site to logo dropdown
- updated all navigation and logo menu icons
- rename 'team' to 'staff'
- lots of design refinement and update (colors, shadows)
2019-02-22 16:43:35 +07:00
Kevin Ansfield 509b16f6dc Fixed invalid selectors in Slack tests that were failing in Safari 2019-01-22 13:53:34 +00:00
Greg Hart fb4794c3b5 Added ability to configure Slack integration's username (#1084)
closes https://github.com/TryGhost/Ghost/issues/9735
- add "Username" form to Slack integration
2019-01-21 12:26:21 +00:00
Hannah Wolfe bcd8f485ad
Updated docs links to best equivalents (#1097)
- Our documentation has been overhauled, this updates the all the old links sprinkled through Ghost-Admin
2019-01-16 16:03:33 +00:00
Kevin Ansfield 079c8ccc2c
Migrate to latest ember, ember-mocha and modern ember testing (#1044)
no issue
- upgrade to latest `ember-source` and related dependencies including `ember-cli`
- upgrade to latest `ember-mocha` and modern ember testing setup
    - https://github.com/emberjs/rfcs/blob/master/text/0268-acceptance-testing-refactor.md
    - switch from using global acceptance test helpers and `native-dom-helpers` to using the new `ember-test-helpers` methods
    - use [`chai-dom`](https://github.com/nathanboktae/chai-dom) assertions where in some places (still a lot of places in the tests that could use these)
- pin `ember-in-viewport` to 3.0.x to work around incompatibilities between different versions used in `ember-light-table`, `ember-infinity`, and `ember-sticky-element`
    - incompatibilities manifested as "Invalid value used as weak map key" errors thrown when using `ember-light-table` (subscribers screen)
- pin `ember-power-datepicker` to unreleased version that contains a move from global acceptance test helpers to modern test helpers
2019-01-02 09:58:55 +00:00
Kevin Ansfield 29453bae8e Fixed webhook modal title showing "New webhook" when editing a webhook
refs https://github.com/TryGhost/Ghost/issues/10137
- adjust modal title depending on `webhook.isNew` state
- add acceptance tests for modal creation
- add missing mirage webhook factory
- mock integrations/api-keys/webhooks in test env rather than development
2018-11-12 16:31:47 +00:00
Kevin Ansfield 4795658554
🎨 Changed tags list, filter dropdown, and select input to sort alphabetically (#1066)
no issue
- switch tags sorting from ID based to alphabetical
- pre-requisite to nested tags sorting
2018-11-07 15:06:28 +00:00
Kevin Ansfield d7facd5c61 Cleaned up class and :contains based test selectors
no issue
- nav menu had many unused CSS classes that were sometimes used for test selectors
- `:contains` is not a native CSS selector so will cause issues when we switch to native test helpers
2018-10-23 18:11:48 +01:00
Kevin Ansfield 519b736015
Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

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

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield d878d2e31f Fixed non-admin redirects on integration routes
no issue
- after un-nesting the built-in integration routes they no longer had the automatic redirect for non-admins
- added our non-admin redirect behaviour to all of the integration routes
- added our non-admin redirect behaviour to the Zapier route which didn't even have an authenticated redirect previously
- added acceptance test for Zapier route so verify the new behaviour
- wrapped the Zapier widget `<script>` tag in an "is testing" conditional so that the external script doesn't get loaded during tests
2018-10-04 12:16:41 +01:00
Kevin Ansfield 5390f51e36
Renamed Apps to Integrations (#1050)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
2018-10-04 11:02:36 +01:00
Kevin Ansfield 05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield 02f45c2a3a Added routes.yaml upload to Labs screen
refs https://github.com/TryGhost/Ghost/issues/9744
- adds `routes.yaml` upload using the same UI as the `redirects.json` upload
  - upload: `POST /settings/routes/yaml/`
  - download: `GET /settings/routes/yaml/`
2018-08-14 17:49:50 +01:00
Kevin Ansfield 61031c35a3 🐛 Fixed admin URL not updating when changing tag slug
closes https://github.com/TryGhost/Ghost/issues/9571
- uses `window.replaceState` to update the URL when a tag is saved with a new URL
    - ensures back button doesn't result in 404
    - use `windowProxy` util so that behaviour can be tested
2018-04-30 12:29:43 +01:00
Kevin Ansfield c066bc8183
Bump dependencies (#991)
no issue
- bump `ember-cli-chai` and update tests
    - add missing Post model properties to the post factory with `null` to better match API output
    - replace uses of `.blank` which no longer exists, swapping for `.empty` or explicit checks for `null`
    - manually parse strings to numbers before using `.above` and `.below`
- bump top-level deps with no breaking changes
- bump yarn.lock sub-dependencies
2018-03-26 11:41:45 +01:00
Austin Burdine ae3b9f97d9 Contributor Role (#948)
refs https://github.com/TryGhost/Ghost/issues/9314

* added save button for contributor
* hide tag filter & redirect to posts.index if post is published
* update editor controller test to need session service
2018-02-07 10:42:46 +01:00
Kevin Ansfield 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 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
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 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 6cf39d49af Upload/Download redirects UI
closes TryGhost/Ghost#9028

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

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

- bump ember-cli-eslint and eslint-plugin-ember
- fix indentation & "unnecessary escape chars" lint errors
2017-09-11 14:56:11 +07:00
Kevin Ansfield 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
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 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