Commit Graph

4340 Commits

Author SHA1 Message Date
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
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
Rishabh Garg
c1ad9475d7 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
a7ef6c97e8 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
Thibaut Patel
20ff86c1f3 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
e7424b1892 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
07a01c2df6 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
0589f32788 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
ab67df76f8 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
df3c53be5d Fixed linting error 2022-02-22 16:52:11 +01:00
Sanne de Vries
fb5fe66343 Updated empty members screen 2022-02-22 15:54:35 +01:00
Sanne de Vries
7c5605dc2c Updated Members screen empty screen 2022-02-22 15:40:57 +01:00
Sanne de Vries
5fb9b8f641 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
4f21712828 Replaced divs with inputs for portal links 2022-02-22 14:36:24 +01:00
Peter Zimon
cce771b879 Updated portal links copy function 2022-02-22 14:00:36 +01:00
Djordje Vlaisavljevic
fcb8a19594 Removed the white line visible when selecting currency 2022-02-22 12:30:03 +01:00
Kevin Ansfield
034dc8ef3f 🐛 Fixed mismatched operator in member filters after changing filter type
closes https://github.com/TryGhost/Team/issues/1384

- when setting the filter type, change the filter's relation/operator to match the filter type's first operator so the filter string and the UI are in sync
2022-02-22 10:08:16 +00:00
Kevin Ansfield
4d00f5fb69 Added "Last seen" members list filtering options
closes https://github.com/TryGhost/Team/issues/1307

- adds "Last seen more/less than x days ago" option to members filtering UI
- re-ordered a few related objects/arrays so they are consistent
2022-02-22 09:47:01 +00:00
Kevin Ansfield
f44c54862b Completed Octane migration of integration controller
refs https://github.com/TryGhost/Ghost/issues/14101

Applied scout rule to fix linter errors when touching a file.

- added local `updateProperty` and `validateProperty` methods to remove use of `target=`
  - our validation implementation does not properly bind `this` so direct usage of `this.integration.validate` fails
- added `on-input` argument support to our `TextInput` mixin so we we're not overwriting the native event handlers on classic input components
2022-02-21 17:54:47 +00:00
Kevin Ansfield
d1e7ccbe00 🐛 Fixed saving of custom integrations
closes https://github.com/TryGhost/Ghost/pull/14183
refs 3ee0c3ff53

- unskipped test for integration saving
- fixed missed rename from `save` to `saveTask`
- fixed `saveTask` throwing from a "handled" validation error
2022-02-21 17:54:47 +00:00
Djordje Vlaisavljevic
26388774cc Fixed more linting issues
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 17:55:47 +01:00
Djordje Vlaisavljevic
97ca3db8b1 Fixed linting issues
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 17:30:03 +01:00
Djordje Vlaisavljevic
899c078816 Added the "selectablePortalLinks" feature flag
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 16:46:21 +01:00
Djordje Vlaisavljevic
e8a01142bc Put portal links update under the feature flag
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 16:46:21 +01:00
Kevin Ansfield
15510221c5 🐛 Fixed "Enable email open-rate" toggle
closes https://github.com/TryGhost/Team/issues/1381
refs 21b4b15a1c

- when the email newsletter settings was refactored, the `emailTrackOpens: reads('settings.emailTrackOpens')` was removed as it's a confusing redirection but it's usage in the toggle action was missed
2022-02-21 14:31:36 +00:00
Djordje Vlaisavljevic
f98aafb08b Added grouping to portal links table to fix linting issue
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 13:22:21 +01:00
Djordje Vlaisavljevic
1142307b8b Made links in portal settings selectable
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 13:01:20 +01:00
Kevin Ansfield
1534172fef Added membersLastSeenFilter labs flag
refs https://github.com/TryGhost/Team/issues/1307

- will be used for gating access to "Last seen" filtering on members screen
2022-02-21 11:52:32 +00:00
Kevin Ansfield
4b646d40ea Added non-Stripe members setting screen acceptance tests
refs https://github.com/TryGhost/Team/issues/1358

- added acceptance tests for members settings screen
  - subscription access management
  - default post access management
  - free tier management
- fixed `enableLabsFlag()` test helper overwriting existing flag settings when enabling another one
- updated API mocks and fixtures
  - matched product fixtures to default tiers-enabled products
  - updated product API mocks to include benefit handling
2022-02-18 22:36:01 +00:00
Kevin Ansfield
03defc274e 🐛 Fixed Admin crash when member filters were focused+blurred without entering a filter value
closes https://github.com/TryGhost/Team/issues/1309
closes https://github.com/TryGhost/Team/issues/1336

- the error occurred because the `<Members::FilterValue>` component detaches it's value from the passed in value it was initialized with. Due to the detached handling, after changing the filter type away from the default label filter to a text input based filter, the internal value stayed as `[]` even though the filter type's value was changed. When the blur event was triggered in that state the internal `[]` value was used to update the filter resulting in an invalid filter string
  - added a quick-fix of assigning the input's value in the blur event handler meaning we get the expected `''` value
  - allows for passing tests to be created ready for a deeper fix/refactor later
