Commit Graph

5618 Commits

Author SHA1 Message Date
Peter Zimon
2dfff367b9 Refined pre-validation of members import
no issues.
- removes email and Stripe duplicate customer ID check to focus validation that might affect the whole dataset
- applies visual style and refines copy
2020-06-18 10:30:15 +02:00
Nazar Gargol
131fd8fe2c Fixed failing test
refs ed98d89771
2020-06-18 18:11:15 +12:00
Nazar Gargol
ed98d89771 Added imported members csv data preview
no issue

- Adds a table representation of data present in a CSV file that is about to be imported. Allows to navigate through data to see how exactly the file would be parsed on server
2020-06-18 17:47:04 +12:00
Kevin Ansfield
da082fdbfb Gave members table a sticky header
no issue

- it's useful to be able to see the column headers anywhere in the list
- prep for having the table header toggle between normal and edit modes where having to scroll back up to the top of the page each time you want to toggle would be a poor experience
2020-06-17 17:37:32 +01:00
Daniel Lockyer
5378083cd0 v3.20.1 2020-06-17 17:13:05 +01:00
Kevin Ansfield
8950e46d49 Lock file maintenance 2020-06-17 13:29:14 +01:00
renovate[bot]
27aa339cde Update dependency ember-concurrency-decorators to v2 (#1610)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 10:30:45 +01:00
Kevin Ansfield
7331f8feed Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
renovate[bot]
643cc5f44c Update dependency ember-concurrency to v1.2.0 (#1609)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 08:57:25 +01:00
Daniel Lockyer
19bf9cedfa Added Slack build notifications
no issue
2020-06-16 22:06:11 +01:00
Daniel Lockyer
282ce16d2c Fixed error message in tests
no issue
2020-06-16 22:06:11 +01:00
Peter Zimon
e235f20f3e Updated members import validation warning design
no issues.
- changed warning style when import can still happen
- combines all warnings to a single section
- hides details for warnings behind an expandable list so that
- updated copy
2020-06-16 19:08:37 +02:00
renovate[bot]
2568089522 Update dependency ember-cli-string-helpers to v5 (#1608)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-16 13:31:51 +01:00
Kevin Ansfield
db1e18e59b Lock file maintenance 2020-06-16 13:22:45 +01:00
renovate[bot]
23d6cfd3d8 Update dependency ember-cli-babel to v7.21.0 (#1607)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-16 13:05:33 +01:00
renovate[bot]
51b8482abf Update dependency ember-composable-helpers to v4.2.1 (#1602)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-16 13:05:18 +01:00
Daniel Lockyer
a4441d779a v3.20.0 2020-06-16 11:55:57 +01:00
Nazar Gargol
fca6d3300d Renamed members import/export endpoints to match API changes
refs 5f00619d1a
2020-06-16 18:13:06 +12:00
Renovate Bot
736ca84c20 Update dependency ember-cli-string-helpers to v4.0.7 2020-06-15 17:45:11 +00:00
Kevin Ansfield
839ebb0b59 Fixed stripe connect persistent button and "unsaved changes" warnings
no issue

- hook template up directly to the `settings.stripeConnectIntegrationToken` value
- reset `settings.stripeConnectIntegrationToken` when leaving the labs route
  - without the reset, after a failed save other settings screens will show the "unsaved changes" warning
2020-06-15 17:43:02 +01:00
Peter Zimon
c389015b08 Made save Stripe settings button dynamic
no issues.
- shows/hides the "Save Stripe settings" button depending on the token value. This allows better focus and less distraction UX
2020-06-15 17:57:46 +02:00
Renovate Bot
99bcea0309 Update dependency @tryghost/kg-parser-plugins to v1.0.3 2020-06-15 12:20:54 +00:00
Kevin Ansfield
37de63e8cd Updated image card to store original width/height in payload
no issue

- extract width/height from selected local image when uploading and store in the payload with `src` once upload finishes
- capture width/height from Unsplash and store in the payload after selecting an image
2020-06-15 13:16:37 +01:00
Nazar Gargol
af648b8fb9 Hidden member import validation messages bahind the experiments flag
refs c3d141dd03

- The feature still needs polishing UI side and will move out of `enableDeveloperExperiments` flag once that's ready
2020-06-15 22:42:56 +12:00
Renovate Bot
3350cd5f94 Update dependency @tryghost/kg-clean-basic-html to v1.0.3 2020-06-15 08:23:14 +00:00
Hannah Wolfe
ff84b41f91 Adding INR currency support
- We have many customers asking for INR as there are special rules in Stripe for this currency
- As well as a desire for local-selling
- Meaning it's not valid to use e.g. USD instead
2020-06-12 15:17:22 +01:00
Nazar Gargol
095e29d83d Added imported member count to the "Import" button
no issue

- When importing members from CSV file this change shows total amount of members that will attempt to be imported
2020-06-13 00:51:19 +12:00
Kevin Ansfield
d14c432264 🐛 Fixed file inputs not allowing same file to be re-uploaded in Firefox
closes https://github.com/TryGhost/Ghost/issues/11707

- Firefox is different to every other browser and doesn't allow file input values to be reset by doing `input.value = null`
- outcome of reset not working is that Firefox won't trigger the change event when the same file is re-selected
- fixed by cloning the input element and replacing it
2020-06-12 13:45:28 +01:00
Nazar Gargol
c2d57820b3 Added Stripe customer id duplication detection for member import
no issue

- Added client side detection rule for Stripe's customer ids. Based on the check performed on the server side - cb26fd9305/core/server/api/canary/members.js (L43-L60)
- Also expanded check to a whole set of data as that should not be too slow of a check (did the same for emails). Kept the rest consistent to the data that is sent to the server for the check.
2020-06-13 00:23:58 +12:00
Nazar Gargol
fbf4952d14 Updated members import validation endpoint name
refs cb26fd9305

- Rename in line with the changes in referenced commit
2020-06-12 23:36:06 +12:00
Kevin Ansfield
16f4b1c9af Added all/free/paid filter to members admin screen (#1600)
requires https://github.com/TryGhost/Ghost/pull/11892

- adds `?paid` query parameter to members route that is tied to the `?paid` query param in the API request
- added all/free/paid members dropdown to members filter component
2020-06-12 12:12:27 +01:00
Fabien O'Carroll
fc74bed72a Updated isStripeEnabled to use stripeConnectIntegration
no-issue

This is now the central place for checking if stripe is configured for
members and we want to make sure that the Stripe Connect correctly
affects this value
2020-06-12 10:27:39 +02:00
Nazar Gargol
e2db84d23b Updated import results response handling with new error format
refs 7904c303a7

- Adds failed import records details to post members import screen
2020-06-12 20:01:46 +12:00
Nazar Gargol
060b0e759b Fixed isStripeEnabled usage in import validator tests
refs c63a0e6826

- Reason for the fix same as in the referenced commit
2020-06-12 18:28:15 +12:00
Nazar Gargol
c63a0e6826 Fixed isStripeEnabled call in member validator
no issue

- Method has been changed into a getter, code was missed to adjust
2020-06-12 17:44:58 +12:00
Nazar Gargol
c3d141dd03 Added improved validations for 2nd step of members import
no issue

- Adds validations for imported CSV data
- These checks include obvious validation checks for data - like if email addresses are valid, checking if Stripe configured when entries with stripe_customer_id are present and additional server-side validation for entries with stripe_customer_id to check if they appear in connected Stripe account
- The validation set is calculated by naive choosing of first 5, middle 5 and 5 tail records from imported set. This logic comes from observations that errors usually apear withing "test" records in the beggining or the end of the file. These selection rules might change in the future if we find a need for it.
- Adds papaparse CSV parser, which was chosen for it's maturity and relatively small minified size. In the future this library should be lazy-loaded to make the first page load UX nicer
2020-06-12 17:22:36 +12:00
Daniel Lockyer
7bf809449b v3.19.2 2020-06-11 19:55:43 +01:00
Peter Zimon
6a4db52205 Added success state for Stripe Connect
no issue
- adds success message when Stripe Connect is successfully set up
- automatically closes the setting section on success
2020-06-11 17:14:20 +02:00
Daniel Lockyer
2e11d235c0 v3.19.1 2020-06-11 15:43:03 +01:00
Renovate Bot
ef230e5a3e Update dependency @tryghost/kg-clean-basic-html to v1.0.2 2020-06-11 15:24:06 +01:00
Renovate Bot
fa03d9ebc0 Update dependency @tryghost/kg-parser-plugins to v1.0.2 2020-06-11 14:10:09 +00:00
Peter Zimon
cbc1c2a36e Added "Test mode" label UI to Stripe Connect
no issues.
- added label to indicate if the connected Stripe account is in test mode
2020-06-11 15:36:22 +02:00
Peter Zimon
f2bc57bbf5 Stripe connect design (#1603)
no issues

Updated and refined Stripe Connect design in Labs/Members settings:
- refined visuals and UI logic
- updated copy
- added switch for test mode
- added error handling
2020-06-11 15:15:44 +02:00
Nazar Gargol
67103be738 Fixed linting error for using this.get() in octane syntax
no issue

- Switched to getter as this.get() is not available in native classes
2020-06-12 00:46:04 +12:00
Nazar Gargol
fa9fc64b53 Removed stray debugger statement 2020-06-11 21:09:56 +12:00
Nazar Gargol
0a0ce4098d Refactored stripe configuration checks into separate service
no issue

- This logic is planned to be reused in more places, e.g. members import data validation. This change is meant to be a prep work for that.
- With stripe connect functionality coming it is important to have a central place checking for configured Stripe
2020-06-11 21:05:40 +12:00
Kevin Ansfield
8f5ccfe401 Fixed missing rename of <GhMembersFilter> in members.hbs 2020-06-09 23:22:43 +01:00
Kevin Ansfield
1836ff2631 Renamed <GhMembersContentFilter> to <GhMembersFilter> (fixed)
refs bae5497f1f

- adds the template rename that was missed in previous commit
2020-06-09 22:58:12 +01:00
Kevin Ansfield
bae5497f1f Renamed <GhMembersContentFilter> to <GhMembersFilter>
no issue

- "Content" referred to content as in posts/pages so the naming didn't make sense in the members filter component
2020-06-09 22:54:07 +01:00
Kevin Ansfield
758f5285fb Added access level filter to posts and pages lists in admin
no issue

- adds `visibility` query param to posts and pages controllers/routes that is tied to the `filter` query param used in API requests
- adds dropdown for selecting post/page visibility to `<GhContentFilter>`
2020-06-09 12:19:40 +01:00
Daniel Lockyer
1a69f391ea v3.19.0 2020-06-09 10:27:45 +01:00
Kevin Ansfield
cc4e02c938 Fixed delete-tag modal showing unexpectedly
no issue

- there was a race condition when deleting tags...
    - the delete tag modal's `close` action toggles the `showDeleteTagModal` property to `false`
    - the `deleteTag` action triggered when clicking the delete button was transitioning to the tags screen
    - if the transition occurs before the close action is triggered, the modal component is destroyed and it's close action is never triggered leaving the `showDeleteTagModal` property on the controller set to `true`
    - the next time the tag screen is accessed the delete tag modal is displayed because the `showDeleteTagModal` property is `true`
- adds an explicit reset of `showDeleteTagModal` after a tag is successfully destroyed
- makes open/close of the delete tag modal explicit actions so there's no ambiguity when toggling
2020-06-09 10:15:28 +01:00
Nazar Gargol
0395b63d63 Fixes labels duplicating themselves across lalbe inputs when unsaved
no issue

- Unsaved labels were still persisted in the store. This was causing unsaved labels reappearing on different instances and caused broken states
2020-06-09 20:31:09 +12:00
Kevin Ansfield
6c9aad0f5b 🐛 Fixed searchParam query param errors when deleting member labels
no issue

- error was "You passed the `searchParam` query parameter during a transition into members, please update to search"
- this was caused by the `reset-query-params` helper specifying `searchParam` as the query parameter which is the controller property name, not the query param name
2020-06-09 08:48:57 +01:00
Rish
3328a5f1ba Fixed incorrect "from" address save
refs https://github.com/TryGhost/Ghost/issues/11414

- From address input value was refactored but update was still using the old value
2020-06-09 11:52:09 +05:30
Rish
958bb65308 Added site domain for default from address
refs https://github.com/TryGhost/Ghost/issues/11414

- Appends blog domain as default for from address members setting
- Disabled update button when current from address is same as in field
2020-06-09 11:14:53 +05:30
Renovate Bot
cc1e092812 Update dependency ember-composable-helpers to v4.1.3 2020-06-08 22:37:49 +00:00
Rishabh Garg
01e72dc991 Allowed domain change for members "from" address (#1597)
refs TryGhost/Ghost#11414

- Restructures member settings in labs, from address gets its own section
- Removes explicit site domain for fromAddress as we allow updating the full address
- Adds new CTA to trigger magic link for updating members from address
- Adds new confirmation modal for email sent to new from address
- Adds notification banner for from address update redirect link
2020-06-09 01:52:58 +05:30
Renovate Bot
3ed7434b73 Update dependency ember-cli-mirage to v1.1.7 2020-06-08 17:31:43 +00:00
Kevin Ansfield
c8839bb0a2 Added display of server-side error message when bookmark request fails
closes https://github.com/TryGhost/Ghost/issues/11212

- store error message that is received from the server and remove the url from the context string for cleaner display
2020-06-08 17:40:33 +01:00
Rish
a40706ed28 Updated fix for staff user edit button using task button property
refs TryGhost/Ghost#11789

- Reverted 28fbc341af as we want to handle the state with css props instead of relying on specificity
- Updates fix for change password button on staff user edit screen to use task button props - 28fbc341af
2020-06-08 19:54:48 +05:30
Renovate Bot
a7eb66a50d Update dependency @tryghost/kg-parser-plugins to v1.0.1 2020-06-08 10:18:57 +00:00
Renovate Bot
8a04de9a83 Update dependency @tryghost/kg-clean-basic-html to v1.0.1 2020-06-08 08:03:17 +00:00
Kevin Ansfield
2942523d27 Removed ember-cli-chai in favour of direct ember-auto-import imports
no issue

- removes some deprecated babel plugins from our dependencies
2020-06-08 08:37:14 +01:00
Kevin Ansfield
99cdeb5076 Lock file maintenance 2020-06-08 08:25:29 +01:00
Kevin Ansfield
93515f3008 Display original url in bookmark card
refs https://github.com/TryGhost/Ghost/issues/11212
credit @devaman https://github.com/TryGhost/Ghost-Admin/pull/1478

- display the original url rather than the fetched url in order to preserve query params and redirects (useful for affiliate links)
2020-06-08 08:21:34 +01:00
renovate[bot]
369d2ba0df Update dependency @tryghost/kg-clean-basic-html to v1 (#1595)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-08 08:18:02 +01:00
renovate[bot]
767237b451 Update dependency @tryghost/kg-parser-plugins to v1 (#1596)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-08 07:57:27 +01:00
Renovate Bot
fe1c05dea2 Update dependency eslint to v7.2.0 2020-06-08 02:17:38 +00:00
Renovate Bot
6a97f1fdc9 Update dependency ember-composable-helpers to v4.1.2 2020-06-08 00:58:06 +00:00
Peter Zimon
8a88f31a91 Fixed test for member import dialog copy changes
no refs.
2020-06-05 15:41:00 +02:00
Peter Zimon
2b10a30a04 Refined copy for member import dialog
no issues.
- refined copy for member import start and end step screens
2020-06-05 15:03:43 +02:00
Nazar Gargol
a849ddda18 Updated members' import file validation logic
no issue

- The invalid file type error should be shown on the very first step of import and should not allow proceeding without selecting a correct file.
2020-06-06 00:48:09 +12:00
Peter Zimon
5a87520712 Refined members import dialog
no issue
- updated screen logic for member import
- added icons and refined styles for file upload dialog
2020-06-05 14:20:23 +02:00
Nazar Gargol
6bfe8e6490 Added separate stage to members import popup with support of labels
refs 633ba27f0e

- Import modal is now devided into separate stages with ability to specify labels which will be assigned to every member present in the dataset.
- Also adds explicit "Import" button without automatic import when the CSV file is selected
2020-06-05 22:57:07 +12:00
renovate[bot]
1d4a2282d7 Update dependency ember-data to v3.19.0 (#1593)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-05 11:12:11 +01:00
renovate[bot]
e2befc2520 Update dependency testem to v3.2.0 (#1592)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-05 10:58:14 +01:00
renovate[bot]
4094d705b3 Update dependency markdown-it to v11 (#1575)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-05 10:52:34 +01:00
Kevin Ansfield
2c16ef2f97 🐛 Fixed member list not updating when manually adding a new member
no issue

- always refresh members list/stats data when adding or saving a member from the members screen
2020-06-05 09:01:01 +01:00
Kevin Ansfield
3025ea21db 🐛 Fixed members list not updating after deleting a member
no issue

- force a full refresh of all members data when deleting rather than only forcing a refresh of the stats
2020-06-05 08:53:58 +01:00
Kevin Ansfield
7ac7e73a05 🐛 Fixed members list not refreshing after adding yourself
no issue

- passed in the `refreshData` action to the `<GhMembersNoMembers>` component and called it after creating the member
- converted `<GhMembersNoMembers>` to a glimmer component
2020-06-05 08:50:20 +01:00
Kevin Ansfield
7b49d05e96 Fixed no-shadow linting warnings in text-expansions.js
no issue

- part of gradual cleanup to remove linter warnings
2020-06-05 08:31:46 +01:00
Kevin Ansfield
45a8f6b609 Fixed tests
refs 142f322338

- updated tests to use `settings.shared_views` in place of `user.accessibility`
2020-06-04 21:43:54 +01:00
Kevin Ansfield
142f322338 Switched per-user custom views to shared custom views
requires fdeb7daf40

- swapped to using settings model for storing custom views instead of user accessibility field
- added conditional that checks current user is an admin/owner when displaying the manage custom views button in the content filter (only admins/owners can edit settings model)
  - passed `session.user` into the `<GhContentFilter>` component as an argument so that the conditional getter doesn't need to handle async user access
- fixed no-shadow linting error in settings service
2020-06-04 21:30:06 +01:00
Renovate Bot
3ed42656d6 Update dependency ember-composable-helpers to v4.1.1 2020-06-04 14:29:15 +00:00
Rish
68854e5358 Removed redundant auto reset for amp
no issue

- Auto reset is on by default, this got missed in last commit
2020-06-04 19:25:42 +05:30
Rish
85d1775608 Removed redundant reset value for task buttons
no issue

- Since task buttons by default have reset on now, we don't need to explicitly add it to individual buttons
2020-06-04 19:23:59 +05:30
Rish
28fbc341af 🐛 Fixed change password button state on staff screen
closes https://github.com/TryGhost/Ghost/issues/11789

- Invert css classes definitions for red/green buttons to allow the button to turn green for the success state

Credits - https://github.com/m1kl - https://github.com/TryGhost/Ghost-Admin/pull/1568
2020-06-04 18:44:38 +05:30
Rish
f198bb8a45 Enabled auto reset state for action buttons
no issue

- By default, action buttons had auto-reset off and reset had to be explicitly set
- Auto reset for action buttons is on by default now, and any button that should not reset should explicitly switch it off
2020-06-04 18:44:38 +05:30
Renovate Bot
b7ee0839d5 Update dependency fs-extra to v9.0.1 2020-06-04 00:25:50 +00:00
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
Kevin Ansfield
a758d99dc7 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
c899af36b4 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
055674af77 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
4f2ed1bcec 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
66781a32ca Fixed FF dropdown visual bug
no refs.
- fixes double border visual bug in Firefox
2020-05-20 09:49:12 +02:00
Daniel Lockyer
68a799dd92 v3.16.1 2020-05-20 07:30:34 +01:00
Renovate Bot
0268b402d9 Update dependency pretender to v3.4.3 2020-05-19 16:23:14 +00:00
renovate[bot]
f97fa03ff9 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
598a327d6e 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
6ab565e14e Updated Pacific theme screenshot
no issue

Updated screenshot, as the theme look has changed
2020-05-19 14:10:35 +12:00