Commit Graph

5629 Commits

Author SHA1 Message Date
Kevin Ansfield 6a94e56988 Fixed columns resizing whilst scrolling members list
no issue

- the members list uses occluded rendering to keep scrolling performance high but this will cause constant reflows of the table contents whilst scrolling because contents are swapped in and out causing the browser to adjust the column widths to match longest/shortest content in the currently rendered set of rows
- applying `table-layout: fixed` to the table means that columns will always match the sizes defined by the first row of the table (in this case the header) ensuring that there is no dynamic resizing whilst scrolling
2020-05-28 12:59:34 +01:00
Kevin Ansfield 093e06ed48 Fixed borders on <GhMemberListItem> loading state
no issue

- `display: table` doesn't provide an equivalent of `colspan` so the loading state needs to include the same number of `display: table-cell` elements as the live state
2020-05-28 12:55:11 +01:00
Kevin Ansfield 8ab99338c0 Enabled Ember's template-only-gimmer-components feature
no issue

- template-only components (eg, `<GhMembersListItem>`) will now use a glimmer class rather than regular component class for their automatically-created backing classes
2020-05-28 12:33:49 +01:00
Kevin Ansfield 7ee1218f20 Removed unnecessary <GhMembersListItem> backing class
no issue

- `ember-moment` provides the `{{moment-from-now}}` helper that does the same thing the `.memberSince` computed property was doing
2020-05-28 12:33:49 +01:00
Kevin Ansfield 1422687527 Deleted component templates that are no longer used
no issue

