fixes https://github.com/TryGhost/Team/issues/2134
fixes https://github.com/TryGhost/Team/issues/2133
- Moved all filters to separate files to make the filter component a lot more readable and easier to maintain.
- Removed long switch style code from hbs for filter column values
- Filters for features that are disabled (such as open tracking, click tracking or member attribution) are now hidden when they are disabled
- The open rate column in the members table is now only visible if open tracking is enabled
refs https://github.com/TryGhost/Team/issues/2110
- dynamically defined properties on the config service did not have
autotracking set up properly if they were accessed in any way before the
property was defined, this caused problems in a number of areas because
we have both "unauthed" and "authed" sets of config and when not logged
in we had parts of the app checking for authed config properties that
don't exist until after sign-in and subsequent config re-fetch
- renamed `config` service to `configManager` and updated to only
contain methods for fetching config data
- added a `config` instance initializer that sets up a `TrackedObject`
instance with some custom properties/methods and registers it on
`config:main`
- uses application instance initializer rather than a standard
initializer because standard initializers are only called once when
setting up the test suite so we'd end up with config leaking across
tests
- added an `@inject` decorator that when used takes the property name
and injects whatever is registered at `${propertyName}:main`, this
allows us to use dependency injection for any object rather than just
services or controllers
- using `application.inject()` in the initializer was initially used but
that only works for objects that extend from `EmberObject`, the
injections weren't available in native-class glimmer components so this
decorator keeps the injection syntax consistent
- swapped all `@service config` uses to `@inject config`
fixes https://github.com/TryGhost/Team/issues/2112
- Removed a bit of duplicate code across templates and components that was used to handle filters
- Updated filter objects to contain information about the filter
- Added resource filters that are able to select a single resource, which can be used in columns
- Filters can now define columns by themselves. Not all columns already make use of this functionality, but we can move those over later (cleanup: https://github.com/TryGhost/Team/issues/2133)
- The filter definitions became quite long. We should move them to separate files in the future: https://github.com/TryGhost/Team/issues/2134
- Filters can now have custom NQL parsing
- Improved support for parsing recursive or grouped NQL queries
- Added support for filtering members by feedback
fixes https://github.com/TryGhost/Team/issues/1993
- Allows filtering members by opened, clicked and received email
- Adds clicked_links filter relation to Member model.
- Adds emails filter relation to Member model.
- Adds opened_emails filter expansion to Member model.
- Updated GhResourceSelect to be able to only show list posts by setting the `type` attribute to `email`.
- Improved code reuse in `filter-value` component.
no issue
Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.
- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
- added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
- added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
no issue
- relocated the screen-specific modals from `modals/` to `members/modals/` directory as part of a on-going reorganisation of components into screen-specific directories
fixes https://github.com/TryGhost/Team/issues/1850
When member attribution is enabled, the signup or conversion columns are shown when filtering on them. This data is not yet available via the API when browsing members. So these columns are now hidden.
fixes https://github.com/TryGhost/Team/issues/1344
fixes https://github.com/TryGhost/Team/issues/1127
This fixes a couple of bugs with the filter menu on the members page in admin:
- When opening the members page, the filters property was passed back from the filter component to the members controller. This caused a bug that the filter columns where not visible on reload.
- Fixed handling invalid filter parameters
- When updating the URL, the members page now properly reloads
- Fixed a bug that 'falsy' values in the NQL filter were removed on reload:
- Filtering on unsubscribed members was gone after a page reload
- Filtering on 0 emails was gone after a page reload
- This is fixed by converting numbers and booleans to strings after parsing the NQL-filter
- Fixed a bug where boolean values didn't match any value in the select menu, causing the default option to be visible
- Filtering members by 'unsubscribed' -> parsed as false (boolean) -> select menu opened -> false value (boolean) didn't match 'false' (string) so the first option was shown instead (subscribed).
- This is also fixed by converting numbers and booleans to strings after parsing the NQL-filter
The way this is currently handled is not great. The parsing happens in the filter component, but should happen on a different layer, maybe in a different helper.
This is tracked here: https://github.com/TryGhost/Team/issues/1849
refs: https://github.com/TryGhost/Team/issues/1145
- this should allow us to remove the /products endpoint in v5
It avoids:
- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers
Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
no issue
- email open rate is shown by default so we don't need to add the column a second time when the list is filtered by that data
- added `email_open_rate` to the default columns list so it's ignored when adding any filtered-by columns
refs https://github.com/TryGhost/Team/issues/559
refs 054a5f15f5
- with the update of `ember-promise-modals` we started to get deprecation warnings when using `modals.open('modal-component-name')`
- upcoming Ember build updates will introduce tree shaking but using run-time lookup of modal components by name works against that because it's not statically analysable
- switched to importing components and passing the component class directly, eg. `modals.open(ModalComponent)`
- standardized modal component class names with a `MyModal` style to get better behaviour in code editors when it auto generates imports
- dropped the modal defaults from the modals service because we can now use a static `modalOptions` property on the modal components themselves when we want to override the defaults
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
Updated email newsletter settings
- Added toggle to disable email newsletters
- Hides email related UI when email is completely turned off
- Rearranged email newsletter settings
- Added publish-menu preview in
- Changed default-recipients setting
- Updated publish-menu to show Publish as default action
- Removed the confirmation modal during publishing when no emails are intended to be sent
closes https://github.com/TryGhost/Team/issues/1265
- we were generating the correct query params for the export endpoint but those query params weren't applied to the export URL before fetching it meaning the default GET behaviour of listing first 15 members was always being used when generating the backup CSV
no issue
- pattern of downloading a file by creating an iframe and setting the `src` attribute was repeated throughout the codebase and was using a mix of native and jQuery patterns
- added a `utils` service for housing one-off utility methods like this to avoid repetition and mixed patterns becoming more widespread (we want to get rid of jQuery usage)
no-issue
This adds the ability to apply complex filters to members, as well as to
perform bulk actions on the filtered set, including unsubscribing,
adding & removing labels.
no refs
- resets filter columns on list when query params are removed from the url via sidebar click transition
- reloads the updated list on new bulk actions on the filtered list
closes https://github.com/TryGhost/Team/issues/1028
Bulk operations - add/remove label, unsubscribe - were added to filtered members list behind filtering labs flag as part of introducing filtering on members list. This handles the success/error response on bulk operations and shows them in the popup similar to delete bulk operation.
refs https://github.com/TryGhost/Team/issues/963
- updates the list when either the relation or value changes for a filter row.
- only filter rows with value are used
- consistent behavior for "apply all" and "reset all"
- `Enter` and `onFocusOut` behavior for rows with text values
closes https://github.com/TryGhost/Team/issues/969
Wires the bulk action operation UI to Ghost API to perform operations on filtered member list - unsubscribe filtered members, add label to filtered members or remove label from filtered members
closes https://github.com/TryGhost/Team/issues/965
If there's only one filter row in the members filter builder modal, then clicking on "X" in that row resets the fields instead of removing the complete row and showing empty filter builder
refs https://github.com/TryGhost/Team/issues/969
A lot of power of filtering members comes from ability to perform actions on the filtered member list. This change adds bulk operation actions on the the UI to apply on filtered members, but has not wired them up to the API yet.
- adds unsubscribe bulk operation UI
- adds label addition bulk operation UI
- adds label removal bulk operation UI
- adds new single label selection UI for add/remove label to members UI
refs https://github.com/TryGhost/Team/issues/943
- adds new columns to member list table based on selected filters in UI
- handles dynamic columns in members list with formatted output like for labels
- works behind the filtering feature flag