1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

1996 commits

Author SHA1 Message Date
Nazar Gargol
d57154aaab 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
d52a1cf2bb Removed stray debugger statement 2020-06-11 21:09:56 +12:00
Nazar Gargol
4c138268ff 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
443364c619 Fixed missing rename of <GhMembersFilter> in members.hbs 2020-06-09 23:22:43 +01:00
Kevin Ansfield
4a758c7a5f Renamed <GhMembersContentFilter> to <GhMembersFilter> (fixed)
refs c5d718dee9

- adds the template rename that was missed in previous commit
2020-06-09 22:58:12 +01:00
Kevin Ansfield
c5d718dee9 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
24bf414cc3 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
Kevin Ansfield
49700d9b64 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
c1866ed3ec 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
d8ddf4ee2e 🐛 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
2ae388504b 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
c16381bb42 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
Rishabh Garg
1e7c80a1da
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
Rish
7fde2e1aac Updated fix for staff user edit button using task button property
refs TryGhost/Ghost#11789

- Reverted aaac414745 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 - aaac414745
2020-06-08 19:54:48 +05:30
Peter Zimon
563c740a42 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
bc72f6eb3c 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
b64f2679c5 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
035d79d56f 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
Kevin Ansfield
1635a34e4b 🐛 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
ff565a369c 🐛 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
b75f5965d3 🐛 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
4a53587f3b 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
Rish
a258e8ad15 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
4ed4f71c71 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
aaac414745 🐛 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
36fa9dc32c 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
Fabien O'Carroll
1db5968131 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
Fabien 'egg' O'Carroll
c17612e3d1
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
342d8dd686 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
ef491730d8 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
8867c364ff 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
Marco Zehe
263724dc83
🐛 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
52b53d068b
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
ef56dbfad9
🐛 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
3da16a8c32 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
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
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
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
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
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
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