Commit Graph

569 Commits

Author SHA1 Message Date
Kevin Ansfield c2f6d448fe Updated core files to match ember-cli new output 2020-08-03 09:24:58 +01:00
Kevin Ansfield dea7a3da03 Removed bulk member edit dev experiment
no issue

- we're moving forward with a simplified bulk delete and the UI would conflict if both approaches are behind the dev experiments flag
2020-07-23 15:03:18 +01:00
Kevin Ansfield b18d2b42df Removed errant .only from test suite 2020-07-22 20:00:03 +01:00
Nazar Gargol 72afe2dd02 Reenabled members importer tests
refs 8d3f4af03b

- Tests were temporary disabled to unblock the release.
- The solution for failing tests was adding a "waitFor" statement which allowed asyncronous CSV parsing to finish
2020-07-16 23:59:48 +12:00
Fabien 'egg' O'Carroll 7ef6b04282
🐛 Fixed email newsletter settings (#1641)
closes https://github.com/TryGhost/Ghost/issues/12052

* Added breaking test for mailgun settings

* 🐛 Fixed mailgun settings to always set a baseUrl

This matches the functionality seen before the bulk_email_settings were
split, where the baseUrl was set when any of the mailgun settings were.
2020-07-16 11:13:36 +02:00
Nazar Gargol 8d3f4af03b Removed developerExperiments flag from behind updated members importer
no issue

- Removes redesigned members importer features from behind `enableDeveloperExperiments` flag enabling it by default for everyone
- Had to disable some of the tests for future investigation to unblock the release
2020-07-13 23:55:07 +12:00
Peter Zimon e041d729db 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 fe5403ee17 Members import refinements
no refs.
- updated and removed copy on mapping screen
2020-07-09 14:42:29 +02:00
Peter Zimon ea2c900812 Refined members import modal
no refs.
- fixed title logic
- fixed stripe validation message
2020-07-09 12:12:53 +02:00
Nazar Gargol 06f66ecd0a Removed invalid and duplicate email validations in members importer 2020-07-09 17:55:40 +12:00
Peter Zimon b527579ad9 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 6961a9925c Fixed failure to render gh-members-import-table compontent
refs 0792062e5e

- 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 4bc09b7f06 Fixed tests
no refs.
2020-07-07 18:18:00 +02:00
Peter Zimon cf5ea204a8 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 b8484d4eb4 🐛 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 8a862d696b 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 ba34621564 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 0494869f86 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 1b09a946f4 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 09ce6fb980 Fixed gh-format-post-time tests
refs de345226f2

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

- The copy was changed, test needed to be updated as well.
2020-07-01 17:46:50 +12:00
Kevin Ansfield 3da8815759 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 c8a93925a3 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 8acc160003 Added missing renames of settings groups
refs https://github.com/TryGhost/Ghost/issues/10318, c5c50139ef

- 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 312b9fb4e1 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 7578e3fe95 Removed email validation test from members import validator
refs 823437c1a6

- 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 ac527ce89f 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 03ef0a22e0 Fixed one of failing member import validation tests 2020-06-18 23:34:49 +12:00
Nazar Gargol 6e97fbd995 Fixed failing test
refs b28a25a64e
2020-06-18 18:11:15 +12:00
Nazar Gargol b28a25a64e 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 a6fe448512 Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
Daniel Lockyer 84287b75f9 Fixed error message in tests
no issue
2020-06-16 22:06:11 +01:00
Nazar Gargol c666cbbed8 Renamed members import/export endpoints to match API changes
refs 5f00619d1a
2020-06-16 18:13:06 +12:00
Nazar Gargol ef59dbf74d 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 aac8f8f4a2 Fixed isStripeEnabled usage in import validator tests
refs 222d95233b

- Reason for the fix same as in the referenced commit
2020-06-12 18:28:15 +12:00
Nazar Gargol e9cae26ed4 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 24bf414cc3 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 28aa16f9a9 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 2eebd206b9 Fixed test for member import dialog copy changes
no refs.
2020-06-05 15:41:00 +02:00
Nazar Gargol 035d79d56f 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 db8b913e2d Fixed tests
refs 4a53587f3b

- updated tests to use `settings.shared_views` in place of `user.accessibility`
2020-06-04 21:43:54 +01:00
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