refs https://github.com/TryGhost/Team/issues/1277
- added `ember-could-get-used-to-this` dependency to get access to Resources
- context: https://www.pzuraq.com/introducing-use/
- added MembersEventFetcher resource for loading members events
- using a Resource allows for a better data loading experience using only components
- uses raw data from the API rather than going through Ember Data because we don't need full models or session-length caching that gives us
- data is kept around in memory for the lifecycle of the resource, if the `filter` param changes the resource is torn down and recreated so it starts from page 1 again, once it's no longer used by a component it's torn down so data isn't kept around
- paginates by using a `created_at:<={lastSeenTimestamp}` filter - this assumes the API can handle that effectively as a cursor with no duplicate or skipped records
- updated `members-activity` template to use the new resource and control data loading using infinite scroll
- moved overall screen structure from the `<MembersActivity::Table>` component into the `members-activity` template so that the table component can stay focused on just the table display
no issue
- many "The automatic session initialization is deprecated" were shown in test output due to an old method of initializing the session service
- switched to explicit session setup in the application route's `beforeModel` hook
- https://github.com/simplabs/ember-simple-auth/issues/2314
no issue
- bumped `ember-source`, `ember-data`, and `ember-cli` to latest 3.22.x versions
- fixed errors caused by updating properties inside of a render
- `<GhPublishMenu>` removed insta-call of `@setSaveType` when rendering sub-components in favour of pre-setting the default `@saveType` value when the underlying post status changes
- updated `<GhNavMenu>` to use the run-loop to update the `firstRender` property once rendering has finished rather than mid-render
no issue
- part of ember upgrades
- removed all unnecessary usage of `.get`
- cleaned up imports where we had imports from the same module across multiple lines
- standardized on importing specific computed helpers rather than using `computed.foo`
- switched tests from using `wait()` to `settled()`
refs https://github.com/TryGhost/Team/issues/1277
- if email events were passed through the parser they had blank actions and objects
- added `opened`, `received`, and `failed to receive` actions for email events
- changed object to equal `an email` for any email events
refs https://github.com/TryGhost/Team/issues/1277
- `data-cache` service has a `.set(key, data, lifetime)` method that will store the data under the key and sets a timeout that will remove the data when the lifetime expires
- data can be retrieved with `.get(key)`
- allows for components to cache data for use when re-rendering without having to worry about keeping track of their state and it's expiration manually somewhere else
- moved caching concern out of the `members-activity` service and into the latest-member-activity dashboard component which is the one that cares about it's data and cache lifetime
- frees the `members-activity` service up to be more generic as it's no longer tied to the dashboard component's concerns
- component switched to using a task rather than a promise so it is automatically cancelled if it's destroyed before data fetching is complete
no issue
- we want to re-use this component as display-only on the email newsletter settings screen but the previous component design meant that changes to the `@filter` argument did not update the display
- moved to using getters for the internal base/specific filter Set instances so they are auto-updated when the `args.filter` param changes
- updated the `toggleSpecificFilter` action to store the current specific filter as temporary internal state when toggled off so it can be re-filled when toggling back on
- this interaction was why the component state had previously been disconnected from the `@filter` param
- moved filter string generation into an explicit `updateFilter` method that is called when any action occurs that should update the filter string. Changes to the filters are passed in as arguments so that we call the passed in action which will then update the `@filter` argument and the component state can react accordingly
refs https://github.com/TryGhost/Team/issues/1277
- renamed `<GhActivityTimeline>` to `<GhMemberActivityEventParser>` and modified so that it yields parsed events rather than directly renders them
- makes the component re-usable as it can be used to decorate raw events ready for use in context-specific templates
- switches to using a getter to yield the parsed events so that they will update automatically when the `@events` argument changes
- updated `<Dashboard::LatestMemberActivity>` to use `<GhMemberActivityEventParser>` and keep the member activity box output local to itself
- added integration tests for `<Dashboard::LatestMemberActivity>`
- added Mirage setup for member activity event models/serializers/route
refs https://github.com/TryGhost/Team/issues/1277
- first step of further refactoring to make member activity display more generic
- separates component data loading from overall controller logic and allows it to be tested in integration tests as well as acceptance tests
refs https://github.com/TryGhost/Team/issues/1277
- pulled timeline fetching from `members-stats` service to `members-activity` service ready for further refactoring to make fetching/processing more generic
refs https://github.com/TryGhost/Toolbox/issues/175
- both cases now show the same message so I've reverted back to
returning a boolean indicating whether it should be shown
- also pulls out the check for Pro so the if-statements are easier to
read
no refs
- price amount formatting was incorrectly calling `toFixed` method on a string, which is not needed as we already round off the amount before formatting
refs https://github.com/TryGhost/Toolbox/issues/175
refs c4083967df
- the referenced commit added a warning message to the What's New page
to notify the user that we're going to be requiring MySQL 8 in
production as of v5
- this would also show if the user was already using MySQL 8, which
isn't ideal
- I've added a library to Ghost which will return the specific version
of MySQL used, so we can now detect that
- eb68e8d339 has updated the config endpoint to return `mysql5`, `mysql8` etc,
so we can now change the logic here to reflect that
- this commit also adds another warning if we're in development mode and
using mysql5, as this will not be supported as of v5
refs https://github.com/TryGhost/Team/issues/1277
- added `/members-activity` route with associated controller, template, and components behind labs flag
- table component currently renders some dummy rows
- added navigation item to main menu
- will use the currently set `?filter` query param unless clicked whilst already on the `/members-activity` screen in which case it will reset the query
- added link to dashboard members activity panel
- added link to member details activity panel
- sets the filter param to `?filter=member:{member.id}` in preparation for the feed to be filtered to the member's activity
- updated the labs-flag test helper file to export both `enableLabsFlag()` and the new `disableLabsFlag()` so it's easier to test for flag-disabled functionality
- adjusted min and max widths of various elements in audio card in What's New only to stop it from visually breaking when at specific viewport widths
- quick fixes for z-index of certain elements across cards in What's New only so they didn't appear above the page header
refs https://github.com/TryGhost/Team/issues/1277
- used for prototyping a separate activity feed screen that can show all members activity, combining the events shown in the dashboard with the email events shown on the member screen
no issue
- ran the `ember-native-class-codemod` codemod to convert just the route classes to native class syntax and performed some minor manual cleanup
- modern Ember uses native classes rather than EmberObject-based objects, this brings us closer to normalizing our code style across the codebase
- skipped the Application route as that requires deeper testing with a replacement for the `ShortcutsRoute` mixin
no issue
- mixins are deprecated in Ember so we want to remove their usage
- pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
no issue
- mixins are deprecated in Ember so we want to remove their usage
- pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
no issue
Mixins are deprecated in Ember so we want to remove their usage. The `CurrentUserSettings` mixin was used in Route files to provide `transitionAuthor()` (that also transitions contributors) and `transitionEditor()` methods so the the consuming route could use them to prevent access to authors/editors. In practice the only reason this was used was to prevent access to admin-only routes.
- added an `AdminRoute` class that inherits from our `AuthenticatedRoute` class
- when any route inherits from this class it will only allow access to admins and owners, any other user will be redirected to the home screen (dashboard or site depending on permissions)
- updated all of our admin-only routes to use the new `AdminRoute`
- allowed for removal of `CurrentUserSettings` mixin usage
- allowed for `beforeModel()` hooks to be removed from consuming routes in many cases
- some admin-only routes were extending/inheriting directly from Ember's `Route` based on the assumption that the router hierarchy would have a parent route perform the redirect. Those have also been switched to `AdminRoute` for consistency and to prevent accidentally making them available if the router hierarchy changes
- `/#/settings` does not use the `AdminRoute` so that it can redirect to the current user's setting page for non-admin users
- removed `CurrentUserSettings` mixin file
- cleaned up unnecessary computed property and function used for redirect-when-disabled in the Zapier route
no issue
- the controllers and templates for the old theme setting screens have been removed already but the route files had been missed in the cleanup
no issue
- Ghost 5.0 will require MySQL 8 when running in production so we've added a warning to the whats new/about screen to give some visibility for self-hosters to prepare
- updated `whatsnew` controller to native class syntax
no issue
- the branding modal was a hangover from before the design settings screen that hadn't been fully removed after the newer settings screen was released
refs https://github.com/TryGhost/Team/issues/559
- switched to new ember-promise-modals pattern
- removed controller and template in favor of opening modals directly from the route
- removed unused `mousedown` event handlers - they are only necessary when an input blur would trigger validation errors
- fixed Enter key not triggering create action by adding an `{{on-key "Enter"}}` event handler to the name input
- fixed scroll not resetting to top of integrations screens when navigating between them by adding `{{scroll-top}}` element modifier to the main content sections
refs https://github.com/TryGhost/Team/issues/559
- switched to new ember-promise-modals pattern
- simplified `willTransition` handling because we can now wait on the promise returned from opening the modal
- the modal content was changed to use `{{on "click" (fn @close true)}}` on the "leave" button so we can check for that return value for leave confirmation
This reverts commit e581263682.
- ember-power-select and ember-basic-dropdown updates changed which elements classes are assigned to in some cases
- revert is the quick-fix option for getting back to the working state
- dependency updates should be pushed again later with app-level changes needed to match new behaviour with old designs
refs https://github.com/TryGhost/Team/issues/559
- changed modal to use new modal pattern
- fixes padding jump when opening due to improved animation behaviour not using duplicated elements
no issue
- offer-related modals were split across the top-level `modals` directory and the `modals/offers` directory
- normalized to the `modals/offers` directory
no issue
- converted component to glimmer component and native class syntax
- reduced duplication by adding a description of each searchable model that is then used for data loading and searching
- removed convoluted use of computed properties as they weren't needed - the result of the search function is used by `<PowerSelect>` directly so we don't need any tracking/automated re-rendering
This reverts commit e581263682.
- ember-power-select and ember-basic-dropdown updates changed which elements classes are assigned to in some cases
- revert is the quick-fix option for getting back to the working state
- dependency updates should be pushed again later with app-level changes needed to match new behaviour with old designs
refs https://github.com/TryGhost/Team/issues/1270
- Zapier template links for example pre-built templates were broken due to a bug with Zapier
- updates links to use new zap creation template link which works
- double scrollbars showing at certain widths
- strange resizing of search members text box
- borders showing through when scrolling
- tidying table horizontal scrolling when viewport is narrower
closes https://github.com/TryGhost/Team/issues/854
- when testing the scheduling of a post we were grabbing a time 10 mins in the future and using that to set only the _date_ for the scheduled publish time. That causes problems because 10 mins in the future from just before midday with site set to a +12hr timezone as in the tests will move into tomorrow but without the associated change in scheduled time we've jumped forward 24hrs meaning the tests that were expecting the default +5min change when switching to a scheduled post would fail
no issue
- the original maintainer has deleted the project and released an empty version
- we're pinned at 5.5.3 and will stick to that version until a fork/replacement is found or required
refs https://github.com/TryGhost/Admin/pull/2041
- the pretender upgrade highlighted an issue with the component's progress event handler where it could fire and attempt to set the progress property after the component has been destroyed
no issue
- the members query reset was using `""` rather than `null` due to a bug in an old version of search/filtering but that meant we could end up with an empty param
- switched to `null` as it no longer appears necessary to use a blank string, this matches behaviour of other params
no issue
- after importing members a filter is applied to the members list only shows imported members
- the query param used for this was still using an old format which correctly updated the list but meant that the filter selection UI was left in a bad state that didn't correctly show the selected label or allow easy clearing of the bad filter
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
- after clicking the "Publish and send" button in the publish confirmation modal the post is saved and an email is created which caused the wording to change to automatically switch to the "publish only" state because posts with existing emails can't be sent again
- changed the wording-choice data to be set statically based on data available when the modal is triggered rather than auto-updated based on overall system state