Commit Graph

563 Commits

Author SHA1 Message Date
Peter Zimon
f74ca902c2 Added sample CSV link to members import
no refs.
- added link to a sample CSV in members import start screen
2020-07-09 17:30:24 +02:00
Peter Zimon
59ed8d718d Members import refinements
no refs.
- updated and removed copy on mapping screen
2020-07-09 14:42:29 +02:00
Peter Zimon
c611f65f53 Refined members import modal
no refs.
- fixed title logic
- fixed stripe validation message
2020-07-09 12:12:53 +02:00
Nazar Gargol
bcfc3792cd Removed invalid and duplicate email validations in members importer 2020-07-09 17:55:40 +12:00
Peter Zimon
36613212bb Fixed test for member import validation
no refs.
- fixed copy for member import validation test
2020-07-08 16:05:44 +02:00
Nazar Gargol
2da05338dd Fixed failure to render gh-members-import-table compontent
refs 4ee30dc5bd

- The tests were failing because there was no protective code to check for empty parameters.
2020-07-08 23:11:07 +12:00
Peter Zimon
6511a47524 Fixed tests
no refs.
2020-07-07 18:18:00 +02:00
Peter Zimon
1dd2a3db07 Updated styles for members import
no refs.
- added spinner to validation state
- applied styles to pre-validation step
- applied styles to import results
2020-07-07 17:53:59 +02:00
Rish
f8b2092f6c 🐛 Fixed nav item not saving updated value on keyboard save
no issue

- Fixes nav item values not saving on keyboard save shortcut
- Nav items value was only being updated in settings on focus out from text field.
- In case of keyboard save, focus out didn't happen so old value got saved and re-populated
- Change fixes to update setting value while typing
2020-07-07 14:47:10 +05:30
Nazar Gargol
39c4fec9ea Improved validation process for members CSV import
no issue

- A new validation stage has been introduced as a second step after CSV file has been dropped. It is meant to catch any obvious validation errors and output detailed statistics about
- These improvements also improve sampling logic which increases sample size to 30 non-empty cells which are used to validate stripe_customer_ids when there's such need.
- New sampling logic also introduces improved automatic field type detection which allows to better map email and stripe_customer_id fields to CSV columns
2020-07-07 00:28:30 +12:00
Nazar Gargol
e36b79c940 Added field mapping column to members importer gird
no issue

- Adds UI to map imported csv fields to ones accepted by Ghost API
- Includes automatic mapping detection for emails and stripe_customer_ids
2020-07-03 16:54:21 +12:00
Kevin Ansfield
8f8fcfc8bb Added UTC offset to scheduled editor status text
refs https://github.com/TryGhost/Ghost/issues/11965

- updated the `{{gh-format-post-time}}` helper that is used in editor status and in post settings menu email sub-menu for displaying email sent time
2020-07-01 20:37:46 +01:00
Kevin Ansfield
a6ebb928a9 Improved scheduled status text shown in editor
refs https://github.com/TryGhost/Ghost/issues/11965

- always show scheduled time when a post is scheduled
- show when a post will be emailed and to which group of members
2020-07-01 14:07:52 +01:00
Kevin Ansfield
6d55e46b73 Fixed gh-format-post-time tests
refs eacf8a72d8

- updated to reflect change of "x hours" display from <15mins to <12hrs
2020-07-01 13:33:25 +01:00
Nazar Gargol
08853fac2d Fixed member import test
refs 09f4a48bc5

- The copy was changed, test needed to be updated as well.
2020-07-01 17:46:50 +12:00
Kevin Ansfield
fcb9b87884 Renamed activeTimezone setting to timezone
refs https://github.com/TryGhost/Ghost/issues/10318

- API has been updated to still work with `active_timezone` for backwards compatibility but it makes sense for the client to match the underlying settings keys
2020-06-24 15:34:59 +01:00
Kevin Ansfield
8984c0ae32 Updated to fetch settings using /settings/?group= instead of ?type=
refs https://github.com/TryGhost/Ghost/issues/10318

- primary change is in the settings service which is the only place we fetch the settings endpoint
- mocked APIs and fixture data updated to expect and to filter on `?group` rather than `?type`
2020-06-24 14:23:51 +01:00
Kevin Ansfield
9348858bbe Added missing renames of settings groups
refs https://github.com/TryGhost/Ghost/issues/10318, 6d83c30f01

- the mocked settings endpoint was not returning any settings created with the old `blog` key which broke tests
2020-06-23 21:05:11 +01:00
Kevin Ansfield
eee84ab5f7 Added first pass bulk members delete confirmation and results display
no issue

