Commit Graph

9174 Commits

Author SHA1 Message Date
Kevin Ansfield a9c90bc395 Removed unused import causing linter error 2022-03-03 21:56:03 +00:00
Kevin Ansfield 634a22fa9d 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 9af6189502 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 d859b9fc79 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 f586c64818 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 0dadd22bc1 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 af8072a295 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 0d69804cca Removed errant console.log 2022-03-03 16:17:37 +00:00
Kevin Ansfield b231ef39a9 🐛 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 fadffe6d43 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 1b4d0c6072 Added link to support email field in email settings 2022-03-03 12:33:50 +01:00
James Morris 8f65f1f190 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 520a374c6f Fixed CSS for flex 2022-03-03 11:19:34 +01:00
Kevin Ansfield 7688890dd5 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 88a2293238 Added max height to membership settings form 2022-03-03 11:01:40 +01:00
Sanne de Vries 14e3082b00 Fixed linting error 2022-03-03 10:52:05 +01:00
Sanne de Vries 84ef2b5b59 Updated portal settings Stripe Connect CTA 2022-03-03 10:34:16 +01:00
Kevin Ansfield 6b80863170 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 0fb37a0f35 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 62ee8d07d3 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 8820a76c71 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 7ab6a47b69 Refined finishing touches screen UI 2022-03-02 12:46:15 +00:00
Peter Zimon 1d31bbcd6b Removed opening 'Get started' modal 2022-03-02 12:46:15 +00:00
Peter Zimon 9ed40adb2e Added dyamic theme properties on onboarding finish screen 2022-03-02 12:46:15 +00:00
Sanne de Vries ea5ad42790 Fixed Stripe disconnect modal copy in test mode 2022-03-02 13:07:08 +01:00
Djordje Vlaisavljevic 0776df43fc Fixed alignment of plus button in error state 2022-03-02 11:58:33 +01:00
Djordje Vlaisavljevic d6037ffcd3 Made empty state text lighter
refs https://github.com/TryGhost/Team/issues/1252
2022-03-01 20:16:01 +01:00
Sanne de Vries b94e4f174a Fixed header alignment responsive issue on members page 2022-03-01 19:48:28 +01:00
Sanne de Vries 1ccb48e770
🎨 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 d0cdaeb2c6 Switched remaining divs to input fields
refs https://github.com/TryGhost/Team/issues/1096
2022-03-01 13:09:41 +01:00
Kevin Ansfield aefb76886f 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
Rishabh Garg 5869553483
Added filter by tiers to members filter UI (#2274)
closes https://github.com/TryGhost/Team/issues/1029

- allows site owner to filter members on specific tier
- needs tiers beta flag enabled and site should have more than 1 paid tiers.
2022-02-28 16:08:44 +05:30
Rishabh d0b6a85ea2 Fixed include transformation in query for embedded relations
refs https://github.com/TryGhost/Team/issues/1029

- `?include` query in API needs to be transformed from camel case to snake case
- the transformation was missing for building query in relationship adapter, causing incorrect camel-case `?include` in api like `emailRecipients` instead of `email_recipients`
2022-02-28 15:44:57 +05:30
Daniel Lockyer 00fdd59b1d v4.37.0 2022-02-25 16:00:27 +00:00
Thibaut Patel 21170e76f4 Removed `last_seen_at` from the api queries
refs https://github.com/TryGhost/Team/issues/1393

- This prevents the `last_seen_at` from being sent to the API
- In the future the API will accept this property, this is a temporary fix
2022-02-24 18:46:57 +01:00
Kevin Ansfield b320ef1d73 Removed "Email" member filter options when email sending is disabled
no issue

- updated the selection of available filter properties to remove any with the "Email" group when the default email recipients setting is set to "disabled"
2022-02-24 14:52:01 +00:00
Kevin Ansfield 4b137105ba Removed "Subscription" member filter options when Stripe is not connected
no issue

- updated the filtering of available filter properties to remove any with the "Subscription" group when Stripe is not connected
2022-02-24 11:24:39 +00:00
Kevin Ansfield 8353a7b2dc Fixed mirage setup for members
refs 29feb87f98

- added missing relationship definitions for included relationships on member model
- cleaned up unnecessary forcing of `id: 99` when creating new records of some models
2022-02-23 14:21:28 +00:00
Kevin Ansfield 29feb87f98 Updated label filtering test to check labels column is populated correctly
no issue

- updated assertions to check that labels are shown inside the labels column when filtering members list by label
- added a member serializer to mirage so that relationships are correctly expanded to full embedded records
2022-02-23 13:54:23 +00:00
Kevin Ansfield 1a011bb909 Added last seen at column to members list when filtered
closes https://github.com/TryGhost/Team/issues/1388

- added `lastSeenAtUTC` property to member model
- added `last_seen_at` filter column handling to `<GhMembersListItemColumn>`
  - uses same format as the "Created" column showing the date only and a "days ago" string
2022-02-22 17:13:32 +00:00
Kevin Ansfield b273391289 Added tests for filtered columns showing in members table
refs https://github.com/TryGhost/Team/issues/1388
refs https://github.com/TryGhost/Team/issues/1337

- when filtering the members table, extra columns are shown to make any filtered data visible but we didn't have any tests for the functionality
- updated the `filterColumnLabels` getter to return an object with the original filter type name and the display label so it's easier to use test selectors
2022-02-22 16:10:16 +00:00
Peter Zimon cc396b50aa Fixed linting error 2022-02-22 16:52:11 +01:00
Sanne de Vries c8ad31c502 Updated empty members screen 2022-02-22 15:54:35 +01:00
Sanne de Vries ef8cecafe5 Updated Members screen empty screen 2022-02-22 15:40:57 +01:00
Sanne de Vries 6b61cf7e4c Hid Offers page when subscription access is off
No issue

- When subscription access is set to nobody, all member and newsletter related UI should be hidden
2022-02-22 15:18:59 +01:00
Peter Zimon 78af5b695f Replaced divs with inputs for portal links 2022-02-22 14:36:24 +01:00
Peter Zimon 5cc763f590 Updated portal links copy function 2022-02-22 14:00:36 +01:00
Djordje Vlaisavljevic 8b294fd9ae Removed the white line visible when selecting currency 2022-02-22 12:30:03 +01:00
Kevin Ansfield 0f070e3981 Merged v4.36.3 into main 2022-02-22 10:31:35 +00:00
Daniel Lockyer 914fd6aa34 v4.36.3 2022-02-22 10:25:09 +00:00