closes https://github.com/TryGhost/Ghost/issues/14296
- bumped fork of `ember-promise-modals` as newer version exposes all focus-trap options and per-modal disabling
- disabled focus-trap for the post preview modal because it was preventing clicks on the input elements performing default behaviour
no issue
- removed the count task state from the `disableEmailOption` getter so it doesn't get used to show the "Add members" notification before the count request has finished
no issue
- fixed duplicate `id` attribute on the specific people checkbox
- switched toggle behaviour from a click event on the surrounding div to a change event on the checkbox
- the surrounding `<label>` has appropriate `for` attribute so it acts as the click-to-change target
- added `aria-label` attributes to the checkboxes because the label element we're using does not surround any content that labels the checkbox
closes https://github.com/TryGhost/Team/issues/1399
- the publish/schedule save type was not being reset when closing the publish menu, even though the underlying post publish date _was_ reset leading to the publish menu and the post state being out of sync
- added a reset of the save type when closing the menu, this means "schedule" will need to be re-selected when re-opening the menu but that follows the same behaviour as the reset of the publish menu options
refs 79afb5fc9c
refs 652fc883d7
- test was set up expecting "Label" to be the default filter shown when opening the members filter UI but it's been changed to "Name" which is no longer behind a labs flag
refs: https://github.com/TryGhost/Team/issues/1373
- Simplify the member details link on single member activity
- Adjust all the activity scrolling to work better at all sizes
- Make the header work properly with truncating at narrower viewports
- Remove unnecessary CSS and classes
- Remove the top line from the member detail box
- Move the member detail box so it stays when scrolling
- Make the empty state work with new member detail box position
- Better scrolling full width whilst not having full width like members
- Fix the subscriptions event icon which was a white box in dark mode
- Adjustments to global gh-list-scrolling styles at narrower viewports
- Test fully on narrower viewports and major browsers
https://github.com/TryGhost/Admin/pull/2286
- `session.authenticate()` returns from it's promise as soon as the authenticate request is completed but it was assumed that it returned after the `session.handleAuthentication()` promise was also completed. A side-effect of that was that depending on network timing, the setup flow could transition to the dashboard before we had loaded all of the necessary user, config, and settings requests
- normally that's not a problem because `handleAuthentication()` kicks off a transition once authentication is fully complete, in the setup flow we're handling the transition manually so need a way to manage the full async flow from outside of the session service
- it didn't show up as a problem previously because the setup flow transitioned to a third setup screen that didn't require all of the post-auth data to exist
- moved the async parts of `session.handleAuthentication()` into a task and updated to return the currently running task instance if one was already running
- lets code that is relying on the full authentication flow to have completed call `await this.session.handleAuthentication()` without causing a double-load of the post-auth API requests
- updated setup flow
- removed manual `session.populateUser()` call as that was a workaround for the async timing issue and caused a double-fetch of the current user API endpoint
- added an `await this.session.handleAuthentication()` call to the manual post-auth handler so we don't transition until the full auth flow is complete
refs: https://github.com/TryGhost/Team/issues/1373
- reduced from 10 to 5 to keep things visually simpler
- sneaked in a little colour tweak to link on activity member detail header
refs: https://github.com/TryGhost/Team/issues/1373
- nothing much here, just changing where the member detail header renders on activity
- added a little padding to empty states to better vertically center
refs: https://github.com/TryGhost/Team/issues/1373
- changed searched name clear to say Clear Member as there was duplicates across the screen
- tried to tidy up the Member Detail link when filtered by members in Activity
- few tiny CSS tweaks
refs https://github.com/TryGhost/Team/issues/1408
- "Name" is the first filter in the list and has a basic value type so it makes sense to make it the default compared to label
Tiers will soon go to GA, and these small features that were added as part of tiers beta are now ready to go live as well along with tiers GA, so we are removing their flags and bumping them as part of tiers beta.
The segment select UI for restricting post access to specific tier also showed a member count for selected tiers, which was not needed as that count is dynamic and not relevant for setting access level.
refs https://github.com/TryGhost/Team/issues/1035
- provides context on member's tier/status on default index table
- removes extra membership tier column as information is captured in status column
The tier visibility is now handled by visibility property on object, this change ensures portal preview is updated on a tier archive to show the correct Portal UI.
refs https://github.com/TryGhost/Team/issues/1408
- switched to `@tryghost/nql` packages to get access to latest releases
- updated `GET /members` mirage endpoint with a try/catch and explicit logging to make any errors from NQL more visible
- added "Name" filter option
- has `is`, `contains`, `does not contain`, `starts with`, `ends with` operators
- uses a plain text field for the input value
- added support for `~`, `-~`, `~^`, and `~$` operators when generating NQL queries from filter definitions
refs https://github.com/TryGhost/Team/issues/1418
- adds "Last seen" option to members filtering that lets you filter by date a member last logged in or opened an email with `before`, `on or before`, `on or after`, and `after` options
- adds "Last seen on x" data to the member details screen
refs https://github.com/TryGhost/Team/issues/1418
- drops the block usage of `<GhDatePicker>` for the "Last seen" input that added shortcut buttons
- not a full revert of https://github.com/TryGhost/Admin/pull/2291 as allowing block usage of the component is still useful for other component customisation
- removes CSS related to the calendar-with-shortcut buttons as we don't have any other use-cases for it at the moment
refs https://github.com/TryGhost/Team/issues/1376
- adjusted tests so they are in sync with expected dashboard behaviour
- removed `dashboardHideGettingStarted` feature and it's usage in the `showMembersGraphs` property as there's no longer a resource box to dismiss
no issue
- `settings.get('timezone')` had a typo in the "on or before" nql filter generation meaning the date wasn't correctly converted to the site timezone when applying the filter
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
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
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
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`
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.
refs e23ae31e8f
refs https://github.com/TryGhost/Toolbox/issues/222
- In the referenced commit there was a mixup with the header naming used on the client. It should have been `Accept-Version` to start with. The `Content-Version` header will be returned from the server once there is logic attached to `Accept-Version` header processing
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
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
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
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)
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>
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
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
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
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
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
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
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.
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