- display a confirmation modal when bulk deleting members
- hit the `DELETE /members/?all=true` endpoint when confirming
- show counts of members deleted/skipped
- fix selection reset when leaving edit mode
2020-06-19 18:14:41 +01:00
Nazar Gargol
6aefc005f8 Removed email validation test from members import validator
refs 2dfff367b9

- The test was removed because feature is no longer needed.
- Qoute from Zimo: " reason: it’s based on a sample so we don’t know for sure how much of the data is actually affected. we might bring it back in the future though"
2020-06-19 14:20:56 +12:00
Nazar Gargol
29c1b2f18c Commented out broken test untill the case clears out
no issue

- Need to understand if email validation was removed from the client intentionally.
2020-06-19 00:10:30 +12:00
Nazar Gargol
f62554934d Fixed one of failing member import validation tests 2020-06-18 23:34:49 +12:00
Nazar Gargol
131fd8fe2c Fixed failing test
refs ed98d89771
2020-06-18 18:11:15 +12:00
Nazar Gargol
ed98d89771 Added imported members csv data preview
no issue

- Adds a table representation of data present in a CSV file that is about to be imported. Allows to navigate through data to see how exactly the file would be parsed on server
2020-06-18 17:47:04 +12:00
Kevin Ansfield
7331f8feed Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
Daniel Lockyer
282ce16d2c Fixed error message in tests
no issue
2020-06-16 22:06:11 +01:00
Nazar Gargol
fca6d3300d Renamed members import/export endpoints to match API changes
refs 5f00619d1a
2020-06-16 18:13:06 +12:00
Nazar Gargol
095e29d83d Added imported member count to the "Import" button
no issue

- When importing members from CSV file this change shows total amount of members that will attempt to be imported
2020-06-13 00:51:19 +12:00
Nazar Gargol
060b0e759b Fixed isStripeEnabled usage in import validator tests
refs c63a0e6826

- Reason for the fix same as in the referenced commit
2020-06-12 18:28:15 +12:00
Nazar Gargol
c3d141dd03 Added improved validations for 2nd step of members import
no issue

- Adds validations for imported CSV data
- These checks include obvious validation checks for data - like if email addresses are valid, checking if Stripe configured when entries with stripe_customer_id are present and additional server-side validation for entries with stripe_customer_id to check if they appear in connected Stripe account
- The validation set is calculated by naive choosing of first 5, middle 5 and 5 tail records from imported set. This logic comes from observations that errors usually apear withing "test" records in the beggining or the end of the file. These selection rules might change in the future if we find a need for it.
- Adds papaparse CSV parser, which was chosen for it's maturity and relatively small minified size. In the future this library should be lazy-loaded to make the first page load UX nicer
2020-06-12 17:22:36 +12:00
Kevin Ansfield
758f5285fb Added access level filter to posts and pages lists in admin
no issue

- adds `visibility` query param to posts and pages controllers/routes that is tied to the `filter` query param used in API requests
- adds dropdown for selecting post/page visibility to `<GhContentFilter>`
2020-06-09 12:19:40 +01:00
Kevin Ansfield
2942523d27 Removed ember-cli-chai in favour of direct ember-auto-import imports
no issue

- removes some deprecated babel plugins from our dependencies
2020-06-08 08:37:14 +01:00
Peter Zimon
8a88f31a91 Fixed test for member import dialog copy changes
no refs.
2020-06-05 15:41:00 +02:00
Nazar Gargol
6bfe8e6490 Added separate stage to members import popup with support of labels
refs 633ba27f0e

- Import modal is now devided into separate stages with ability to specify labels which will be assigned to every member present in the dataset.
- Also adds explicit "Import" button without automatic import when the CSV file is selected
2020-06-05 22:57:07 +12:00
Kevin Ansfield
45a8f6b609 Fixed tests
refs 142f322338

- updated tests to use `settings.shared_views` in place of `user.accessibility`
2020-06-04 21:43:54 +01:00
Rish
f198bb8a45 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
9942fb337e 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
18a910d2ab 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]
5e574946fb 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]
654d373655 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
8d96b2f610 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
5b17a70e8b 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
f26b27a44f Fixed publish menu tests
refs 9074181461

- 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
2e1fc80849 Fixed save test
no issue
2020-04-06 18:02:19 +05:30
Peter Zimon
4b5f538552 Updated notifications design (#1498)
no issue

- updating toaster design for better discoverability
2020-02-27 09:19:29 +00:00
Naz
ff4fd2fc9a 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
13d9611b4c 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
78e453c1b0 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
2a77c0fe51 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
1e77a4c915 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