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

528 commits

Author SHA1 Message Date
Rish 36fa9dc32c Enabled auto reset state for action buttons
no issue

- By default, action buttons had auto-reset off and reset had to be explicitly set
- Auto reset for action buttons is on by default now, and any button that should not reset should explicitly switch it off
2020-06-04 18:44:38 +05:30
Kevin Ansfield 3da16a8c32 Improved performance of members admin screens
no issue

- removes the "old" members screens
- swaps route names and links to point at the new members screens that were behind the experiments flag

Why are the new screens faster?

- only loads 50 members at once rather than every member in the database
- loads pages of members in as-needed whilst scrolling
- fetches member stats from the API rather than calculating locally
- caches members list and stats data for 60 seconds to avoid re-fetching when navigating to/from the members list
- moves search and filtering duties to the API rather than calculating locally
2020-05-28 13:35:53 +01:00
Kevin Ansfield d948ba33fb Fixed redirect after saving member in "old" member screen
no issue

- changed the `replaceRoute` after saving to transition to the `member-old` route instead of `member` route
- updated tests to work with the old routes (for now)
2020-05-22 10:50:12 +01:00
renovate[bot] 2eff6cf2d7
Update dependency eslint to v7 (#1566)
* Update dependency eslint to v7

* Fixed linting errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-17 22:53:37 +01:00
renovate[bot] cc80214916
Update dependency ember-power-select to v4 (#1528)
* Update dependency ember-power-select to v4
* Fixed trigger component override collision when building

- move the "override" into our own namespace
- update all `<PowerSelect>` usage to explicitly reference our customised trigger component

* Bumped ember-power-datepicker

- bumps `ember-basic-dropdown` sub-dependency
- resolves "Error: Could not find module `ember-compatibility-helpers` imported from `@glimmer/component/index`"
- https://github.com/cibernox/ember-basic-dropdown/issues/551

* Updated trigger to use class syntax

- it's not possible to use `.extend()` on an imported class

* Updated <GhBasicDropdown>

- match updated ember-basic-dropdown code

* Added `autofocus` modifier

- added `ember-modifier` dependency so that we can create our own render modifiers

* Updated <GhSearchInputTrigger> to a glimmer component

* Updated gh-token-input components

* Fixed tests

- wrap `<PowerSelect>` with `<div>` to maintain test selectors
- fixed `<GhBasicDropdown>` not rendering anything due to not having a local template

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-17 22:35:53 +01:00
Kevin Ansfield 8b0b5a27a8 Update dependency eslint-plugin-ghost to v1.4.1
no issue

- enables `prefer-ember-test-helpers` rule
- fixes single linting error from the new rule
2020-05-11 10:20:03 +01:00
Kevin Ansfield 479eecba4c Update dependency eslint-plugin-ghost to v1.4.0
no issue

- applies fixes for new/updated rules
- disables `ember/no-mixins` rule as we're not able to migrate away yet
2020-05-06 18:07:01 +01:00
Kevin Ansfield b364b81956 Fixed publish menu tests
refs 98f49e39a0

- the publish menu button text will now reset and because tests wait for all timers to finish before continuing the button text we're checking against has changed
2020-04-23 21:11:04 +01:00
Rish 5b196391e4 Fixed save test
no issue
2020-04-06 18:02:19 +05:30
Peter Zimon 81945b22ef
Updated notifications design (#1498)
no issue

- updating toaster design for better discoverability
2020-02-27 09:19:29 +00:00
Naz b192917e88
Added member impersonation (#1497)
refs b0ff1e7cac

- Adds "impersonate" button which would be triggering a popup window with "login url" that allows to log in as a member
2020-02-27 11:50:15 +08:00
Nazar Gargol 0cb787d11a Enabled editing email field on member profile page
refs b9db9fa15e

- Now that Admin API allows to edit email, there is no reason to keep this field disabled
2020-02-21 16:12:35 +08:00
Rishabh Garg 7319d11e94
Fixed tests for labels (#1493)
no issue

- Updated member settings css property in tests
- Added mock for label API
2020-02-14 16:37:25 +05:30
Kevin Ansfield 855757ffe5
Added default and custom post views (filters) to the admin sidebar (#1474)
no issue

- list custom post views in collapsable sidebar navigation
  - default views: Draft, Scheduled, Published (except for contributors)
  - record expanded/collapsed state of the navigation menus in user settings via new `navigation` service
- adds `customViews` service that manages custom views
  - provides list of default views
  - gives access to "active" custom view based on current route and query params
  - manages loading/saving of custom views to user settings
- show "Add view" button in the content filter when the posts list has been filtered
- show "Edit view" button in the content filter when the posts list filter matches a saved view

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-01-30 15:35:36 +00:00
Kevin Ansfield 2bc00a375b Removed <GhDownloadCount>
no issue

- the count.ghost.org service is being shut down
- replaced the fetch+poll component with a hardcoded figure
2020-01-27 09:51:45 +00:00
Kevin Ansfield 92107312a8 Upgraded eslint-plugin-ghost and fixed new linter errors
no issue

- update imports for `@ember-data` package (https://github.com/emberjs/rfcs/blob/master/text/0395-ember-data-packages.md)
- use `computed.reads` where applicable (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/require-computed-macros.md)
- fix usage of `scheduleOnce` so that functions are only scheduled once (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-incorrect-calls-with-inline-anonymous-functions.md)
2020-01-16 17:01:12 +00:00
Kevin Ansfield f529296129
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 aaf9f88ebc to use explicit this
2020-01-16 15:14:03 +00:00
Kevin Ansfield af4bd52b55 Fixed Ember Data record.toJSON() deprecation
no issue

- https://deprecations.emberjs.com/ember-data/v3.x/#toc_record-toJSON
2020-01-07 13:23:15 +00:00
Kevin Ansfield 36018c7d7a Fixed linting 2020-01-07 09:11:42 +00:00
Kevin Ansfield 73ef9440ed Swapped and updated pretender dependency
no issue

- `ember-cli-pretender` is no longer required when using `ember-auto-import`
- updated `pretender` dependency from 2.1.2 to 3.2.0
- removed upload progress tests (one was already skipped due to random failures) because pretender is not outputting meaningful `event.loaded` and `event.total` values
2020-01-06 17:28:47 +00:00
Hannah Wolfe 377055a7de Added Secondary Navigation (#1410)
refs: https://github.com/TryGhost/Ghost/pull/11409

- Added a new UI for a second set of navigation links
- This should support most concepts of nav, e.g. left and right, or header and footer
- This PR mostly updates the design and nav components to cope with a second set of nav
2019-12-04 11:14:45 +07:00
Nazar Gargol 4ffbb9f7d3 Fixed members acceptance test
- The `await wait()` worked in combination with correct assertions
2019-12-03 16:05:56 +07:00
Nazar Gargol 00324e44a5 Fixed flaky new member test
no issue

- The test is failing only when run purely from the console if run from the browser window it alway succeeds
- Commented out intended condition and left the tricky one out for future review
2019-12-03 11:24:16 +07:00
Naz Gargol 3ec3671aee
Added member "add" screen (#1411)
no issue

- We have a need to create a member manually, this changeset solves this problem.
- Added new member button to the member's screen
- Needed to be able to perform add member action
- Fixed inconsistent `createAt` naming. All models use consistent `createdAtUTC`, fixed it up so that members model follows the same pattern. If we want to change this pattern should probably happen for all models at once
- Fixed member avatar when creating a new member. If the values are completely empty the screen ends up being filled with empty space. Added some dummy initials which are recalculated once the member enters the name or an email
- Refactored DS naming for consistency. Nowhere else in the codebase 'DS' name is ever used, made this consistent
- Added missing validations in members form
- Simplified if conditions in the member list template. When using the if/esle statements unnecessary new-line symbols were inserted which made it hard to test. Also by using computed property view is much cleaner
- Updated member's model default value for `subscribed` to "true". It is turned on by default in the model layer  on the backend (ref: https://github.com/TryGhost/Ghost/blob/3.1.0/core/server/data/schema/schema.js#L330), this behavior is intended and should be the same on the frontend
2019-11-28 18:30:21 +07:00
Kevin Ansfield 39c738ee67
Added ability to retry failed emails from the confirm modal (#1412)
no issue

- adds a `.retry()` method to the email model+adapter
- adds a retry email task to the publishmenu that follows the same retry-then-poll behaviour as the regular email confirmation
- show a retry button in the confirm email modal if the original send failed
- increases max "immediate failure" poll timeout to 15sec (an 8sec retry-to-failure time has been seen locally)
2019-11-22 15:09:48 +00:00
Kevin Ansfield 567ec911f0 Fixed tests 2019-11-13 16:10:29 +00:00
Rish 9ff39e5f0a Fixed tests for copy changes 2019-11-13 11:45:58 +05:30
Kevin Ansfield ee09e46c8d Fixed tests 2019-11-08 16:01:40 +07:00
Kevin Ansfield 5b0e9826f7 Fixed tests 2019-11-08 11:14:04 +07:00
Rish 7f481ef64b Fixed members test for admin
no issue
2019-10-14 08:42:04 +05:30
Rish ca54402c82 Enabled members by default
no-issue

This removes the need for `enableDeveloperExperiments` flag for members
2019-10-14 08:42:04 +05:30
Kevin Ansfield 276d4308f4 Merge branch 'master' into v3 2019-10-08 14:04:38 +01:00
Kevin Ansfield 8976e4ff3e Fixed tests 2019-10-07 11:17:16 +01:00
Naz Gargol 6bbe7bb3d4
Content visibility configuration in labs (#1346)
no issue

- Changed members description to less verbose
- Added content visibility radio options to members configuration screen
- Moved setting of default visibility to server-side
- Default visibility setting when PSM is opened before making the first request to the server
2019-10-02 11:13:59 +02:00
Naz Gargol 411b2fa232
Added PSM visibility input (#1344)
refs 80f7e0b19e

- Added visibility input in PSM to control content access level for members
- Added default post visibility in editor. To be changed (moved to server-side) once `defaultContentVisibility` is available in settings service
- Added `visibility` property to post model & mirage
2019-10-01 15:00:53 +02:00
Naz Gargol 8dff0ee6d4
🔥 Removed all subscriber feature related code (#1337)
refs https://github.com/TryGhost/Ghost/pull/11153

- Removed all subscriber feature related code
- The feature is being substituted by members
2019-09-26 15:58:01 +02:00
Rishabh Garg 09f0c0d2ee
Switched Admin API version from canary to v3 (#1317)
no issue

- Switches over to new v3 endpoint from canary
2019-09-03 12:40:27 +05:30
Rishabh Garg 166c8ff5e6
🎨 Updated tags screen design and usability (#1283)
no issue

Updates design and usability for tags list and details screen
2019-08-27 19:21:31 +05:30
Kevin Ansfield 0d563eb5bc Fixed tests 2019-08-27 10:59:27 +01:00
Kevin Ansfield a63943edd6
Added "What's new" indicator and modal to highlight recent updates (#1292)
no issue

- adds `whats-new` service that fetches the changelog from ghost.org and exposes the latest changelog entries
- trigger a background fetch of the changelog from ghost.org when first loading the admin when logged in, or after signing in
- adds a "What's new" menu item next to the user popup menu
- adds an indicator to the user menu button and what's new menu item if there are unseen changelog entries
- closing the changelog modal will update the "last seen date", clearing both indicators
2019-08-23 10:01:27 +01:00
Kevin Ansfield 6d13041fe5
Switched Admin API version from v2 to canary (#1291)
no issue

- Ghost-Admin is our primary API client, we should keep it in sync with the canary API branch to dog food our API changes
2019-08-12 09:56:21 +01:00
Kevin Ansfield 7c66d66551
🎨 Added auto-login to private site when viewing site preview in admin (#1286)
closes https://github.com/TryGhost/Ghost/issues/10995

- when first loading the site preview, if private mode is enabled submit the login form in the background to get the cookie before loading the iframe
- refactors post-authentication preloading to ensure it occurs before post-authentication route hooks are called
- adds `showSuccess` attribute to `<GhTaskButton>` so that when set to `false` it can stay in the running state after "success" to avoid state change flashes whilst waiting for a transition
2019-08-12 09:11:10 +01:00
Aileen Nowak f65460694a 🔗 Updated docs api links to be version-less 2019-07-25 15:15:31 +08:00
Renovate Bot d03a63d562 Update ember core
no issue

- remove usages of function prototype extensions
- fix usage of evented.off
2019-07-22 14:00:52 +01:00
Kevin Ansfield ba6c0b2867 Remove unused files
no issue

- `app/helpers/gh-format-html` is duplicated in `lib/koenig-editor/addon/helpers/sanitize-html` and is not used anywhere else
- `app/helpers/gh-path` is not used anywhere - the API should be returning absolute URLs everywhere so path generation is no longer as necessary within templates
- `app/helpers/is-equal` replaced with `{{eq}}` from `ember-truth-helpers`
- `app/helpers/is-not` replaced with `{{not}}` from `ember-truth-helpers`
- `app/utils/isFinite` is not used anywhere
- `app/utils/titleize` is not used anywhere
2019-07-22 11:06:16 +01:00
Aileen Nowak b134b24679
Updated links to docs (#1276)
no issue
2019-07-22 16:53:24 +08:00
Paul Perkins a96f4fd5d2 🎨 Changed post/page date picker format to 'YYYY-MM-DD' (#1213)
refs https://github.com/TryGhost/Ghost/issues/10767

The use of the date format 'MM/DD/YYYY' is confusing to those not in American English locations. In the absence of being able to dynamically determine full locale data, using 'YYYY-MM-DD' seems to the least ambiguous date format which would be intuitive to most users.
2019-06-24 09:06:39 +01: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