- we had a few template files left over where their backing JS files had been deleted
2020-05-28 12:33:48 +01:00
renovate[bot] 6a5044cb3b
Update dependency ember-source to v3.19.0 (#1579)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-28 11:58:28 +01:00
Rish 9428ef0660 🐛 Fixed email preview not visible to Editors
refs https://github.com/TryGhost/Ghost/issues/11841

- Allows editors to see email customization option for sending test newsletters
- Editors had the necessary permission fixtures but the UI was previously only available to owners or administrators
2020-05-28 15:57:59 +05:30
Kevin Ansfield cae4a0163a Fixed sending of empty search param in members browse requests
no issue

- when the search param was empty we were still adding a `?search=` query param to the API request
2020-05-28 11:11:43 +01:00
Kevin Ansfield 4e4d7cc85c Fixed and improved members stats "debounced" fetches
no issue

- the "days changed" logic was incorrect so we were always performing new fetches rather than using existing data
- added a minor improvement that returns an in-progress fetch promise if we have one and params haven't changed - avoids triggering unnecessary extra fetches in the rare occasions the chart is re-rendered before a previous stats fetch has finished
2020-05-28 11:11:43 +01:00
Aileen Nowak c5a6206189 Updated billing icon in nav bar
no issue

- Replaced placeholder icon with new billing icon
2020-05-28 21:53:38 +12:00
Kevin Ansfield 64d7639b57
Added server-side search to new members screen (#1582)
requires https://github.com/TryGhost/Ghost/pull/11854

- ties the search input on the members screen to a `?search` query param, debounced at 250ms to avoid unnecessary API requests and UI churn
- updated the members route's `model` hook to pass through the search param in the API request query parameters
2020-05-28 10:15:17 +01:00
Kevin Ansfield cbc085fb14 Fixed members chart
no issue

- "stale data" logic was incorrect so we were always returning `undefined` from `membersStats.fetch()`
- improved behaviour of the chart when stats are not available or are loading
2020-05-27 16:12:13 +01:00
Kevin Ansfield 80346e4868 Memoized member stats with expiration
no issue

- added a `member-stats` service to keep member stats state outside of the chart component's lifecycle
- returns memoized member stats when fetching if the query hasn't changed and the data is less than a minute old
- reduces potentially heavy network requests when quickly navigating between members list and other screens
2020-05-26 17:17:52 +01:00
Daniel Lockyer 4195917ce8 v3.17.1 2020-05-26 15:55:45 +01:00
Kevin Ansfield c582f16dc0 🐛 Fixed members import not showing upload modal
no issue

- template was not renamed correctly in 9250d7939b
2020-05-26 15:49:48 +01:00
Kevin Ansfield 4610068e2c Improved number formatting in members screen
no issue

- added `format-number` helper that uses browser's built-in `toLocaleString()` method to format numbers such as adding commas or periods to improve number readability (`123,000` instead of `123000`)
- updated members chart totals to use the helper
- replaced direct `.toLocaleString()` usage with the new helper so we can change global number formatting if needed
2020-05-26 14:40:03 +01:00
Daniel Lockyer d9c99fc880 v3.17.0 2020-05-26 14:03:34 +01:00
renovate[bot] bff755f097
Update dependency ember-assign-helper to v0.3.0 (#1577)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-26 12:56:41 +01:00
Kevin Ansfield b0e5342190 Disabled mirage in development
no issue

- Ghost's API now provides the live members stats endpoint
2020-05-26 12:26:04 +01:00
Kevin Ansfield 2e3c72891e Updated members screen to work with final stats API naming
refs 071ab9774b

- stats API uses snake_case rather than camelCase to be consistent with the rest of Ghost's APIs
2020-05-26 12:26:04 +01:00
Renovate Bot c0f3d83585 Update Test & linting packages 2020-05-25 11:16:25 +00:00
Kevin Ansfield 5de9483df8 Removed "members" from mocked stats API payload property names
no issue

- removes duplication from property names as the "members" part is implicit from the resource name
2020-05-25 10:35:39 +01:00
Kevin Ansfield 332cb72e25 Updated <GhMembersChart> to fetch stats from the API
no issue

- added mocked API for `/admin/members/stats/` that generates random data for the chart
- re-architected `<GhMembersChart>` to fetch data from the API rather than calculating stats from all members loaded in memory
- enabled mirage in development so that the chart can be tested before the live API is ready
2020-05-22 17:58:45 +01:00
Kevin Ansfield ad7c8ed423 Linked label dropdown in members screen to paginated list loading
no issue

- moved model loading back into the route
- updated model loading to refresh correctly when `label` query param changes
- fixed infinite loading/"no members" display in members list by using the `members.loading` property that `ella-sparse` gives us (previously we'd never leave the loading display because `this.members.length` would be 0)
- changed the members nav link to reset query params only if it's clicked whilst on the members screen - matches posts/pages behaviour and lets you navigate without having to re-enter your filter/search
2020-05-22 17:58:45 +01:00
Renovate Bot f36ebb9a24
Update dependency ember-power-select to v4.0.2 2020-05-22 15:16:58 +00:00
Kevin Ansfield 4f2e6cd55f Fixed dropdown styling for content filter and members chart timeframe
refs cc80214916

- `<PowerSelect>` no longer has it's own wrapper element so `@classNames=` has no effect and needs to be added to an explicit wrapper element
2020-05-22 11:38:50 +01:00
Kevin Ansfield d948ba33fb Fixed redirect after saving member in "old" member screen
no issue

- changed the `replaceRoute` after saving to transition to the `member-old` route instead of `member` route
- updated tests to work with the old routes (for now)
2020-05-22 10:50:12 +01:00
Kevin Ansfield aba7f0b7c8 Added loading state for member list rows
no issue

- with the sparsely loaded list you can scroll to an area which is being loaded in the background
- if a list row is being loaded, display a "loading" version of the row so it doesn't look like you're stuck on a blank screen
2020-05-22 09:31:17 +01:00
Nazar Gargol 1cf3573d12 Fixed browser URL syncronization with embeded iframe state
no issue

- Opted in to use explicit `hisotry.replaceState` and setting iframe's `src` using assignment instead of tracking it through computed property. This allows for tighter control over when iframe's history is updated which was causing problems when `src` was bound to computed property
- Added billing page metadata. This way browser history records appear with nicer signature
- Removed "update button" iframe and rewrote "global iframe" to not use modals. This allows to have single iframe on a page, which simplifies `postMessage` communication and preserve history inside iframe to be able to navigate it after closure
- Added route change handler responding to BMA app route changes. Allows to sync browser URL visible to the user with active route in BMA iframe. The sync is based on `hisory.replaceState` method that makes sure singular history records are kept in the browser history
- Added nested wildcard billing route. This is meant to catch all the nested routes inside of BMA iframe
2020-05-22 14:44:37 +12:00
Kevin Ansfield 33bb521c11 Updated members list to use paginated loading
no issue

- disabled members search/filter/chart as they won't work without all members loaded into memory (they will be added back later)
- added `ember-ella-sparse` to handle a sparse array of members
- updated `fetchMembersTask` to return a sparse array instance
- updated components that work on a `member` instance to use `.get` because all items in a sparse array are proxy objects
- changed list loading behaviour to not refresh the list from the API unless the client-side list is more than a minute old - allows for much snappier nav between list and details screens
2020-05-20 16:39:32 +01:00
Kevin Ansfield 650b785d3d Refactored members routes
no issue

- moved labels fetching into the controller to unify members+labels loading approaches
- removed unnecessary `deactivate` hook on members route because the label form component already rolls back the model attributes when it's destroyed
- unified non owner/admin redirect approach across members and member routes
2020-05-20 16:39:31 +01:00
Kevin Ansfield e80fa137db Updated members routes/controllers with Octane idioms
no issue

- ran [`ember-native-class-codemod`](https://github.com/ember-codemods/ember-native-class-codemod) on members-related files
- updated files to remove need for `@classic` decorator where possible
    - switched to tracked properties
    - removed usage of `this.get/set/toggleProperty` etc
- swapped usage of `{{action 'foo'}}` for `{{this.foo}}`
2020-05-20 16:39:31 +01:00
Kevin Ansfield 9250d7939b Swapped duplicated members files from -dev to -old
no issue

- allows continued development on the "original/non duplicated" files to better preserve git history once the `-old.*` files are deleted
2020-05-20 16:39:31 +01:00
Fabien O'Carroll c7b75e35dd Hid Stripe apikey form if `stripeDirect: false`
no-issue

We are going to keep the UI as a fallback in future. Eventually this
`if` will include an `else` block rendering a Stripe Connect button.
2020-05-20 16:49:00 +02:00
Kevin Ansfield e32ba68c80 Fixed missing CSS styles in production builds
no issue

- some styles such as `border: none` inside `.gh-btn-white` were being stripped when ran through `clean-css` leading to visual differences between development and production
- disabled `ember-cli`'s default CSS minification as we already use `cssnano` for minification in our postcss pipeline for both dev and prod builds
2020-05-20 11:05:30 +01:00
Peter Zimon a5fa4074e2 Removed test email function from Labs
no refs.
- removes leftover test email section from Labs to resolve a lot of confusion around it
2020-05-20 11:34:56 +02:00
Peter Zimon 51fc3008b2 Fixed FF dropdown visual bug
no refs.
- fixes double border visual bug in Firefox
2020-05-20 09:49:12 +02:00
Daniel Lockyer 208198c166 v3.16.1 2020-05-20 07:30:34 +01:00
Renovate Bot 9453b85d5d
Update dependency pretender to v3.4.3 2020-05-19 16:23:14 +00:00
renovate[bot] 7666935018
Update dependency ember-cli-babel to v7.20.0 (#1574)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-19 17:22:46 +01:00
Kevin Ansfield dc5549a265 Duplicated members screens for development experiments
no issue

- members screens will be undergoing heavy development to change how underlying data loading works
- duplicated all related screens and components so that development can occur behind the `enableDeveloperExperiments` flag without breaking the existing screens
- added "Members (dev)" link to the duplicate screens in nav bar when `enableDeveloperExperiments` is on
2020-05-19 16:18:30 +01:00
Aileen Nowak c87e01a433 Updated Pacific theme screenshot
no issue

Updated screenshot, as the theme look has changed
2020-05-19 14:10:35 +12:00
Daniel Lockyer 78e905e272 v3.16.0 2020-05-18 14:43:53 +01:00
Kevin Ansfield acb3624de3 Fixed saving of custom views expansion state
no issue

- if `user.accessibility` is `null` as it is for newly created users then toggling the expansion state of custom views menus failed to save because we were assuming there was an object available
2020-05-18 13:45:59 +01:00
Kevin Ansfield db8a53e8f5 Fixed initial animation of custom views expansion
no issue

- apply defaults during service initialisation so that `navigation.settings.expanded.posts` doesn't start out as "undefined" then transition to "true" on first render resulting in unnecessary animation in the sidebar
- speeds up acceptance tests which no longer need to wait for animation to complete before continuing
2020-05-18 13:42:01 +01:00
Kevin Ansfield f4524e0206 Fixed delete button in token select inputs
refs cc80214916

- ember-power-select switch to Glimmer components meant that our mousedown handler that was going through Ember's event bus was firing after the EPS events which trigger dropdown open/close and therefore not triggering the delete action
2020-05-18 13:33:21 +01:00
Kevin Ansfield d6058dbf27 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00
renovate[bot] 8dd6c5c5c0
Update dependency ember-infinity to v2.1.2 (#1573)
* Update dependency ember-infinity to v2.1.2
* updated gh-infinity-loader template to match ember-infinity default template

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-18 09:06:04 +01:00
renovate[bot] d8971b0996
Update dependency ember-source to v3.18.1 (#1571)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-18 08:01:48 +01:00
renovate[bot] 9420525bfa
Update dependency ember-useragent to v0.10.0 (#1572)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-18 07:57:36 +01:00