Commit Graph

5428 Commits

Author SHA1 Message Date
renovate[bot]
fa7ed0f8e8 Update dependency ember-composable-helpers to v4.1.0 (#1589)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 21:19:47 +01:00
Fabien O'Carroll
94c68bbaec Corrected url for Stripe Connect auth
no-issue

This was missed in the PR changes requests in Ghost.
2020-06-03 15:10:29 +02:00
Daniel Lockyer
f829476b59 v3.18.1 2020-06-02 18:07:38 +01:00
Renovate Bot
1d785968de Update dependency ember-cli-babel to v7.20.5 2020-06-02 15:40:27 +00:00
Daniel Lockyer
7be7580c9e v3.18.0 2020-06-02 15:22:02 +01:00
Fabien 'egg' O'Carroll
c4135d0b10 Added Stripe Connect UI (#1586)
no-issue

- Rendering is conditional on `stripeDirect` config being false.
- CSS downloaded from https://stripe.com/newsroom/brand-assets
- `stripe_connect_integration_token` is the setting to _set_ the
  stripe_connect_integration setting
2020-06-02 13:58:43 +02:00
Peter Zimon
7055d77df6 Fixed members list cell wrapping
no issues.
- sets members cells wrapping to avoid table cells overlapping
2020-06-02 12:30:11 +02:00
Kevin Ansfield
6c4e2adb14 Lock file maintenance
refs https://github.com/TryGhost/Ghost/issues/11868

- includes bump of `ember-basic-dropdown` that contains accessibility improvements
2020-06-02 09:01:06 +01:00
Kevin Ansfield
147943f3a3 Fixed members list/chart not updating after members import
no issue

- move members loading code into `members` controller so that it's more accessible to other areas of the app
- add `refreshData()` to the `members` controller which forces members list and stats to be re-fetched
- call `members.refreshData()` after successful upload of members import file
- store range/days in `membersStats` service so that it's remembered across refreshes and component renders
2020-06-01 15:48:46 +01:00
Peter Zimon
49214faf07 Added placeholder to impersonate URL
no issues.
- adds a placeholder value for impersonate URL field to avoid empty field while loading
- disables "Copy link" button until the actual URL is not loaded
2020-06-01 10:04:12 +02:00
Renovate Bot
49b28d4387 Update dependency ember-cli-babel to v7.20.4 2020-06-01 00:33:05 +00:00
Renovate Bot
35e7c0b349 Update dependency ember-cli-babel to v7.20.3 2020-05-29 15:48:44 +00:00
Renovate Bot
ab674fa739 Update dependency ember-cli-babel to v7.20.2 2020-05-29 13:49:53 +00:00
Renovate Bot
52921cb200 Update dependency ember-cli-babel to v7.20.1 2020-05-29 02:35:23 +00:00
Marco Zehe
59fcc567f1 🐛 Fixed various Close buttons throughout the UI. (#1585)
refs TryGhost/Ghost#11863

Some `a`tags with `href` attributes that are empty are used as buttons, but since the href is not linkifying anything, they appear as text nodes to assistive technologies. Give them a `"button"` role so it is guaranteed that assistive technologies will pick them up as actionable controls.
2020-05-28 17:11:21 +01:00
Marco Zehe
adb7828003 Various A11y post screen fixes (#1584)
refs #11863

* 🐛 Gave various buttons accessible labels

Hidden span elements are not rendered to assistive technologies, so duplicate the text in an aria-label on the button element.

* 🐛 Fixed various accessibility issues in the editor

* Made menus menus and menu item menuitems.
* Added labels to buttons where there were only hidden spans, or no text at all.
* Made separators show up for screen readers.
2020-05-28 16:01:09 +01:00
Marco Zehe
db527d27f3 🐛 Fixed various small accessibility problems in the admin screen (#1583)
refs #11863

* 🐛 Fixed accessible button label for showing and hiding custom post types.
* 🐛 Made the menu separators accessible.
* 🐛 Fixed the More item to be a button for assistive technologies.
2020-05-28 15:51:14 +01:00
Kevin Ansfield
9942fb337e Improved performance of members admin screens
no issue

- removes the "old" members screens
- swaps route names and links to point at the new members screens that were behind the experiments flag

Why are the new screens faster?

- only loads 50 members at once rather than every member in the database
- loads pages of members in as-needed whilst scrolling
- fetches member stats from the API rather than calculating locally
- caches members list and stats data for 60 seconds to avoid re-fetching when navigating to/from the members list
- moves search and filtering duties to the API rather than calculating locally
2020-05-28 13:35:53 +01:00
Kevin Ansfield
a76465b5ee 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
29b4d72939 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
1f3028d3ac 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
e5ef8bad9b 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
dd00161a0c 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]
56b6b164ff 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
05f7ec5dbe 🐛 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
bdd874c01b 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
514034d329 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
f7034c7e91 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
ff33eb978b 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
76b93c3be7 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
86702ed949 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
b7b6c4b1b7 v3.17.1 2020-05-26 15:55:45 +01:00
Kevin Ansfield
16d34725af 🐛 Fixed members import not showing upload modal
no issue

- template was not renamed correctly in a758d99dc7
2020-05-26 15:49:48 +01:00
Kevin Ansfield
91873d1857 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
f4c360b818 v3.17.0 2020-05-26 14:03:34 +01:00
renovate[bot]
780d8cdf8b 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
68fc08cce2 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
26f3d48f5d 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
0dbff6518d Update Test & linting packages 2020-05-25 11:16:25 +00:00
Kevin Ansfield
fb1c048f24 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
8c19ea9cf9 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
3a6550b7c4 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
59670d950b Update dependency ember-power-select to v4.0.2 2020-05-22 15:16:58 +00:00
Kevin Ansfield
03d4c55a8e Fixed dropdown styling for content filter and members chart timeframe
refs 654d373655

- `<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
18a910d2ab 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
7e7bca7ff0 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
5d59670ac3 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
5a1b3d90fb 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
f0e359be11 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
3cc10bfa83 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