Commit Graph

8918 Commits

Author SHA1 Message Date
renovate[bot]
622711038a Update dependency @tryghost/members-csv to v1.2.8 (#2302)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-18 18:42:15 +00:00
renovate[bot]
98e6ed6b5e Update dependency @tryghost/timezone-data to v0.2.60 (#2301)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-18 18:42:03 +00:00
renovate[bot]
3245edf710 Update dependency @tryghost/color-utils to v0.1.12 (#2299)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-18 18:41:43 +00:00
Thibaut Patel
a47b61c1d4 Added canceled subscriptions in member detail screen (#2287)
refs https://github.com/TryGhost/Team/issues/1141

Showing canceled subscriptions provide a more complete picture of the activity of a member.

- Given there is no `member.product` object when a subscription is canceled, use the `member.subscriptions.price.product` objects instead of `member.products`.
- applied boy-scout rule for linter errors and and code formatting
- removed `multipleTiers` flag conditionals as it's now GA
- set up subscriptions as a separate mirage resource so they are easier to work with
    - updated `PUT /members/:id/` endpoint to match real API's complimentary subscription behaviour
    - modified mirage member serializer to match API output

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-03-18 16:15:42 +00:00
Daniel Lockyer
2fd52f009d v4.40.0 2022-03-18 16:00:40 +00:00
Kevin Ansfield
091ae194bf 🐛 Fixed duplicate email open rate column when filtering members by open rate
no issue

- email open rate is shown by default so we don't need to add the column a second time when the list is filtered by that data
- added `email_open_rate` to the default columns list so it's ignored when adding any filtered-by columns
2022-03-17 09:29:15 +00:00
Matt Hanley
b0bd691d52 Merged v4.39.1 into main
v4.39.1
2022-03-16 14:48:44 +00:00
Daniel Lockyer
d2eee5b7a5 v4.39.1 2022-03-16 14:47:02 +00:00
Kevin Ansfield
129d202595 🐛 Fixed slow loading and high memory usage of members list screen
refs https://github.com/TryGhost/Team/issues/1423

- problem:
  - all members requests were automatically adding `?include=email_recipients` as the email recipients relationship was set up to be always embedded
  - embedded email_recipient records also embed the whole email record
  - on the members index screen this meant for each of the 50 members loaded on a page we were also loading every email they have ever received resulting in a huge API response
  - this was not a problem previously because the API was ignoring the `include` parameter on the browse endpoint and Admin wasn't formatting the include properly in snake_case
- solution:
  - the only place we need associated email recipients is on the member details screen where they are used to show the email activity feed
  - removing the `{embedded: 'always'}` option for the `member.emailRecipients` association stops `?include=email_recipients` being added automatically to every members request
  - the member details screen explicitly adds `?include=email_recipients` so no further changes are needed
  - activity feed will be changing to use proper event objects in the future and further optimisation can be made
2022-03-16 14:33:56 +00:00
Peter Zimon
004a483bb1 Fixed unsplash icon positioning in design settings 2022-03-16 08:51:14 +01:00
Kevin Ansfield
fcb27507d3 🐛 Fixed slow loading and high memory usage of members list screen
refs https://github.com/TryGhost/Team/issues/1423

- problem:
  - all members requests were automatically adding `?include=email_recipients` as the email recipients relationship was set up to be always embedded
  - embedded email_recipient records also embed the whole email record
  - on the members index screen this meant for each of the 50 members loaded on a page we were also loading every email they have ever received resulting in a huge API response
  - this was not a problem previously because the API was ignoring the `include` parameter on the browse endpoint and Admin wasn't formatting the include properly in snake_case
- solution:
  - the only place we need associated email recipients is on the member details screen where they are used to show the email activity feed
  - removing the `{embedded: 'always'}` option for the `member.emailRecipients` association stops `?include=email_recipients` being added automatically to every members request
  - the member details screen explicitly adds `?include=email_recipients` so no further changes are needed
  - activity feed will be changing to use proper event objects in the future and further optimisation can be made
2022-03-15 18:26:24 +00:00
Peter Zimon
c4644ca7a9 Changed default offer display title 2022-03-15 12:31:27 +01:00
Kevin Ansfield
4e1f292c74 Revert "Removed unused modal files"
This reverts commit 1b4126b6f0.

- this was in error, `settings/members/archive-tier` wasn't a modal file
2022-03-14 12:38:39 +00:00
Kevin Ansfield
85d7932e45 Resolved deprecation warnings for dynamic modal component binding (#2303)
refs https://github.com/TryGhost/Team/issues/559
refs 054a5f15f5

- with the update of `ember-promise-modals` we started to get deprecation warnings when using `modals.open('modal-component-name')`
  - upcoming Ember build updates will introduce tree shaking but using run-time lookup of modal components by name works against that because it's not statically analysable
- switched to importing components and passing the component class directly, eg. `modals.open(ModalComponent)`
- standardized modal component class names with a `MyModal` style to get better behaviour in code editors when it auto generates imports
- dropped the modal defaults from the modals service because we can now use a static `modalOptions` property on the modal components themselves when we want to override the defaults
2022-03-14 10:52:04 +00:00
Kevin Ansfield
32658c25c2 Fixed linter errors in <ModalProduct> template
no issue

- dropped unnecessary/invalid nested `<form>` elements
2022-03-14 10:51:19 +00:00
Kevin Ansfield
7374b0f8c6 Fixed errors thrown in tests that were causing random failures
no issue

- dropped `id` attribute added to `<GhBenefitItem>` because it was only using the index resulting in multiple `id="1"` on the page which is invalid HTML and caused Glimmer to complain
- added a check for `portalPreviewIframe` existence when the portal message listener in the offer controller is fired because it was occurring out of sync with the tests and throwing async errors that were picked up in random later tests
2022-03-14 10:28:58 +00:00
Kevin Ansfield
0be1f206a5 Removed unused modal-custom-view-form.js file
no issue

- the `custom-view-form` modal has been migrated to the newer modal style but the original modal's component file wasn't cleaned up
2022-03-14 10:00:40 +00:00
Kevin Ansfield
1b4126b6f0 Removed unused modal files
no issue

- we had two archive-tier modals with the version living in `modals/tiers/archive` being the only one used
2022-03-14 09:46:49 +00:00
Kevin Ansfield
4d8c12d2b8 Fixed sticky URL when using Escape to close view theme modal
no issue

- we were missing handling for the view-theme modal being closed outside of a route transition meaning the URL would stay on `/settings/design/view-theme/Theme` even though it's the index that was shown, preventing the same theme being viewable again and back/forward behaving as expected
2022-03-11 19:14:16 +00:00
Kevin Ansfield
4db4233b87 Fixed integration edit page not showing after creating new integration
refs 054a5f15f5

- `beforeClose` behaviour has changed slightly with the upgraded ember-promise-modals
- added a guard for the modal existing when transitioning back to the integrations index screen, this makes sure we're not transitioning back to the index screen after the modal has already initiated a transition to the integration edit screen
2022-03-11 19:10:44 +00:00
Kevin Ansfield
054a5f15f5 🐛 Fixed scheduled date/time inputs not being focusable when used from post preview modal
closes https://github.com/TryGhost/Ghost/issues/14296

- bumped fork of `ember-promise-modals` as newer version exposes all focus-trap options and per-modal disabling
- disabled focus-trap for the post preview modal because it was preventing clicks on the input elements performing default behaviour
2022-03-11 17:58:20 +00:00
Daniel Lockyer
042538ba2d v4.39.0 2022-03-11 16:00:27 +00:00
Rishabh Garg
6c6447ef4f Removed multiple tiers beta section (#2298)
refs https://github.com/TryGhost/Team/issues/1267

Multiple tiers is now available for all sites by default, so there is no need anymore for the beta section to enable it.
2022-03-11 20:14:47 +05:30
Sanne de Vries
bb7b388465 Fixed test 2022-03-11 12:52:30 +00:00
Sanne de Vries
b530df1e39 Directed selfhosters to 'done' screen after setup 2022-03-11 12:42:06 +00:00
Kevin Ansfield
134cd17649 Fixed flash of "No members" state when opening publish menu
no issue

- removed the count task state from the `disableEmailOption` getter so it doesn't get used to show the "Add members" notification before the count request has finished
2022-03-11 11:35:39 +00:00
Kevin Ansfield
bc5ddd9921 Resolved linter errors in <GhMembersRecipientSelect>
no issue

- fixed duplicate `id` attribute on the specific people checkbox
- switched toggle behaviour from a click event on the surrounding div to a change event on the checkbox
  - the surrounding `<label>` has appropriate `for` attribute so it acts as the click-to-change target
- added `aria-label` attributes to the checkboxes because the label element we're using does not surround any content that labels the checkbox
2022-03-11 11:06:13 +00:00
Kevin Ansfield
f0418266f4 🐛 Fixed "Must be in the past" error when closing and re-opening publish menu whilst scheduling
closes https://github.com/TryGhost/Team/issues/1399

- the publish/schedule save type was not being reset when closing the publish menu, even though the underlying post publish date _was_ reset leading to the publish menu and the post state being out of sync
- added a reset of the save type when closing the menu, this means "schedule" will need to be re-selected when re-opening the menu but that follows the same behaviour as the reset of the publish menu options
2022-03-11 10:13:08 +00:00
Sanne de Vries
118e5b40ca Fixed subtitle alignment issue on setup 2022-03-10 22:00:42 +00:00
Kevin Ansfield
b373109b16 Updated members bulk-delete test for change of default filter
refs 79afb5fc9c
refs 652fc883d7

- test was set up expecting "Label" to be the default filter shown when opening the members filter UI but it's been changed to "Name" which is no longer behind a labs flag
2022-03-10 17:05:15 +00:00
Kevin Ansfield
79afb5fc9c Added "Name" and "Email" filters to members screen
closes https://github.com/TryGhost/Team/issues/1408
closes https://github.com/TryGhost/Team/issues/1409

- adds new text-based filters that match against member names and emails that allows more specific filtering than search
  - new filter operators introduced for "contains", "does not contain", "starts with", and "ends with"
2022-03-10 16:45:24 +00:00
James Morris
a5002e8765 Increased size of members filters to better include all choices
refs: https://github.com/TryGhost/Team/issues/1418
2022-03-10 16:19:31 +00:00
Kevin Ansfield
e6b02fb416 Deleted unused get-started modal code
refs https://github.com/TryGhost/Team/issues/1412

- we've switched to a full "done" page instead so the now-unused modal and related styling can be cleaned up
2022-03-10 16:13:50 +00:00
James Morris
4ec15f7323 Tweaked visual things for polish with Activity
refs: https://github.com/TryGhost/Team/issues/1373

- Simplify the member details link on single member activity
- Adjust all the activity scrolling to work better at all sizes
- Make the header work properly with truncating at narrower viewports
- Remove unnecessary CSS and classes
- Remove the top line from the member detail box
- Move the member detail box so it stays when scrolling
- Make the empty state work with new member detail box position
- Better scrolling full width whilst not having full width like members
- Fix the subscriptions event icon which was a white box in dark mode
- Adjustments to global gh-list-scrolling styles at narrower viewports
- Test fully on narrower viewports and major browsers
2022-03-10 15:24:38 +00:00
Kevin Ansfield
12729bb469 Improved authentication timing in setup flow
https://github.com/TryGhost/Admin/pull/2286

- `session.authenticate()` returns from it's promise as soon as the authenticate request is completed but it was assumed that it returned after the `session.handleAuthentication()` promise was also completed. A side-effect of that was that depending on network timing, the setup flow could transition to the dashboard before we had loaded all of the necessary user, config, and settings requests
  - normally that's not a problem because `handleAuthentication()` kicks off a transition once authentication is fully complete, in the setup flow we're handling the transition manually so need a way to manage the full async flow from outside of the session service
  - it didn't show up as a problem previously because the setup flow transitioned to a third setup screen that didn't require all of the post-auth data to exist
- moved the async parts of `session.handleAuthentication()` into a task and updated to return the currently running task instance if one was already running
  - lets code that is relying on the full authentication flow to have completed call `await this.session.handleAuthentication()` without causing a double-load of the post-auth API requests
- updated setup flow
  - removed manual `session.populateUser()` call as that was a workaround for the async timing issue and caused a double-fetch of the current user API endpoint
  - added an `await this.session.handleAuthentication()` call to the manual post-auth handler so we don't transition until the full auth flow is complete
2022-03-10 11:53:37 +00:00
James Morris
b8f5fad9fe Updated the copy for All Done screen
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-10 11:50:35 +00:00
Kevin Ansfield
7f3976868f Updated .lint-todo file 2022-03-09 17:32:14 +00:00
James Morris
ae1ead69e4 Fixed a hbs linting problem with the Clear Member button
no issue
2022-03-09 17:25:59 +00:00
James Morris
e0f1271a31 Reduced Activity on Dashboard down to 5 from 10
refs: https://github.com/TryGhost/Team/issues/1373

- reduced from 10 to 5 to keep things visually simpler
- sneaked in a little colour tweak to link on activity member detail header
2022-03-09 17:17:47 +00:00
James Morris
ae9f4a4ac8 Tweaked to slightly improve empty filters on Activity
refs: https://github.com/TryGhost/Team/issues/1373

- nothing much here, just changing where the member detail header renders on activity
- added a little padding to empty states to better vertically center
2022-03-09 17:07:01 +00:00
James Morris
a26ca9bec6 Added some tweaks to Members Detail link for Activity
refs: https://github.com/TryGhost/Team/issues/1373

- changed searched name clear to say Clear Member as there was duplicates across the screen
- tried to tidy up the Member Detail link when filtered by members in Activity
- few tiny CSS tweaks
2022-03-09 16:59:55 +00:00
Kevin Ansfield
652fc883d7 Changed default member filter to "Name is"
refs https://github.com/TryGhost/Team/issues/1408

- "Name" is the first filter in the list and has a basic value type so it makes sense to make it the default compared to label
2022-03-09 16:52:51 +00:00
Kevin Ansfield
af08f050d3 Added "Email" members filter
refs https://github.com/TryGhost/Team/issues/1409

- added filter property definition using the same "contains" operators and parsing supported added for the "Name" filter
2022-03-09 16:05:28 +00:00
James Morris
b6426e5a00 Cleaned up members activity flow between that and details
refs: https://github.com/TryGhost/Team/issues/1373
2022-03-09 15:02:36 +00:00
James Morris
f245b56f7a Updated loading state for Activity to be full height
refs: https://github.com/TryGhost/Team/issues/1373
2022-03-09 12:31:04 +00:00
James Morris
a11e4464a3 Update subscription event icon to be more generic
refs: https://github.com/TryGhost/Team/issues/1373
2022-03-09 12:31:04 +00:00
Sanne de Vries
7671ca4364 Fixed linter error 2022-03-09 12:24:36 +00:00
Sanne de Vries
00a6645a00 Added site brand color to signup button for new staff users 2022-03-09 11:53:54 +00:00
James Morris
28ecb820bc Tweaked some copy on All Done page to make a little more sense
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-09 11:23:49 +00:00
Rishabh
8800739401 Removed feature flags for small tiers beta features
Tiers will soon go to GA, and these small features that were added as part of tiers beta are now ready to go live as well along with tiers GA, so we are removing their flags and bumping them as part of tiers beta.
2022-03-09 16:17:53 +05:30
renovate[bot]
378c83145c Update dependency @tryghost/color-utils to v0.1.10 (#2292)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-09 09:26:28 +00:00
Daniel Lockyer
0742e32fd2 Merged v4.38.1 into main
v4.38.1
2022-03-09 09:02:21 +00:00
Daniel Lockyer
bdc86dc265 v4.38.1 2022-03-09 08:59:59 +00:00
Rishabh
5b09720f1f Fixed lint 2022-03-09 14:21:16 +05:30
Rishabh
052a716d5d Removed member count from tier visibility segment
The segment select UI for restricting post access to specific tier also showed a member count for selected tiers, which was not needed as that count is dynamic and not relevant for setting access level.
2022-03-09 14:21:16 +05:30
Rishabh
987ec3f742 Added status/tier as default column for members index table
refs https://github.com/TryGhost/Team/issues/1035

- provides context on member's tier/status on default index table
- removes extra membership tier column as information is captured in status column
2022-03-09 14:21:16 +05:30
Rishabh
82d6d38b3f Fixed tier archive not updating portal preview
The tier visibility is now handled by visibility property on object, this change ensures portal preview is updated on a tier archive to show the correct Portal UI.
2022-03-09 14:21:16 +05:30
Kevin Ansfield
f65437b14c Added "Name" members filter (#2289)
refs https://github.com/TryGhost/Team/issues/1408

- switched to `@tryghost/nql` packages to get access to latest releases
- updated `GET /members` mirage endpoint with a try/catch and explicit logging to make any errors from NQL more visible
- added "Name" filter option
  - has `is`, `contains`, `does not contain`, `starts with`, `ends with` operators
  - uses a plain text field for the input value
- added support for `~`, `-~`, `~^`, and `~$` operators when generating NQL queries from filter definitions
2022-03-08 21:30:20 +00:00
Sanne de Vries
59fb35592d Updated error copy on setup page 2022-03-08 20:23:55 +00:00
Kevin Ansfield
3a9ea11213 Added "Last seen" filter to members screen
refs https://github.com/TryGhost/Team/issues/1418

- adds "Last seen" option to members filtering that lets you filter by date a member last logged in or opened an email with `before`, `on or before`, `on or after`, and `after` options
- adds "Last seen on x" data to the member details screen
2022-03-08 20:21:49 +00:00
Kevin Ansfield
4562476d4e Switched "Last seen" filter back to standard datepicker without shortcuts (#2296)
refs https://github.com/TryGhost/Team/issues/1418

- drops the block usage of `<GhDatePicker>` for the "Last seen" input that added shortcut buttons
  - not a full revert of https://github.com/TryGhost/Admin/pull/2291 as allowing block usage of the component is still useful for other component customisation
- removes CSS related to the calendar-with-shortcut buttons as we don't have any other use-cases for it at the moment
2022-03-08 20:13:33 +00:00
Kevin Ansfield
10ff54151f Fixed linter error for unused variable in dashboard-test.js 2022-03-08 19:23:03 +00:00
Kevin Ansfield
9fbb63cf41 Updated dashboard acceptance tests for latest member graphs/resources box behaviour
refs https://github.com/TryGhost/Team/issues/1376

- adjusted tests so they are in sync with expected dashboard behaviour
- removed `dashboardHideGettingStarted` feature and it's usage in the `showMembersGraphs` property as there's no longer a resource box to dismiss
2022-03-08 19:20:12 +00:00
Kevin Ansfield
3d8b06847b Cleaned up members filter nql parsing/generation
refs https://github.com/TryGhost/Team/issues/1419

- small cleanups to remove unnecessary duplication
2022-03-08 19:07:46 +00:00
James Morris
3571c79fd5 Updated tests to remove the Resources Banner from Dashboard
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-08 19:04:11 +00:00
James Morris
2eba17fb9c Removed the Resources Banner from the Dashboard for improved onboarding
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-08 18:37:17 +00:00
Sanne de Vries
3ae3e8142a 🎨 Redesigned user authentication pages (#2286)
Refs https://www.notion.so/ghost/Invite-staff-users-steps-in-setup-guide-367737e13d97450a98a0f39ec6b68181

* Simplified the selfhoster setup flow to one setup page only
* Redesigned the reset password pages and the signup page for new staff members

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2022-03-08 17:30:46 +00:00
Kevin Ansfield
e46a406645 Fixed timezone handling for "on or before" date member filters
no issue

- `settings.get('timezone')` had a typo in the "on or before" nql filter generation meaning the date wasn't correctly converted to the site timezone when applying the filter
2022-03-08 17:19:44 +00:00
James Morris
fa257c3fe9 Updated the customise your site link in all done to go to settings instead
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-08 16:01:55 +00:00
Peter Zimon
de1a9abe76 Fixed linter error 2022-03-08 16:47:40 +01:00
Peter Zimon
2efc7768a8 Fixed portal tiers settings margin 2022-03-08 16:40:41 +01:00
Kevin Ansfield
00991f28c9 Removed unnecessary filterType arguments in members filter value updating actions
refs https://github.com/TryGhost/Team/issues/1419

- the `filterType` argument was never used and if it is needed the full filter instance is passed around which has the `.type` property on it anyway
- dropped the `setFilterValue` action inside `<Members::FilterValue>` component as it was only calling the passed-in action with the same arguments
- makes the code a little less noisy and easier to follow
2022-03-08 15:17:00 +00:00
Kevin Ansfield
d73e9f7cfd Added array valueType to reduce members filter code duplication
refs https://github.com/TryGhost/Team/issues/1419

- continued cleanup of filtering code
  - added `array` as a `valueType` for member filters removing the need for duplicated NQL generation code between `label` and `product` filters
  - cleaned up duplicated relation string/operator handling
2022-03-08 14:43:10 +00:00
Kevin Ansfield
789d5b9395 Removed need for filter.id in members filtering
refs https://github.com/TryGhost/Team/issues/1419

- the `id` property isn't necessary for any of our use-cases and adds extra complexity to the code as we need to keep track of it and apply+increment it manually each time we work with filter instances
  - dropped the property
  - switched actions to pass the Filter instance rather than just the id so we can do direct compares when working on the filters array and modify properties on the Filter instance directly
- part of cleanup to reduce the amount of code/complexity in filtering so we can more easily refactor
2022-03-08 14:18:23 +00:00
James Morris
9bfc542400 Improved all done onboarding page to work better at smaller viewports
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-08 12:17:01 +00:00
Kevin Ansfield
c4c48d4104 Resolved ember-cli-mirage import deprecations
refs https://github.com/TryGhost/Admin/pull/2209

- `miragejs` has been extracted to a framework-independent library, the re-exports of `miragejs` elements in `ember-cli-mirage` have been deprecated making our test logs very noisy
- added `miragejs` as a top-level dependency
- updated all relevant imports to pull from `miragejs` instead of `ember-cli-mirage`
2022-03-08 11:32:01 +00:00
Peter Zimon
096153b9f9 Removed selectable portal settings flag 2022-03-08 11:53:19 +01:00
renovate[bot]
280be27103 Update dependency @tryghost/helpers to v1.1.59 (#2293)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-08 10:38:09 +00:00
renovate[bot]
8990ac753f Update dependency @tryghost/timezone-data to v0.2.58 (#2294)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-08 10:37:45 +00:00
Rishabh
e9e6db74e5 Updated mirage with new tier visibility property
refs https://github.com/TryGhost/Team/issues/1387
2022-03-08 15:51:40 +05:30
Rishabh
12944a4c91 Removed usage of portal products setting
refs https://github.com/TryGhost/Team/issues/1387

Tier visibility is now managed by `visibility` property, and we'll be removing the `portal_products` setting in future.
2022-03-08 15:50:21 +05:30
Kevin Ansfield
45a6286a64 🐛 Fixed Casper preview in theme directory showing an older version
no issue

- latest casper demo lives at https://demo.ghost.io
2022-03-08 09:49:52 +00:00
Rishabh
12c840787c Added default visibility to new tiers
refs https://github.com/TryGhost/Team/issues/1387

- adds default visibility as `none` for new tiers
2022-03-08 14:20:24 +05:30
Rishabh Garg
3e4e9d731b Added tier visibility handling from portal settings (#2295)
refs https://github.com/TryGhost/Team/issues/1387

This will allow us to move from the portal_products and portal_plans settings to using the visibility property on tiers to determine whether or not a tier should be visible in Portal. This updates admin to handle tier visibility property based on changes in settings. Old portal settings update is temporarily kept in though will not be used for determining visibility going forward. Also removes default product visibility being set on stripe connect.
2022-03-08 13:00:31 +05:30
Naz
74735ab59c Fixed the name of the version header
refs e23ae31e8f
refs https://github.com/TryGhost/Toolbox/issues/222

- In the referenced commit there was a mixup with the header naming used on the client. It should have been `Accept-Version` to start with. The `Content-Version` header will be returned from the server once there is logic attached to `Accept-Version` header processing
2022-03-08 11:36:46 +08:00
Peter Zimon
f29f723381 Fixed linter error 2022-03-07 18:55:04 +01:00
James Morris
539aa5af68 Added additional styling to next buttons on all done screen
refs: https://github.com/TryGhost/Team/issues/1376

- added borders to the buttons based on feedback
- increased sidebar width size based on feedback
2022-03-07 17:02:42 +00:00
Peter Zimon
581f1abeea Updated powered by badge in email settings 2022-03-07 17:35:27 +01:00
Peter Zimon
c41c72aeb4 Updated help and support links in account menu 2022-03-07 16:56:15 +01:00
Sanne de Vries
6e4229fb09 Fixed dashboard "get started" CTA's alignment issue 2022-03-07 15:09:06 +00:00
Kevin Ansfield
696fca0f9e Hid members graphs in dashboard until get-started block dismissed or members added
refs https://github.com/TryGhost/Team/issues/1406

- added fetch of a single member to the dashboard initialisation if we don't already have some members loaded in memory
- added `showMembersGraphs` getter used in the conditional for rendering the members graphs block component
  - if `improvedOnboarding` flag is disabled, return `showMemberData` so existing functionality is retained
  - will return `false` if until the single-member fetch has completed if we don't already have any members in memory
  - returns `true` if any members exist or the "get started" dashboard resources block has been dismissed
2022-03-07 13:26:52 +00:00
Kevin Ansfield
b5992de5ea Extracted dashboard members graphs block to a component
refs https://github.com/TryGhost/Team/issues/1406

- separates concerns from the Dashboard controller so it's easier to refactor and change behaviour
- pre-req for introducing optional display of the graphs based on wider system status in a clean way
2022-03-07 12:33:51 +00:00
Kevin Ansfield
8787fc82de Reset linter todos
no issue

- the majority of our ignored linter problems had transitioned to warnings but we haven't yet reached a point where that is useful
- deleted and recreated the `.lint-todo` file to give us another 30 days to perform any automated cleanup
2022-03-07 12:21:57 +00:00
Kevin Ansfield
e10c045947 Resolved linter errors in members-activity.hbs 2022-03-07 12:21:57 +00:00
Rishabh
3c497bfc95 Refined tiers filter on member detail screen
refs https://github.com/TryGhost/Team/issues/1029

- updates label for tier filter
- moves tier filter to subscription group
2022-03-07 17:37:50 +05:30
renovate[bot]
70158d41e9 Update dependency ember-simple-auth to v4.2.0 (#2260)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 11:08:20 +00:00
renovate[bot]
0e20c97b56 Update dependency ember-cli-mirage to v2.4.0 (#2209)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 11:07:27 +00:00
renovate[bot]
10d108eac4 Update dependency @tryghost/members-csv to v1.2.6 (#2262)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 11:03:40 +00:00
renovate[bot]
553b74478d Update dependency @tryghost/helpers to v1.1.58 (#2276)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 10:07:18 +00:00
renovate[bot]
719d8e891d Update dependency @tryghost/timezone-data to v0.2.57 (#2278)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 10:07:07 +00:00
Kevin Ansfield
4aa9d4554e Dropped ember-useragent dependency
no issue

We made very limited use of the `ua-parser-js` sub-dependency that `ember-useragent` pulls in so it didn't seem worth having the fairly large 17KB import or the associated sub-dependency version resolutions.

- switched the two iOS and Safari detections to use associated Regexes on `navigator.userAgent`
- dropped the "Microsoft Edge not supported" message in the editor
  - old Edge is still not supported but it was been replaced with a Chromium-based version that is supported a while back
  - we can re-introduce a warning if we get any significant reports (there is nothing showing in Sentry for this alert in the last 14 days)
2022-03-07 10:06:35 +00:00
renovate[bot]
20be395077 Update dependency ember-useragent to v0.12.0 (#2283)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 09:13:12 +00:00
renovate[bot]
a159a69517 Update dependency @tryghost/limit-service to v1.0.10 (#2281)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 09:12:35 +00:00
renovate[bot]
e22ad6ce91 Update dependency @tryghost/string to v0.1.23 (#2277)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 09:12:07 +00:00
renovate[bot]
bba6427c40 Update dependency @tryghost/color-utils to v0.1.9 (#2275)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 09:11:52 +00:00
renovate[bot]
f74b8efa63 Update dependency fs-extra to v10.0.1 (#2273)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 09:11:37 +00:00
Kevin Ansfield
020cd75369 Added shortcut buttons to "Last seen" members filter datepicker (#2291)
refs https://github.com/TryGhost/Team/issues/1410

- added block invocation support to `<GhDatePicker>` that exposes the calendar components used inside the datepicker dropdown allowing for customisation of the dropdown content
- updated "last seen" datepicker to use the block invocation support to add buttons that select typical "time ago" dates

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-03-04 17:09:28 +00:00
Kevin Ansfield
17710c3e8e Switched members table to show info from most-recently-updated subscription instead of first in array
no issue

- members having multiple subscriptions is not really expected but if it does happen then the most recently updated subscription is most likely to be the one that we're interested in showing the details of in the members table
- added `{{most-recently-updated arr}}` helper+function that will return the item in the array argument with the most recent "updated at" value
  - uses `updatedAtUTC` or `updatedAt` or `updated_at` values so it will work against any of our models or un-transformed API response objects
- updated `<GhMembersListItemColumn>` to use a `mostRecentSubscription` getter when showing subscription data rather than assuming the first object in the subscriptions array should be displayed
2022-03-04 16:32:41 +00:00
Daniel Lockyer
f52fcbd3be v4.38.0 2022-03-04 16:00:26 +00:00
Simon Backx
4a8c680f59 🐛 Remove empty benefits before saving (#2284)
refs https://github.com/TryGhost/Team/issues/1188

- The api throws a validation error when we try to add benefits with an empty name
- Before saving, we remove benefits with an empty name
- Added test for empty benefit names
2022-03-04 17:00:09 +01:00
Kevin Ansfield
1f062ff844 Switched "Last seen" filter to standard date picker filter
refs https://github.com/TryGhost/Team/issues/1410

- we have problems translating an "x days ago" NQL filter back to the UI component so as a temporary measure we're switching to a datepicker input as we have a working solution for that
- a later iteration will add shortcut buttons for selecting typical "x days ago" dates in the datepicker
2022-03-04 13:55:32 +00:00
Naz
e23ae31e8f Added Content-Version header
refs https://github.com/TryGhost/Toolbox/issues/222

- Without Admin API versioning through URL, Content-Versioning header will be the best way to suggest an expected version of the resource (formatting). Having this header in place should minimize the ammount of breaking changes and would allow for the server to respond accordingly for a particular client version
2022-03-04 20:24:17 +07:00
Naz
2b7fbb2da6 Moved default Admin API address to versionless
refs https://github.com/TryGhost/Toolbox/issues/222

- Admin API has the latest version alliased without a verion to prepare to the switch in  Ghost v5. As we completely control Ghost Admin it makes sense to dogfood our latest changes
- Starting with Ghost v5 there will be no API versioning in the URL, this is groundwork for those new realities
2022-03-04 20:22:03 +07:00
Kevin Ansfield
e4fb2ca19a Added "Created", "Paid start date", and "Next billing date" date-based filters to members list screen (#2290)
no issue

- allows for filtering members by additional fields using a date picker with `before`, `on or before`, `after`, and `on or after` queries
2022-03-04 12:10:35 +00:00
Kevin Ansfield
56029ff096 Added membersContainsFilters feature flag
refs https://github.com/TryGhost/Team/issues/1408

- flag for gating access to "Name" and "Email" members filters that use NQL's contains operators
2022-03-04 11:17:17 +00:00
Kevin Ansfield
dd258faafb Updated members filter datepicker error messages
no issue

- shortened invalid date format error message in `<GhDatePicker>` to "Date must be YYYY-MM-DD" so it's less likely to wrap
- added `@maxDateError` and `@minDateError` arguments to `<GhDatePicker>` allowing override of the default "Must be on or before xxxx-xx-xx" message shown when the inputted date is outside of the allowed range
- updated `<GhDatePicker>` usage in the "Created" member filter to use "Must be in the past" error message when a future date is selected
2022-03-04 09:32:59 +00:00
Rishabh Garg
d16a8781a9 🐛 Fixed sending non-integer prices to tiers api (#2288)
closes https://github.com/TryGhost/Team/issues/1319

Due to how JS implements numbers, it's possible that when we multiple a number with 2 decimal places by 100 that we do not end up with an integer e.g. 9.95 * 100 = 994.999...

This is not a valid price for the API and so we must round it to the nearest integer. We round off prices both at source as well as in ties serializer to make sure we never send non integer prices to API.
2022-03-04 14:48:45 +05:30
Kevin Ansfield
f1490782ca Changed "Start date" to "Paid start date" in members filter dropdown
no issue

- clearer name and matches table column header
2022-03-03 23:17:02 +00:00
Kevin Ansfield
b46bec1354 Added "Next billing date" members filter
no issue

- added datepicker based filter for the next billing date of paid subscriptions
- updated table to add "Next billing date" column when filtered, showing the paid subscription's current period end date
2022-03-03 22:43:50 +00:00
Kevin Ansfield
35a7cbf3d2 Removed unused import causing linter error 2022-03-03 21:56:03 +00:00
Kevin Ansfield
bee16a023d Fixed Firefox not respecting default selected operator when changing filter type
no issue

- if `<option>` elements are re-rendered without the parent `<select>` being re-rendered, Firefox does not pick up the new `selected` option
  - we were seeing this behaviour when the options in an operator select get updated after changing the filter type, Firefox was always selecting the first option rather than the "selected" option
- switched the `filters` array from an EmberArray instance over to a tracked built in Array instance and changed the "edit" behaviour when changing a filter type so we fully replace a `Filter` instance in the filters array with a new instance which causes an overall re-render of that filter row avoiding the Firefox issue
2022-03-03 21:53:33 +00:00
Kevin Ansfield
b392bdfc0e Fixed "Last seen at" table data not respecting site timezone
no issue

- wrapped the date shown in the table column with the `{{moment-site-tz}}` helper so it's adjusted to show the site-local date
2022-03-03 19:39:37 +00:00
Kevin Ansfield
ee8b9452a5 Added "Subscription start date" members filter
no issue

- added datepicker based filter for the start date of paid subscriptions
- updated table to add "Start date" column when filtered, showing the paid subscription's start date
2022-03-03 19:38:28 +00:00
Kevin Ansfield
d0763531f5 Changed default date filter operator to "on or before"
no issue

- prevents automatically filtering out all of today's members as soon as a "Created" filter is added as happened when the default was "before"
2022-03-03 19:14:33 +00:00
Kevin Ansfield
ff1c603585 Fixed initial "Create" member filter date not always matching "today" in site timezone
no issue

- updated default date filter values so they match the date in the site timezone rather than local timezone
  - fixes problems such as defaulting to 2022-03-01 when you're in UTC@4AM but the current date in the site timezone of UTC-5 at that time is 2022-02-28
2022-03-03 18:52:06 +00:00
Kevin Ansfield
7470f887cb Updated "Created" member filter to work against site timezone instead of UTC
no issue

- updated NQL generation to adjust dates in filter string so they are the UTC equivalent
  - eg, in UTC-5 "created on or after 2022-02-22" becomes `created_at:>='2022-02-22 05:00:00'`
- updated NQL parsing to take a UTC date filter, convert to a date in the site timezone, then convert to a local date in a way that the datepicker input value matches the respective site timezone date
  - eg, in UTC-5 `created_at:<='2022-02-22 04:59:59` becomes "created on or before 2022-02-21"
2022-03-03 18:17:14 +00:00
Kevin Ansfield
443689ffb3 Removed errant console.log 2022-03-03 16:17:37 +00:00
Kevin Ansfield
067f8d667f 🐛 Fixed members table showing dates in UTC rather than site timezone
closes https://github.com/TryGhost/Ghost/issues/13611

- added `{{moment-site-tz}}` helper for transforming any date into the selected site's timezone
  - allows for use on any date in the system
  - keeps transformation a display-level concern
- updated members table to use `{{moment-site-tz}}` to transform the date before display
2022-03-03 16:16:46 +00:00
James Morris
6ecbe64cac Style and copy tweaks to the Add Done page
refs: https://github.com/TryGhost/Team/issues/1376

- adjust line heights for paragraphs
- vertical align content
- added subheader for actions
- added import members link
- updated action for customise site
2022-03-03 11:39:56 +00:00
Sanne de Vries
192b22b92d Added link to support email field in email settings 2022-03-03 12:33:50 +01:00
James Morris
23f8770a62 Adjust remove filter placement and changed Created At to Created
no issue

- gave remove same height as select boxes so it doesn't move when errors appear
- changed filter name to created for better readability
2022-03-03 10:26:44 +00:00
Djordje Vlaisavljevic
59e5f8026f Fixed CSS for flex 2022-03-03 11:19:34 +01:00
Kevin Ansfield
20329c4d81 Fixed invalid NQL syntax when using "created on or after" filter
no issue

- the "on or after" filter generation was missing the trailing quote around the date literal causing an "Error parsing filter" error
2022-03-03 10:11:16 +00:00
Peter Zimon
8734143516 Added max height to membership settings form 2022-03-03 11:01:40 +01:00
Sanne de Vries
25475e9a51 Fixed linting error 2022-03-03 10:52:05 +01:00
Sanne de Vries
969cef0838 Updated portal settings Stripe Connect CTA 2022-03-03 10:34:16 +01:00
Kevin Ansfield
a8b0faf9ea Fixed Firefox losing filter type selection after opening filters list
refs https://github.com/TryGhost/Admin/pull/2274

- every time the filters UI was opened we were fetching the products list from the API which seemed wasteful and was also causing the filter type select to re-render after it had initially rendered with a selected value
- Firefox appears to have a bug where if a select's `<options>` list is re-rendered and that list contains `<optgroup>` elements then it loses the previous select value, reverting to the first `<option>` in the list
- switched to only fetching the products list once when the overall filter component is first rendered and used `peekAll('product')` so we always have a live count of the number of products in Ember Data's store without having to fetch anything
2022-03-03 00:23:06 +00:00
Kevin Ansfield
89f9516f04 Added "created at" members filters
refs https://github.com/TryGhost/Team/issues/1390

- added `membersTimeFilters` feature flag and labs toggle
- added `<GhDatePicker>` component that lifts functionality from the `<GhDateTimePicker>` component
  - `<GhDateTimePicker>` has not yet been refactored to use the new component internally as there are some odd/complex interactions with error handling with it's existing use-cases and they are in critical publishing paths so the refactor doesn't belong as part of this change
- added "Created at" filter type to members filters
  - uses new date picker component for input value
  - has "before", "on or before", "after", "on or after" operators
  - "on" and "not on" operators were skipped as they require two NQL statements to represent, breaking the current 1:1 statement:filter approach used in the NQL-based query param parsing
2022-03-02 21:59:48 +00:00
James Morris
9bee294314 Removed test case for Finishing Touches button that doesn't exist anymore to stop tests failing
no issue
2022-03-02 13:36:18 +00:00
James Morris
bf676ddfb0 Renamed Finishing Touches onboarding step to Done with other changes and styling tweaks
refs: https://github.com/TryGhost/Team/issues/1376

- renamed finishing touches file to done
- no last modal, just the done screen for first start
- added options for next steps
2022-03-02 12:46:15 +00:00
Peter Zimon
5373234766 Refined finishing touches screen UI 2022-03-02 12:46:15 +00:00
Peter Zimon
d1c8d4a1db Removed opening 'Get started' modal 2022-03-02 12:46:15 +00:00
Peter Zimon
648838c2f1 Added dyamic theme properties on onboarding finish screen 2022-03-02 12:46:15 +00:00
Sanne de Vries
f6f25fabe6 Fixed Stripe disconnect modal copy in test mode 2022-03-02 13:07:08 +01:00
Djordje Vlaisavljevic
c38111aa5c Fixed alignment of plus button in error state 2022-03-02 11:58:33 +01:00
Djordje Vlaisavljevic
c9cdb6cb1e Made empty state text lighter
refs https://github.com/TryGhost/Team/issues/1252
2022-03-01 20:16:01 +01:00
Sanne de Vries
8fe2144183 Fixed header alignment responsive issue on members page 2022-03-01 19:48:28 +01:00
Sanne de Vries
1306921cac 🎨 Updated Member page layout (#2271)
No issue

- Changed the Member details page to be more scalable and flexible, depending on whether creators are using subscriptions, emails, and stats.

* Hidden email stats on member detail page when subscriptions are off
* Hid subscription box on member details page when Stripe is not connected
* Updated copy and layout of member details page
* Updated old activity feed styles on member page
* Fixed padding issue for empty activity feed
* Fixed current and new activity feed
* Added Last seen to member details page behind feature flag
* Updated lint todo file
* Fixed spacing issue in member details
2022-03-01 15:57:57 +01:00
Djordje Vlaisavljevic
fd533bebec Switched remaining divs to input fields
refs https://github.com/TryGhost/Team/issues/1096
2022-03-01 13:09:41 +01:00
Kevin Ansfield
0f9e851ad9 Fixed activity feed on new member screen showing all events
no issue

- a new member has no `id` but we were passing the empty value through to the members event fetcher resulting in a query that fetches all events
- extracted the empty state of the member activity feed to a separate component so we could use it in multiple places
- added a conditional around the main activity feed template to shortcut it when a new member is passed in
2022-03-01 09:54:00 +00:00