Commit Graph

40 Commits

Author SHA1 Message Date
Kevin Ansfield
c85690fb12 Switched integration unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:11 +01:00
Kevin Ansfield
f654b24486 Refactored integration webhook modals
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-08 09:18:56 +01:00
Kevin Ansfield
bd87ee3e2a Refactored delete custom integration modal
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-08 09:18:48 +01:00
Sanne de Vries
a2fc31aa0a Cleaned up icon styles
Refs https://www.notion.so/ghost/Unify-icons-across-Admin-7e3d124d5db34c63beccca029af595e7

- Reduced duplicate plus icons
- Replaced fill trash, info and pen icons by stroke icons
- Removed fill styles from default button classes
- Removed launch-wizard css
2022-09-02 16:56:02 +01:00
Sanne de Vries
be0fb41636 Updated webhook actions to dotdotdot menu 2022-07-12 13:38:51 +01:00
Kevin Ansfield
f44c54862b Completed Octane migration of integration controller
refs https://github.com/TryGhost/Ghost/issues/14101

Applied scout rule to fix linter errors when touching a file.

- added local `updateProperty` and `validateProperty` methods to remove use of `target=`
  - our validation implementation does not properly bind `this` so direct usage of `this.integration.validate` fails
- added `on-input` argument support to our `TextInput` mixin so we we're not overwriting the native event handlers on classic input components
2022-02-21 17:54:47 +00:00
Kevin Ansfield
d1e7ccbe00 🐛 Fixed saving of custom integrations
closes https://github.com/TryGhost/Ghost/pull/14183
refs 3ee0c3ff53

- unskipped test for integration saving
- fixed missed rename from `save` to `saveTask`
- fixed `saveTask` throwing from a "handled" validation error
2022-02-21 17:54:47 +00:00
Kevin Ansfield
3ee0c3ff53 Fixed duplicate top-level properties after native class codemod
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Admin/pull/2256

Before migrating to native classes we had a number of controllers/components that had an `.actions.foo` action and a `.foo` task. The automated migration to native classes didn't take that into account and we've ended up with duplicate top-level property names. These duplicates are confusing and can potentially lead to errors or unexpected behaviour, they'll also be flagged as linter errors when we bump our eslint version.

- switched tasks with matching action names to `.actionTask` naming scheme
2022-02-10 10:20:03 +00:00
Gabriel Csapo
beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00
Kevin Ansfield
d0f6dd7fef Refactored custom integration creation and limits modals
refs https://github.com/TryGhost/Team/issues/559

