Commit Graph

8793 Commits

Author SHA1 Message Date
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