Commit Graph

9174 Commits

Author SHA1 Message Date
Peter Zimon 0fe822a9de Fixed linter error 2022-03-08 16:47:40 +01:00
Peter Zimon 7cf4a4295d Fixed portal tiers settings margin 2022-03-08 16:40:41 +01:00
Kevin Ansfield 7a7610eacf 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 e29194e448 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 5383a13396 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 3e6d15aca5 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 66290622e0 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 a77fff3526 Removed selectable portal settings flag 2022-03-08 11:53:19 +01:00
renovate[bot] 5a27a9f655
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] af38591f1c
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 3c169ad99e Updated mirage with new tier visibility property
refs https://github.com/TryGhost/Team/issues/1387
2022-03-08 15:51:40 +05:30
Rishabh 6d206a4975 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 eea5706e07 🐛 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 cce86f2703 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 bba1681b40
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 8fe1eecc27 Fixed the name of the version header
refs 2550b91675
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 028875514b Fixed linter error 2022-03-07 18:55:04 +01:00
James Morris 7c5a6f8efe 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 4721dfa400 Updated powered by badge in email settings 2022-03-07 17:35:27 +01:00
Peter Zimon debb25ef7d Updated help and support links in account menu 2022-03-07 16:56:15 +01:00
Sanne de Vries ad93d3ba91 Fixed dashboard "get started" CTA's alignment issue 2022-03-07 15:09:06 +00:00
Kevin Ansfield bddd426569 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 893827111d 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 a671ef9b16 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 f2deb7b750 Resolved linter errors in members-activity.hbs 2022-03-07 12:21:57 +00:00
Rishabh def741a3cd 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] 550881974e
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] 47b4c0f658
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] 698d36d5fe
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] a7695127ba
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] 1e83a1b2da
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 a800dfa485 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] 4ddb349e46
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] 46d422181d
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] 8bb5df2d8a
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] a23bb2ad29
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] fcabb3c561
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 b948054f51
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 87a69ecd05 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 d2ab09ba97 v4.38.0 2022-03-04 16:00:26 +00:00
Simon Backx 5e8afa8836
🐛 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 dcef9ea52b 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 2550b91675 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 feb50fba4e 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 760f0c2ed1
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 b546885ea0 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 157cd41583 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 e0a1fc5692
🐛 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 69370de1f7 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 0aa5f8d331 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