- added `nql` dependency and used it in the `GET /members` API mock to match members against the filter param so behaviour matches the real API
  - tested increase in code size - dev build increased by ~180KB, no difference in prod
- added acceptance tests for all current filters and search
2022-02-15 21:38:57 +00:00
James Morris
b8823f433a Tidied up the Activity Feed search box
refs: https://github.com/TryGhost/Team/issues/1373

- added some additional styles to dropdown to better handle names and emails together
- widened the search box to better fit names and emails
2022-02-15 17:28:15 +00:00
James Morris
db6db71817 Replaced icon for changed subscription event in Activity Feed
refs: https://github.com/TryGhost/Team/issues/1373

- current icon wasn't representive of the event
2022-02-15 17:03:35 +00:00
James Morris
da9c15f7b5 Ensure from and to plan icons aren't overridden with default icon in Activity Feed
refs: https://github.com/TryGhost/Team/issues/1373

- moved the icon variable for subscription_event to avoid it overriding the if statements
2022-02-15 16:07:28 +00:00
James Morris
30f7892de8 Simplifying for the fitler dropdown for Activity Feed
refs: https://github.com/TryGhost/Team/issues/1373

- using more conventional controls with checkboxes
- simplifying to make ready for release
2022-02-15 15:41:32 +00:00
Kevin Ansfield
c72b31f504 Fixed test-selector typo for members table
refs 995673ad3c (commitcomment-66689174)

- fixed typo
- added check to base state test to confirm
2022-02-15 15:01:36 +00:00
Matt Hanley
7966ff555f Updated row format for activity feed
- The row format was incorrectly outputting the month instead of the minute value when listing events
2022-02-15 14:46:48 +00:00
Peter Zimon
b5d900a1d3 Updated template linting hint 2022-02-15 12:41:26 +01:00
Peter Zimon
952ac4675e Fixed email count formatting bug 2022-02-15 08:27:30 +01:00
James Morris
34b5108b23 Removed the Publication Icon from the Finishing Touches
refs: https://github.com/TryGhost/Team/issues/1303

- on reflection, the Publication Icon was not needed
2022-02-14 17:05:27 +00:00
James Morris
d17f2e4dc6 Added in dark styles for onboarding steps, just in case
refs: https://github.com/TryGhost/Team/issues/1303

- added in basic dark mode styles as someone could see those
- added for finishing touches and get started modal
2022-02-14 16:27:43 +00:00
Kevin Ansfield
995673ad3c Added acceptance test for members search
refs https://github.com/TryGhost/Team/issues/1336
refs bf9bbc3aa6

- adds basic search param handling to `GET /members` API mock
- adds acceptance tests for basic search behaviour
- contains regression check for search input not being visible when no members match
2022-02-14 16:23:57 +00:00
James Morris
450182edf4 Added back in two additional controls for testing onboarding
refs: https://github.com/TryGhost/Team/issues/1303

- added back in Publication Icon
- added back in Publication Logo
2022-02-14 16:11:45 +00:00
James Morris
eb25b2a120 Few additional tweaks to the styling
refs: https://github.com/TryGhost/Team/issues/1303
2022-02-14 15:38:58 +00:00
James Morris
c88770a110 Added in a more styled Get Started modal for fresh start
refs: https://github.com/TryGhost/Team/issues/1303