- switched to new ember-promise-modals pattern
- removed controller and template in favor of opening modals directly from the route
- removed unused `mousedown` event handlers - they are only necessary when an input blur would trigger validation errors
- fixed Enter key not triggering create action by adding an `{{on-key "Enter"}}` event handler to the name input
- fixed scroll not resetting to top of integrations screens when navigating between them by adding `{{scroll-top}}` element modifier to the main content sections
2022-01-13 13:16:13 +00:00
Peter Zimon
737db37175 Added Integrations as a subpage of Settings
- Restructured Admin so that Integrations becomes a subpage of Settings.
2021-10-18 14:47:59 +02:00
Peter Zimon
04d9caefed Updated navigation (#1832)
no issue

Updated settings navigation to a completely redesigned flow for Ghost 4.0 🎉

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-02-02 16:08:06 +00:00
Peter Zimon
e903046813 Basic settings restructure
- created new central settings page and moved there all settings from the nav menu
2021-02-02 16:08:03 +00:00
Peter Zimon
f476c268b5 Zapier templates update (#1783)
- updated Zapier templates page to show the most relevant Zaps instead of the latest
- fixed design regression in Slack, Amp and Unsplash integration pages
2020-11-25 11:31:15 +01:00
Rish
85d1775608 Removed redundant reset value for task buttons
no issue

- Since task buttons by default have reset on now, we don't need to explicitly add it to individual buttons
2020-06-04 19:23:59 +05:30
Kevin Ansfield
07f24e69f6 Reduced unnecessary waiting in tests
no issue

- fixed `<GhTaskButton>` not resetting after an externally triggered task run such as when pressing Cmd+S
- cleaned up manual timeouts/resets where button reset is now fully handled by `<GhTaskButton>` (these were causing 2.5s waits each time a save occurred in acceptance tests)
- where manual timeouts were required, reduce testing time from >2.5s to 50ms
2020-05-11 11:37:35 +01:00
Peter Zimon
ae1afac049 Added tooltips for regenerate buttons
no issues.
- added tooltip for icon-only regenerate button in custom integrations and Zapier details screen so that users understand what the button does
2020-05-06 09:02:39 +02:00
Rishabh Garg
2b961df4cb Added regenerate button to integration api keys (#1562)
no issue

- Adds new regenerate button for refreshing custom integration's admin and content api keys
- Adds new regenerate button for refreshing internal Zapier integration's admin key
- Regenerates content or admin API key after confirmation and shows user new key
2020-05-05 23:44:45 +05:30
Rishabh Garg
c3883d4c6f 💄Updated save buttons to reset state (#1522)
* Updated save buttons to reset state

no issue

Currently the save buttons across Admin don't auto-reset to idle state after success/failure on run which can give false impression once user changes any value. This PR auto-resets the button to idle state after a fixed timeout if no subsequent action is performed as a short term UX improvement.

* Fixed success check for auto reset

* Updated timeout value

* Added explicit save button reset for pages

* Updated save buttons to reset via shortcut

Auto-reset for save buttons wasn't working if not done through manual click on task button previously, this handles by splitting the original save task in controller to handle shortcut saves.

* Updated reset check for only successful tasks

* Added save reset to code-injection and design settings

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-04-06 16:17:28 +05:30
Peter Zimon
a376219453 🐛 Fixed visual bugs on integration details screen
no refs.
- fixed misalignment of icon container and icon
- fixed icon color for "Copied" link status indication
2020-02-12 09:33:27 +01:00
Kevin Ansfield
2231dd84c2 Migrated to <AngleBracketSyntax /> (#1460)
no issue

Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md

We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.

This simplifies the rules for what template code is referring to...

`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)

- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
  - `app/templates`
  - `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
  - `gh-feature-flag`
  - `gh-tour-item`
  - `gh-cm-editor`
  - `gh-fullscreen-modal`
  - `gh-task-button`
- updates some code that was missed in 3c851293c1 to use explicit this
2020-01-16 15:14:03 +00:00
Kevin Ansfield
2d507c47b1 Converted <GhErrorMessage> to glimmer component
no issue

- fixes `isVisible` deprecation warning that was showing up for every component invocation since the Ember 3.14 upgrade
2019-12-13 16:12:04 +00:00
Kevin Ansfield
3c851293c1 Ran "no implicit this in templates" codemod
no issue

We were in a part-way state where some touched files had been (sometimes partially) migrated to explicit `this`. The codemod that was available has now fixed the formatting issues it had so it was a good time to run it.

https://github.com/ember-codemods/ember-no-implicit-this-codemod

- part of the migration path for https://github.com/emberjs/rfcs/pull/308
- starts to make template resolution rules more explicit
  - `<MyComponent />` - always a component
  - `{{my-component}}` - component or helper (components _must_ have a `-`. This style of component will go away once fully migrated to angle bracket components)
  - `{{value}}` - a helper or local template variable
  - `{{this.value}}` - reference to a property on the backing context (either a controller or a component JS file)
2019-12-13 14:20:29 +00:00
Peter Zimon
c51bce7358 🎨 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
Zimo
d120440c96 Updated animation of copy buttons in integration
no refs.
"Copy" buttons in the integration detail screen are shown only on hover. Removed animation to make it snappeir.
2019-03-08 09:47:59 +01:00
Kevin Ansfield
8617dba252 Added v2 Admin API with token authentication
closes https://github.com/TryGhost/Ghost/issues/9865
- moved Admin API Key display out of developer experiments
- docs: https://docs.ghost.org/api/
2019-02-26 12:49:02 +07:00
Kevin Ansfield
9e3974a93d Fixed integration acceptance test 2019-02-23 17:57:17 +07:00
Zimo
bb2c5426bc Refined integrations API table design 2019-02-23 17:06:34 +07:00
Kevin Ansfield
2398d73e24 Added copyable API Url to custom integration screen 2019-02-23 16:48:39 +07:00
Peter Zimon
c4a8a1cbaa Updated integrations UI (#1086)
no issue

Updated custom integrations section for a more balanced and consistent design:
- removed green "New custom integration" button and added a fixed bottom row in the custom integrations list
- added "Custom integrations" heading to the list
- synced webhooks design with this pattern
2019-01-28 12:53:48 +00:00
John O'Nolan
4ab05b5403 I was never here 2018-12-04 21:04:33 +07:00
John O'Nolan
5fde7ea168 SVG fix 2018-12-04 21:02:58 +07:00
Kevin Ansfield
c33edbac08 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
ac17053863 Added custom integrations - Content API Keys and "Site rebuild" webhooks (#1063)
closes TryGhost/Ghost#9942
- move custom integrations UI out from behind the developer experiments flag
- put Admin API key and web hook secret fields behind the developer experiments flag
- do not show "unsaved changes" modal when adding/editing a webhook
- fixed all webhooks showing for each custom integration
2018-11-06 10:59:47 +00:00
Peter Zimon
3f7a036905 Integration UI refinements (#1059)
no issue
* Integration detail page design refinements
* Fixing error message layout on integration detail screen
* Heading details
* Margin refinements
* Refine webhooks modal
* Lines and font sizes
* Replace integrations icon
2018-10-24 14:04:17 +01:00
Kevin Ansfield
fce4aa9176 Added ability to upload integration icons (#1058)
no issue
- add `{{aspect-ratio-box}}` to make it easier to adjust box sizes at a fixed ratio based on container height which isn't possible with CSS directly
- used `{{gh-uploader}}` to add upload facility to the icon shown on the integration screen
2018-10-23 10:29:49 +01:00
Fabien O'Carroll
0d38df0f74 Added ability to delete integrations (#1057)
no issue
- adds delete integration modal, and delete button on the integration page to trigger it
2018-10-19 17:37:27 +01:00
Kevin Ansfield
296e35493d Added edit webhook modal (#1056)
requires https://github.com/TryGhost/Ghost/pull/10033
- added `settings.integration.webhooks.edit` route
  - `/integrations/:integration_id/webhooks/:webhook_id`
- added error handling to the webhook form modal that copes with the actual errors we get back from the server
- added `event-name` helper to display humanised event names in the webhooks list
- added delete button to the webhooks list and associated confirmation modal
2018-10-19 17:34:53 +01:00
Kevin Ansfield
832968d4a5 Improved api key clipboard copy behaviour
no issue
- display "last seen" time if available for API keys
- use CSS to for hover behaviour instead of JS toggle
- add background to "copy" button so it's visible when on top of key data
- use ember-concurrency tasks instead of actions and used the derived state to show a temporary "copied to clipboard" message in place of the "last seen at" time
2018-10-19 00:09:05 +01:00
Kevin Ansfield
5047b9f3d7 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