- implemented a new design for the modal
- added in a start up animation inline with rest of onboarding
2022-02-14 13:26:59 +00:00
Djordje Vlaisavljevic
6f1d5c7e30 Fixed whitespace
refs https://github.com/TryGhost/Team/issues/1069
2022-02-14 13:15:32 +01:00
Djordje Vlaisavljevic
2593395ecf Fixed formatting
refs https://github.com/TryGhost/Team/issues/1069
2022-02-14 13:06:00 +01:00
Djordje Vlaisavljevic
aed5da5d7a Added static HTML design for showing status/tier in members table
refs https://github.com/TryGhost/Team/issues/1035
2022-02-14 12:58:05 +01:00
Djordje Vlaisavljevic
8b5ef4a7d7 Added membersTableStatus feature flag
refs https://github.com/TryGhost/Team/issues/1035
2022-02-14 12:58:05 +01:00
Sanne de Vries
7e2230d952 Updated Members screen when subscription access is off 2022-02-11 19:06:48 +01:00
Kevin Ansfield
69a8122ca6 Disabled non-functional edit buttons in labels dropdown when importing members (#2258)
closes https://github.com/TryGhost/Team/issues/1320

- added `@allowEdit` argument to `<GhMemberLabelInput>` and changed the dropdown to only show the edit label when `@allowEdit` is truthy
- updated usage in the filter UI and members detail screens to allow editing
2022-02-11 15:20:28 +00:00
Sanne de Vries
489c4b90c3 Removed border in publish-menu 2022-02-11 14:56:48 +01:00
Kevin Ansfield
7d0298c7a8 🐛 Fixed labels not being selectable in members importer
refs https://github.com/TryGhost/Team/issues/1320

- added a tracked `labels` property in `<ModalImportMembers::CsvFileMapping>` and passed it through to `<GhMembersLabelInput>` so that it has a list of labels that can be added to
- fixed error from sorting labels if one doesn't have a name
- added acceptance test for selecting labels in the members import flow
2022-02-11 13:10:42 +00:00
Peter Zimon
278b70d668 Updated members list help vertical alignment 2022-02-11 12:13:34 +01:00
Kevin Ansfield
09a97779b2 Added basic happy path acceptance test for member csv upload
refs https://github.com/TryGhost/Team/issues/1320

- fixed event handling in `gh-file-input` for test-initiated uploads
- added `POST /members/upload/` API mock that emulates uploading a single member
  - it's enough for this particular test and can be expanded as needed
- added acceptance test that does a simple 1-member, no Stripe, CSV upload with no mapping changes
2022-02-11 11:07:13 +00:00
Kevin Ansfield
152e9ff7d1 Added acceptance test for members import modal display
refs https://github.com/TryGhost/Team/issues/1320

- start of acceptance tests ready for more detailed testing
- added ignore of `no-duplicate-landmark-elements` lint rule in import modal template
  - the rule was a false flag because the conditionals only allow one `<header>` element to be rendered at a time
2022-02-11 10:01:08 +00:00
Sanne de Vries
b9d5e7dca6 Replaced disabled email sending UI for notification in publish menu
No ref

- When memberships are set up but no members are present, we would display the email sending UI in a disabled state. We're now notifying the user why they can't send emails and how to start sending
2022-02-11 10:33:22 +01:00
Sanne de Vries
f27088c581 Fixed linting error
Refs 72d3d6debc

- Fixed PSM error by moving the action on to the button and change the styling so the button is the main styled element that fills the whole area
- Hid the post-list-item error, which will warn in 30 and error in 60 days
2022-02-11 10:10:18 +01:00
Sanne de Vries
72d3d6debc Hid email related ui when subscription access is set to 'Nobody' 2022-02-11 09:29:11 +01:00
Kevin Ansfield
f4c6555ccf Fixed linter error 2022-02-10 18:37:31 +00:00
Kevin Ansfield
c511349c81 Fixed test runs downloading members CSV files
refs 8052166cbe

- when migrating the bulk delete logic to a new modal the `isTesting` property was missed meaning test runs were triggering actual downloads, littering your downloads folder with repeated CSV files
2022-02-10 18:33:27 +00:00
Kevin Ansfield
9a24be2b4f Fixed Ember Data deprecation warnings for queryRecord response returning array
no issue

- our API always returns an array whether we're performing a browse or find request but Ember Data expects explicit find requests to return a single object and throws deprecations when it sees an array
  - https://deprecations.emberjs.com/ember-data/v2.x/#toc_store-queryrecord-array-response-with-restserializer
- we previously had `normalizeSingleResponse` overrides in specific models that we use with `queryRecord` but we've since introduced `queryRecord` usage on more models but the associated "fix" was not duplicated in the serializers for those models leading to many deprecation warnings logged to the console in development and when testing
- moved the fix to the application serializer so it applies to all models
  - explicitly excluded `setting` model because that's a special-case and has it's own array-into-object serialization to represent multiple settings records as a single model instance
2022-02-10 14:50:58 +00:00
Kevin Ansfield
1e4af5d072 Fixed typo in default UTC timezone of {{gh-format-post-time}} helper
no issue

- was throwing errors from Moment.js in tests but not causing failures
2022-02-10 14:29:36 +00:00
Kevin Ansfield
45d8fa8a54 Fixed linter error
refs 235fcb4903

- commit snuck in between merge of eslint update with fixes applied
- ran `yarn lint:js --fix` again
2022-02-10 10:49:32 +00:00
Gabriel Csapo
d51f2bcf23 [chore] migrate to eslint@8 and run --fix (#2256)
closes https://github.com/TryGhost/Admin/pull/2107

- updated related babel dependencies
- bumped eslint
- ran `yarn lint:js --fix`
- added eslint ignore comments for some required non-camel-case properties
2022-02-10 10:41:36 +00:00
Djordje Vlaisavljevic
235fcb4903 Added tierName feature flag
refs https://github.com/TryGhost/Team/issues/1069
2022-02-10 11:37:57 +01:00
Kevin Ansfield
3ee0c3ff53 Fixed duplicate top-level properties after native class codemod
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Admin/pull/2256

Before migrating to native classes we had a number of controllers/components that had an `.actions.foo` action and a `.foo` task. The automated migration to native classes didn't take that into account and we've ended up with duplicate top-level property names. These duplicates are confusing and can potentially lead to errors or unexpected behaviour, they'll also be flagged as linter errors when we bump our eslint version.

- switched tasks with matching action names to `.actionTask` naming scheme
2022-02-10 10:20:03 +00:00
Kevin Ansfield
f1c8af662f Refactored modal for bulk unsubscribing members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full bulk unsubscribing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 22:04:02 +00:00
Kevin Ansfield
8052166cbe Refactored modal for bulk deleting members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-removing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 22:04:02 +00:00
Kevin Ansfield
efb7bc4c3b Refactored modal for bulk removing a label to members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-removing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 21:58:59 +00:00
Kevin Ansfield
925751c678 Removed unused addLabel() action on members controller
no issue

- left-over from earlier iterations
- adding a new label whilst filtering will be added back in so we don't want to confuse things with similar-but-unused code
2022-02-09 21:58:59 +00:00
Kevin Ansfield
24b222e927 Refactored modal for bulk adding a label to members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-adding logic out of the members controller and into the modal so logic is contained in one place
- added `{{members-count-fetcher}}` resource that allows for member counts to be fetched directly from templates avoiding duplicated code
2022-02-09 21:58:59 +00:00
James Morris
510b115329 Better styling for the Finishing Touches screen
refs: https://github.com/TryGhost/Team/issues/1303

- fixed glaring styling issues after technical implementation
- got to a place for testing, though small issues remain
2022-02-09 18:10:02 +00:00
Kevin Ansfield
b38e21995a Fixed Cmd+S not saving on membership and members email setting screens
no issue

- routes no longer automatically trigger save for cmd+s, it should be explicitly tied to the action that should be performed
- added `{{on-key "cmd+s"}}` to the `<GhTaskButton>` save buttons
  - `{{on-key}}` with no explicit action triggers a click action on the attached element, in this case the screen's save buttons
2022-02-09 10:59:12 +00:00
Kevin Ansfield
8cc4c6c4a1 Dropped ember-concurrency-decorators dependency
no issue

- since `ember-concurrency@2.0` it's possible to use the standard imports as decorators removing the need for the extra `ember-concurrency-decorators` dependency and imports
2022-02-09 10:49:38 +00:00
Gabriel Csapo
4a6e175615 [chore] migrate app/controllers/settings/navigation.js to use native classes (#2254)
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Admin/pull/2245

- continuing migration to native classes with use of `@classic` decorator
- required as a part of https://github.com/TryGhost/Admin/pull/2245
2022-02-09 09:53:38 +00:00
Gabriel Csapo
a8dbc1ab7e [chore] updates app/controllers/editor.js to use native classes (#2253)
refs https://github.com/TryGhost/Ghost/issues/14101

- continuing migration to native classes with use of `@classic` decorator
2022-02-09 09:50:46 +00:00
Sanne de Vries
929378c318 Updated copy of Save buttons on settings pages
No issue

- Changed all buttons to "Save" for consistency across settings
2022-02-09 10:32:47 +01:00
Kevin Ansfield
6b4fe78252 Swapped use of EmberObject for member filter rows to native classes
refs https://github.com/TryGhost/Team/issues/1309

General cleanup to switch to more modern idioms.

- removed unnecessary assignment of properties in component's `constructor`
- dropped use of `EmberObject`, use an explicitly defined `Filter` class instead
  - marked properties that change as `@tracked`
  - switched to direct property setting with `=` instead of `.set()`
2022-02-09 09:10:55 +00:00
Fabien "egg" O'Carroll
047f28177f 🐛 Fixed sending non-integer prices to Tiers API
refs 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. Rounding is safe here, because the errors involved in
floating point operations are very small.
2022-02-09 10:41:16 +02:00
Sanne de Vries
a2b631f8b6 Updated empty states for posts, pages, and tags 2022-02-09 09:34:12 +01:00
Sanne de Vries
7061b3416f Updated copy on empty members screen 2022-02-09 09:24:11 +01:00
Kevin Ansfield
e3aa51310c Resolved linter errors in <Members::FilterValue> component
refs https://github.com/TryGhost/Ghost/issues/14101

- dropped use of unnecessary `<GhTextInput>` component
- switched action calls over to standard `{{on "event"}}` rather than the sometimes error-prone overriding of EmberObject component event handlers
2022-02-08 15:11:01 +00:00
Kevin Ansfield
b80ce527e5 Moved members screen filter components into components/members
no issue

- currently the components are screen-specific rather than generalised so shouldn't have the `gh-` prefix
- fixed linter error for confusing `{{#unless}}...{{else}}` usage
2022-02-08 15:11:01 +00:00
Fabien "egg" O'Carroll
b287c881eb Revert "Rounded monthly/yearly Price"
This reverts commit 55af726402.
2022-02-08 16:46:00 +02:00
Fabien "egg" O'Carroll
55af726402 Rounded monthly/yearly Price
refs https://github.com/TryGhost/Team/issues/1319
2022-02-08 16:43:57 +02:00
Sanne de Vries
4cd5ea90eb Updated import-members modal 2022-02-08 14:56:19 +01:00
Kevin Ansfield
8e5cbf4e0f Cleaned up members filter labs components
no issue

- the members filtering is out of labs, we don't need to keep the labs component naming around
- renamed `-labs` components/classes to non-labs naming, replacing old and unused non-labs components where necessary
2022-02-08 11:48:55 +00:00
Kevin Ansfield
bf9bbc3aa6 Fixed members search input losing focus whilst typing
closes https://github.com/TryGhost/Team/issues/1318

The `{{if this.members.length "" "hidden"}}` class meant that whenever loading occurred the search input was briefly changed to `display: none` which caused focus to be lost making searching rather painful. It also meant the search input disappeared completely when no members matched a search.

- switched to a standard `<input>` element to get better event handling ergonomics
- added `searchIsFocused` tracked property that is set to `true` any time the search input has focus - works around an unexpected re-render when clearing the search input whilst it has focus
- switched the "hide" conditional to a getter that takes members length, search param text, and search input focus into account so there are no unexpected hides of the search bar
2022-02-08 11:44:08 +00:00
Kevin Ansfield
f111a23031 🐛 Fixed "Show all members" button not clearing search field when no results match
no issue

- the reset button was only clearing the `filter` param rather than resetting all query params
- removed unnecessary `searchText` indirection, the search input can work directly with the query param
2022-02-08 11:36:49 +00:00
Kevin Ansfield
f0432ba82c Migrated <GhUnsplashPhoto> to glimmer component
refs https://github.com/TryGhost/Ghost/issues/14101

- extracted the ratio zoom handling to a `{{ratio-zoom}}` modifier to clean up the component and avoid needing lifecycle hooks that don't exist in Glimmer components
- disabled `no-nested-interactive` linting in the template - not ideal but we'd need a much bigger design refactor to eliminate the nested links
2022-02-08 10:13:18 +00:00
Djordje Vlaisavljevic
088c1af098 Fixed showing explainer text for free membership welcome page input field
refs https://github.com/TryGhost/Team/issues/1168
2022-02-08 09:39:48 +01:00
Rishabh
f341edb02d Updated welcome page location for free membership
refs https://github.com/TryGhost/Team/issues/1168

- moved free tier welcome page url from product card to main screen
2022-02-08 09:31:40 +05:30
James Morris
7ee156ef72 Quick fixed the links not showing when activity feature flag is off for members
refs: https://github.com/TryGhost/Team/issues/1317
2022-02-07 17:00:59 +00:00
Kevin Ansfield
018a4ec5e9 Migrated <GhUnsplash> to glimmer component
refs https://github.com/TryGhost/Ghost/issues/14101

- swapped use of `<LiquidWormhole>` to `{{#in-element}}` because we weren't animating anything
  - we can now use `{{css-transition}}` instead if we want to animate in the future
- swapped use of `ShortcutsMixin` for ember-keyboard's `{{on-key}}` modifier
- added `{{query-selector}}` helper so we can grab an element from inside the template rather than requiring a backing component function (used to pass the wormhole element to `{{#in-element}}`)
- added `{{on-resize}}` modifier so the `resizeDetector` service can be used directly from the template rather than requiring a backing component to wait for render and use query selectors to grab an element
2022-02-07 16:53:12 +00:00
Sanne de Vries
9234c8f695 🎨 Improved empty state of the Members screen
No issue

- Added resources to help and inspire people get started with members, which will be hidden after 6+ members are added
2022-02-07 16:11:08 +01:00
Kevin Ansfield
aadbb6ea1c Added unsplash button/selector to publication cover image form field
no issue

- shows an unsplash button when no image is present, opening the full unsplash selector when clicked
- behind the `improvedOnboarding` labs flag
2022-02-07 12:16:57 +00:00
Kevin Ansfield
bbd4c452b9 Updated conditionals for editorIsLaunchComplete with improvedOnboarding feature
closes https://github.com/TryGhost/Team/issues/1294

- ensures latest member activity is shown when improvedOnboarding feature is enabled no matter what the `editorIsLaunchComplete` value is to better show what the dashboard will look like when the launch wizard is removed
2022-02-07 11:11:19 +00:00
Kevin Ansfield
da9c4288bf Added collapse animation to get-started dashboard panel when dismissing
no issue

- softens the disappearance by fading out and collapsing the height when removing
- uses `{{css-transition}}` modifier from https://peec.github.io/ember-css-transitions/docs/insert-destroy
- max-height used in order to animate collapse of a `height: auto` panel, 350px starting point chosen as it's slightly bigger than the largest height of the panel at mobile widths
2022-02-07 10:04:52 +00:00
Kevin Ansfield
7e95890a99 Added saving spinner to finishing-touches screen
refs https://github.com/TryGhost/Team/issues/1310

- switched to a task and `<GhTaskButton>` to show a saving indicator whilst waiting for API to return
2022-02-04 17:32:43 +00:00
Kevin Ansfield
2525a43156 Changed firstStart flow to show a streamlined settings screen
closes https://github.com/TryGhost/Team/issues/1310

- added `/setup/finishing-touches` route
  - refreshes theme preview on access
  - uses existing setting form components to build a reduced settings menu
- updated `/?firstStart=true` handling to transition to `/setup/finishing-touches` instead of showing the get-started modal
- updated standard setup flow to show the get-started modal upon completion
  - `/?firstStart=true` flow for now will only be used when a theme has been chosen before site creation
2022-02-04 17:06:40 +00:00
Kevin Ansfield
b166522916 Added global max-width for input[type="image"]
refs 14c0c5ff65

- we want `<input type="image">` to behave the same as `<img>`
2022-02-04 16:44:34 +00:00
Kevin Ansfield
5f0f47ac4d Fixed missing ...attributes on <Settings::FormFields::PublicationCover>
refs 14c0c5ff65
2022-02-04 16:11:23 +00:00
Kevin Ansfield
14c0c5ff65 Refactored general design settings form components
refs https://github.com/TryGhost/Team/issues/1310

We want to use parts of the "Brand setting" form in a separate streamlined settings screen after site setup but that wasn't possible without a lot of duplication.

- extracted individual form fields into separate components for re-use
  - included minor refactors like using `uploader.registerFileInput` and `uploader.triggerFileDialog` instead of continually duplicating the same file input trigger method
- fixed accessibility issues
  - changed input titles from `<div>` to `<label>` and associated with the component's input fields
  - changed `<img {{on "click" upload}}>` to `<input type="image">` so they act as proper buttons and are linked to the label (required a styling change so `img` and `input[type="image"]` are treated equally)
- finished cleanup of `.description-container-labs` by renaming to `.description-container`
2022-02-04 16:04:58 +00:00
Rishabh Garg
e493afdb16 Updated specific tier handling for default post access setting (#2246)
refs https://github.com/TryGhost/Team/issues/1071

Default content visibility for specific tiers is now stored across 2 settings - `tiers` on `default_content_visibility` and list of tier ids on `default_content_visibility_tiers` setting, which is consistent with pattern of storing visibility on posts. This change -

- updates visibility filter UI for default content visibility segment select
- cleans up common visibility segment select component to handle ids directly instead of nql segments
- updates setting model
2022-02-04 21:00:59 +05:30
Djordje Vlaisavljevic
0d30d98a9b Moving styling from Tachyons classes to custom classes
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 14:50:41 +01:00
Kevin Ansfield
019b22caa1 Added desktop/mobile switch to <GhBrowserPreview> component
refs https://github.com/TryGhost/Team/issues/1310

- we had a `<GhBrowserPreview>` component but it wasn't being used everywhere because it's behaviour didn't match the mobile/desktop switch with no iframe re-render that we needed for some screens
- updated component to match all required behaviour
  - include a switch between desktop and mobile views
  - default fallbacks for `@title` and `@icon` arguments
- switched design settings themes over to using the component instead of repeating the same set of markup
2022-02-04 10:28:20 +00:00
Djordje Vlaisavljevic
a05c9e4c76 Updated confirmation modal copy
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 10:36:55 +01:00
Kevin Ansfield
c44766e8d3 Collapsed @service injection definitions to single-line style
no issue

- find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
2022-02-03 19:04:43 +00:00
Kevin Ansfield
e3c4eff84c Resolved use of {{action}} linter errors in <GhProductCard>
refs https://github.com/TryGhost/Ghost/issues/14101

- switched to `{{on}}` and `{{fn}}`
- updated linter todo list
2022-02-03 17:37:32 +00:00
Djordje Vlaisavljevic
2ec4a1fb5c Removed an extra div
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 18:07:41 +01:00
James Morris
637fbbd2e1 Fixed the green button text that appeared on the dashboard
refs: https://github.com/TryGhost/Team/issues/1308

- added more targeted selectors to revert back original color
2022-02-03 17:03:48 +00:00
Djordje Vlaisavljevic
5ab17e586f Updated free membership card
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 18:03:29 +01:00
Rishabh
40c78b6be6 Removed add complimentary option for member when no active tiers
refs https://github.com/TryGhost/Team/issues/1252

"Add complimentary subscription" doesn't make sense when there are no active tiers for site in member detail screen
2022-02-03 19:12:41 +05:30
Djordje Vlaisavljevic
c67e76a1ff Moved the welcome page URL input field to the bottom of the section
refs https://github.com/TryGhost/Team/issues/1168
2022-02-03 09:47:43 +01:00
Djordje Vlaisavljevic
333f6f2424 Updated tiers dropdown filter active state
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 09:16:25 +01:00
Gabriel Csapo
75a138cb39 [chore] Ran native classes codemod for app/services (#2240)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/services
2022-02-02 22:11:11 +00:00
Kevin Ansfield
850a223dd4 Dropped use of @classic decorator in transforms
refs https://github.com/TryGhost/Admin/pull/2242

- there was no further EmberObject specific usage to migrate for these classes so the @classic decorator is not necessary
2022-02-02 18:48:59 +00:00
Kevin Ansfield
83fb74613c Migrated session-store to native class syntax
no issue

- part of the push to standardize on native es6 classes in place of EmberObject syntax
2022-02-02 18:41:16 +00:00
Kevin Ansfield
f73837fba3 Finalized migration of serializers to native class syntax
refs d40740b0ec

- dropped use of `@classic` for auto-converted classes
- switched remaining EmberObject serializers to native classes
2022-02-02 18:35:18 +00:00
Gabriel Csapo
d40740b0ec [chore] ran native classes codemod for apps/serializers (#2243)
refs https://github.com/TryGhost/Admin/pull/2227

A continuation of #2227 that runs the native classes codemod against app/serializers.

Most of the serializers that are trying to be transformed are failing with the same issue:

```
Validation errors: 
	[attrs]: Transform not supported - value is of type object. For more details: eslint-plugin-ember/avoid-leaking-state-in-ember-objects
2022-02-02T05:54:58.571Z [warn] [app/serializers/role.js]: FAILURE 
```
2022-02-02 18:27:03 +00:00
Gabriel Csapo
f22a758a3b [chore] run the no-implicit-this codemod (#2244)
refs https://github.com/TryGhost/Admin/pull/2238

Follow up to #2238, this should remove the existing no-implicit-this lint errors and any new violations should be flagged right away.

* run the no-implicit-this codemod
* updated todos
2022-02-02 17:09:02 +00:00
Gabriel Csapo
fdc24103cc [chore] runs native classes codemod for app/adapters (#2239)
no issue

* ran native classes codemod for app/adapters
* migrated slug-url mixin to a utility
2022-02-02 16:57:22 +00:00
Kevin Ansfield
cc257f8576 Fixed noreferer typos
no issue

- should be `noreferrer`, caused duplication by ember-template-lint auto fixing
2022-02-02 16:20:01 +00:00
Gabriel Csapo
beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00
Rushab Kumar
894cea5256 Fix incorrect color on hover for publish and send buttons (#2188)
- Use default primary button style in publish menu for dark mode
2022-02-02 15:27:27 +01:00
James Morris
10948af9be Added in basic styleing for the onboarding modal ready for testing
refs https://github.com/TryGhost/Team/issues/1303

- added rudimentary styling to the new onboarding modal
- added in three new icons to go with the new modal
- added the styling to the main.css for the moment
2022-02-02 12:28:08 +00:00
Thibaut Patel
151e647daa Removed the UI for the callout card feature flag
no issue

- The feature flag was removed in 7a270de050
- The UI was remaining, although it wasn't working
2022-02-02 13:27:36 +01:00
Rishabh
38b51fe192 Removed archive options for tiers without prices
refs https://github.com/TryGhost/Team/issues/1252

- on stripe disconnect, the prices on tiers are deleted, which causes the archive/unarchive on them to fail in admin
- this change removes the archive/activate option for such tiers, which will get properly cleaned up once we start removing tiers on stripe disconnect
2022-02-02 16:34:51 +05:30
Rishabh
61eeafbca7 Refined portal settings for multiple tiers
refs https://github.com/TryGhost/Team/issues/1252

- enables available tiers list for portal in case of a single tier as well, which was previously hidden
- allows site owners to enable a tier again for Portal if it was archived in past
2022-02-02 16:24:20 +05:30
Rishabh
9b0ba5968e Fixed broken offer screen for tiers missing price
no refs

- in an edge-case scenario, if an offer is using a tier with missing price, it will not throw an error because of lack of price
- this case will be auto-handled once we delete all existing offers in future on stripe disconnect
2022-02-02 16:24:20 +05:30
Rishabh
498efd00cb Refined tiers list to switch to active list on unarchive
refs https://github.com/TryGhost/Team/issues/1252

- on unarchiving a tier, we switch back to active tier list instead of staying back on archived list
2022-02-02 16:24:20 +05:30
Gabriel Csapo
b4c3e1ae40 [chore] runs native classes codemod for app/transforms (#2242)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/transforms
2022-02-02 10:40:43 +00:00
Gabriel Csapo
c849bea549 [chore] runs native classes codemod for apps/helpers (#2241)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/helpers
2022-02-02 10:38:52 +00:00
Sodbileg Gansukh
a1ba715d0a Remove commented style 2022-02-02 11:21:36 +01:00
Sodbileg Gansukh
442772c694 Fix dashboard chart width on wide screens 2022-02-02 11:21:36 +01:00
Peter Zimon
d5018cbb3a Fix tests 2022-02-02 10:57:34 +01:00
Peter Zimon
b5995419dc Updated default redirect for contributors 2022-02-02 10:12:16 +01:00
Sodbileg Gansukh
87738cb5de Fix close icon overlapping in the link input 2022-02-01 19:44:01 +01:00
Kevin Ansfield
8bc4309deb Added display of get-started modal after completing setup flow
refs https://github.com/TryGhost/Team/issues/1295

- moved `?firstStart` query param handling into `'home'` route as it seemed like a preferable location
  - switched to using `resetController` hook to manage removal of query param which seemed more reliable than the transition approach
- added `firstStart` query param to the transitions when completing step 3 of the setup flow
2022-02-01 18:20:26 +00:00
Sodbileg Gansukh
41edf44bee Fix post preview header pixel jump 2022-02-01 18:59:36 +01:00
Peter Zimon
6fa8dafa79 Contributors updates (#2235)
Updates Admin UX for Contributors

When logged in as a Contributor:

- removes sidebar, added floating account menu and dark-mode switch to right side. Updated mobile menu accordingly
- all post by the given user is listed in the Post list
- changed post filtering
- hides email columns in post list
- removes publishmenu for Contributors in Post preview modal
- visual tweaks
2022-02-01 18:59:20 +01:00
Kevin Ansfield
9760e67b3d Added "Get started" modal for first-load onboarding
refs https://github.com/TryGhost/Team/issues/1295

- modal is triggered by the query param `?firstStart=true`, eg https://localhost:2368/ghost/#/?firstStart=true
- clears the query param after triggering the modal so it doesn't get re-triggered after leaving and re-entering the dashboard route
2022-02-01 17:47:50 +00:00
Kevin Ansfield
f07940f0e7 Collapsed @service injection definitions to single-line style
no issue

- find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
2022-02-01 17:03:54 +00:00
James Morris
b5521e0922 Fixed breadcrumb not working at narrow widths and member activity scroll gap
refs: https://github.com/TryGhost/Team/issues/1277

- added a z-index to fix breadcrumbs when filters overlap
- made the scrolling list longer on the member activity page to remove gap
2022-02-01 14:41:21 +00:00
James Morris
097aa5c228 Fixed the spacing with email links in activity without flag
refs: https://github.com/TryGhost/Team/issues/1298

- Removed the title class as it's not necessary when flag is off
2022-02-01 14:28:37 +00:00
James Morris
418d5ae11c Bug fix for member activity mini view when flag is off
refs: https://github.com/TryGhost/Team/issues/1298

- careful consideration for styles when feature flag is on and off
- removed an unnecessary class name that helped fix
2022-02-01 12:57:11 +00:00
Rishabh
66f1e57d81 Fixed action dropdown not showing for free tier card
refs https://github.com/TryGhost/Team/issues/1252

- we only want to hide the archive option for free tier, as that's only relevant for paid tiers.
2022-02-01 17:26:18 +05:30
Kevin Ansfield
b47667d8af Fixed <GhDropdown> not opening
refs https://github.com/TryGhost/Admin/pull/2227

- in the switch to native class syntax the `super()` calls for click handlers in the `<GhDropdown>` and `<GhDropdownButton>` components were lost, meaning the event propagation was not cancelled by the DropdownMixin's `click()` handler resulting in the click-to-open being immediately undone by the body click-to-close
2022-02-01 11:42:42 +00:00
Fabien "egg" O'Carroll
a70be14bd5 Merge tag 'v4.34.1'
v4.34.1
2022-02-01 12:43:29 +02:00
Kevin Ansfield
25b2fd4aed Fixed forced-scrollbar on members and members-activity tables
no issue

- some browser/OS setting combinations will always show a fixed scrollbar when `overflow: scroll` is used instead of `overflow: auto`
2022-02-01 09:53:55 +00:00
Kevin Ansfield
be432dc4ca Added email fallback for selected member details on activity screen
no issue

- if a member has no name when they are selected on the member activity screen we weren't showing anything in the header breadcrumbs or member filter
- switched to showing name or email
2022-02-01 09:50:40 +00:00
Gabriel Csapo
8d01fb5556 Switched majority of files from EmberObject to native class syntax using @classic decorator (#2227)
no issue

- ran [ember-native-class-codemod](https://github.com/ember-codemods/ember-native-class-codemod) to convert the majority of remaining EmberObject based controllers and components to native class syntax using the `@classic` decorator
- skipped older style modal components (`components/modal-*.js`) due to observed incompatibilities in some cases
2022-02-01 09:34:03 +00:00
Rishabh Garg
7c5b14d050 Updated specific tier visibility handling for posts/pages (#2233)
refs TryGhost/Team#1071

Specific tier visibility for a post was previously stored in `visibility` column directly, which had a limitation of 50 charts. Going forward, for the specific tiers visibility of post/page, we use `tiers` array in API that contains list of tiers with access for post. This change -

- replaces `filter` type to `tiers` for visibility
- adds new visibility filter segment component in post settings menu which stores array of tiers instead of nql string for visibility
- updates serializer and model for post/page
- updates tests
2022-02-01 12:24:06 +05:30
Rishabh Garg
baf6ec07a8 Wired UI for archiving tiers (#2231)
refs https://github.com/TryGhost/Team/issues/1252

- allows site owners to (un)archive existing tiers via Admin UI
- adds option to switch between archived or active tiers view

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2022-01-31 23:56:12 +05:30
Djordje Vlaisavljevic
0f718c5a99 Moved the welcome page URL field to the first section
refs https://github.com/TryGhost/Team/issues/1168
2022-01-31 15:53:25 +01:00
Kevin Ansfield
8f1cca9f9d Added per-user dismissibility of getting-started widget
refs https://github.com/TryGhost/Team/issues/1294

- added `dashboardHideGettingStarted` feature flag that uses the `user.accessibility` JSON blob
- added `{{toggle-feature}}` helper which returns a function that can be used with the `{{on}}` helper to toggle a feature flag on or off from templates
- hooked up the dismiss behaviour for the dashboard widget using the `toggle-feature` helper
- hid the dashboard when `dashboardHideGettingStarted` feature is enabled
2022-01-31 13:05:20 +00:00
Peter Zimon
3a3b2f7fb4 Remove alpha flag for Editor settings panel (#2230) 2022-01-31 13:33:59 +01:00
Kevin Ansfield
d8aaa77f37 Replaced dashboard launch wizard widget with getting-started widget
refs https://github.com/TryGhost/Team/issues/1294

- added new widget behind `improvedOnboarding` labs flag
- hid launch wizard widget when labs flag is enabled
2022-01-31 12:28:22 +00:00
Fabien "egg" O'Carroll
898af1b449 Put Tier welcome page urls behind feature flag
refs https://github.com/TryGhost/Team/issues/1168
2022-01-31 13:36:40 +02:00