Commit Graph

53 Commits

Author SHA1 Message Date
Kevin Ansfield
543c44415d Switched member unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:11 +01:00
James Morris
4f8526fd77 Improving the members page on mobile
no issue
2022-09-01 13:09:23 +01:00
James Morris
2a198c367e Reverting back some changes to try and fix failed tests
no issue
2022-08-31 16:07:12 +01:00
James Morris
d5bf2027dc Improved the members table on mobile
no issue
2022-08-31 14:48:06 +01:00
Sanne de Vries
1306921cac 🎨 Updated Member page layout (#2271)
No issue

- Changed the Member details page to be more scalable and flexible, depending on whether creators are using subscriptions, emails, and stats.

* Hidden email stats on member detail page when subscriptions are off
* Hid subscription box on member details page when Stripe is not connected
* Updated copy and layout of member details page
* Updated old activity feed styles on member page
* Fixed padding issue for empty activity feed
* Fixed current and new activity feed
* Added Last seen to member details page behind feature flag
* Updated lint todo file
* Fixed spacing issue in member details
2022-03-01 15:57:57 +01:00
Gabriel Csapo
beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00
Rishabh
ca6de51cc5 Cleaned duplicate member settings form component
closes https://github.com/TryGhost/Team/issues/1039

- we had duplicate components for members setting form, `gh-members-settings-form` and `gh-members-settings-form-cp`, with the `-cp` version added as part of original tiers changes
- since are only using the "-cp" version now, the old form is now removed and cp version renamed to the original naming
2021-09-13 16:40:45 +05:30
Rishabh
03379544bd Added new label input dropdown on member detail behind filtering flag
closes https://github.com/TryGhost/Team/issues/977

A new label input dropdown was added behind filtering labs flag along with new filtering UI on members list screen, which includes member editing directly via the dropdown. This adds the same editing function to the members detail screen too behind the flag
2021-09-08 22:59:58 +05:30
Thibaut Patel
dc9c812d9c Renamed isAdmin/isOwner/isAdminOrOwner to reduce confusion
issue https://github.com/TryGhost/Team/issues/857

- The goal is to avoid testing for the owner role only is cases where we should be testing for the owner or admin role
- `isOwner` => `isOwnerOnly`
- `isAdmin` => `isAdminOnly`
- `isOwnerOrAdmin` => `isAdmin` (concerns now both Owner and Admins)
2021-07-12 14:55:56 +02:00
Rishabh
d3023e8b52 Added loading for assigning comped subscription to member
no refs

Adds loading indicator when member is being saved with new complimentary price
2021-05-19 23:18:20 +05:30
Rishabh
942ad319e8 Updated complimentary subscription assignment to member
no refs

With custom products, we added a new modal to add a complimentary price to a member. Since we want to handle the comp prices implicitly with new changes, this change updates the comp subscription assignment to a member directly without opening a modal, by using the old `comped` flag in API. The `comped` flag takes care of creating the right complimentary subscription for member.

In case a member already has a comped subscription, we hide the option to add another subscription.
2021-05-19 22:36:02 +05:30
Rishabh
67d0c94c40 Removed dev experiment flag for custom products
closes https://github.com/TryGhost/Team/issues/672

Custom products and prices were behind dev experiment flag as it was under active development over last couple of releases. Now that its coming out of development, this removes the dev flag for custom products changes.
2021-05-10 23:38:47 +05:30
Peter Zimon
96faf27ba8 Added mock member details component
Prepring for custom products we'll change the overall layout of member forms. This commit has a component that's loaded when dev flag is on for the new layout with mocked product data.
2021-04-15 17:58:35 +02:00
Peter Zimon
6e1b6a2618 Updated custom integration UI 2021-02-08 21:16:41 +01:00
Peter Zimon
78d23a2544 Admin UI: added global section grid 2021-02-08 17:22:53 +01:00
Peter Zimon
0ef70cb568 Updated member details page 2021-02-08 15:35:08 +01:00
Peter Zimon
5fbd01a237 Updated colors 2021-02-05 12:04:42 +01:00
Sanne de Vries
27cc99c907 Fixed issues for member details mobile view (#1807)
* Fixed issues for member details mobile view

No-ref

- Changed order to display feed at the bottom
- Displayed heading and value vertically between 1400px and 1160px
- Displayed "Complementary plan" copy and switch vertically between 1400px and 1160px
- Added margin below "Continue subscription" button
- Prevented date in feed to wrap

* fixed tests

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-16 10:04:33 +01:00
Sanne de Vries
2453f6afbd Added activity feed to member details screen (#1796)
closes https://github.com/TryGhost/Ghost/issues/12461

Design changes:
- added activity feed to member details page
- rearranged Stripe info to display on the right
- added toggle buttons for Stripe subscription and customer info
- added box to display activity feed for received and opened emails

Functionality changes:
- added `queryRecord()` to member adapter so `queryRecord('member', {id: x})` will hit `/members/:id/?query` instead of `/members/?id=x&query`
- updated member route to query member with `?include=email_recipients`
- added `EmailRecipient` model for access to event timestamps and email relationship setup
- added `<GhMemberActivityFeed>` component that accepts an `EmailRecipient` array and converts that into an activity list
- added support for `@model=emailInstance` to the email preview modal
- fixed a timing issue with email preview that could result in it showing blank content until the mobile/desktop toggle is used
- fixed sometimes blank member location

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-10 11:38:38 +00:00
Sanne de Vries
ecfb77b980 Added email stats overview to member details page (#1795)
refs https://github.com/TryGhost/Ghost/issues/12461

- Added "Emails received", "Emails opened", and "Avg. open rate" to member details
- Adjusted visual display of avatar, name and email. Made email a mailto link
- Rearranged Name and Email fields to reduce height
- Changed height of the notes textarea

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-09 13:26:00 +00:00
Rishabh Garg
6d4bcb205e Allowed Admin users to impersonate members (#1679)
closes TryGhost/Ghost#12126
depends on https://github.com/TryGhost/Ghost/pull/12132#pullrequestreview-469092171

- Previously, only Owner user was shown option to impersonate a member
- Grants Administrator user ability to impersonate a member
2020-08-18 14:19:12 +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
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
07f24e69f6 Reduced unnecessary waiting in tests
no issue

- fixed `<GhTaskButton>` not resetting after an externally triggered task run such as when pressing Cmd+S
- cleaned up manual timeouts/resets where button reset is now fully handled by `<GhTaskButton>` (these were causing 2.5s waits each time a save occurred in acceptance tests)
- where manual timeouts were required, reduce testing time from >2.5s to 50ms
2020-05-11 11:37:35 +01:00
Rishabh Garg
c3883d4c6f 💄Updated save buttons to reset state (#1522)
* Updated save buttons to reset state

no issue

Currently the save buttons across Admin don't auto-reset to idle state after success/failure on run which can give false impression once user changes any value. This PR auto-resets the button to idle state after a fixed timeout if no subsequent action is performed as a short term UX improvement.

* Fixed success check for auto reset

* Updated timeout value

* Added explicit save button reset for pages

* Updated save buttons to reset via shortcut

Auto-reset for save buttons wasn't working if not done through manual click on task button previously, this handles by splitting the original save task in controller to handle shortcut saves.

* Updated reset check for only successful tasks

* Added save reset to code-injection and design settings

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-04-06 16:17:28 +05:30
Peter Zimon
74b5327dbe Member geolocation design refinements
no refs.
- refined copy and styles for member list
- added geolocation data for member detail screen
2020-02-27 15:14:26 +01:00
Naz
ff4fd2fc9a Added member impersonation (#1497)
refs b0ff1e7cac

- Adds "impersonate" button which would be triggering a popup window with "login url" that allows to log in as a member
2020-02-27 11:50:15 +08:00
Rishabh Garg
d115204d9f Added labels for Members (#1477)
no issue

refs TryGhost/Ghost#11538

* Added members label handling v1

* Added members label dropdown in list screen

* Updated selected labels and member list UI refactor

* Added v1 label add/delete modal

* Added add label modal v1

* Fixed disabled check for new label save

* First stab at member filters layout

* Updated member detail screen design

* Member detail refinements

* Added basic editing for member labels

* Fixed label deletion from members list

* Updated filtered list header

* Refinements for dropdown and empty filter state

* Refined label modal

* Updated member labels fetch logic

* Added custom dropdown component for labels

* Refined style for dropdown

* Refined dropdown button

* Restructure and refine members dropdown styles

* Added selected indication to dropdown

* Fixed dropdown footer style

* Removed member label placeholder

* Removed add label from member list actions

* New label refinements

* Added confirmation modal for label delete

* Added duplicate validation check for labels

* Updated validation check with slug

* Updated copy

* Updated actions dropdown copy

* Fixed visual glitch of dropdown on FF

* Hide scrollbar for labels dropdown

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-02-14 15:04:01 +05:30
Kevin Ansfield
3c851293c1 Ran "no implicit this in templates" codemod
no issue

We were in a part-way state where some touched files had been (sometimes partially) migrated to explicit `this`. The codemod that was available has now fixed the formatting issues it had so it was a good time to run it.

https://github.com/ember-codemods/ember-no-implicit-this-codemod

- part of the migration path for https://github.com/emberjs/rfcs/pull/308
- starts to make template resolution rules more explicit
  - `<MyComponent />` - always a component
  - `{{my-component}}` - component or helper (components _must_ have a `-`. This style of component will go away once fully migrated to angle bracket components)
  - `{{value}}` - a helper or local template variable
  - `{{this.value}}` - reference to a property on the backing context (either a controller or a component JS file)
2019-12-13 14:20:29 +00:00
Kevin Ansfield
7d997d5c2d Fixed member count after deleting a member
no issue

- the member count is automatically calculated via the length of the live members array so there's no need to manually decrement it - if we do manually decrement then the count is off by one because the auto calculation runs to get the new value before the manual decrement
2019-12-13 11:38:37 +00:00
Kevin Ansfield
866d6eae9a 🐛 Fixed unsaved changes modal when using Cmd+S on tag/member screens
no issue

- keep a scratch model on the tag/member controllers rather than inside of the form components
  - allows the controller's `save` task to transfer scratch values to real values before saving
  - means that pressing Cmd+S whilst a field is still focused will save the expected value rather than the old value avoiding unsaved changes modals when trying to leave the screen when you think you've already saved
- fixed route and url not changing after saving a new member
- fixed error when clicking delete tag button
- cleaned up unused `showDeleteTagModal` actions
2019-12-13 11:37:01 +00:00
Kevin Ansfield
5585a781b9 Unified tag and member screen code
no issue

The tag and member screens share the same underlying UI/UX patterns but were using different code patterns. This brings both in line so that we have consistent code patterns that can be re-used for other screens.

- fixed cleanup of new tags by adding the `deactivate` hook to the `tag` route
- updated `member` and `member.new` route/controller setup to match tag route/controller setup
  - added `save` action to member controller so that Ctrl/Cmd+S works on member screen
  - updated tag route/controller to utilise the same instant display w/background refresh when accessing the tag details screen
- completed transition of non-component tag/members templates over to angle bracket component syntax
2019-12-12 13:59:46 +00:00
Naz Gargol
1df0e2b917 🎨 Added gravatars for member avatars (#1417)
no issue

- When an email has a valid gravatar handle it displays an image instead of initials for the member
- Introduces new {{gravatar}} helper which accepts an email as parameter and size/d as named parameters. The output is a URL to gravatar image
- Refactored usage of "splattribute" to explicit property. There was a need to duplicate class property usage in the component and doing that through splatttibute feature is unsafe as pointed ou here - https://github.com/TryGhost/Ghost-Admin/pull/1417#discussion_r351837584
2019-12-03 18:10:47 +07:00
Naz Gargol
c41c184762 Added member "add" screen (#1411)
no issue

- We have a need to create a member manually, this changeset solves this problem.
- Added new member button to the member's screen
- Needed to be able to perform add member action
- Fixed inconsistent `createAt` naming. All models use consistent `createdAtUTC`, fixed it up so that members model follows the same pattern. If we want to change this pattern should probably happen for all models at once
- Fixed member avatar when creating a new member. If the values are completely empty the screen ends up being filled with empty space. Added some dummy initials which are recalculated once the member enters the name or an email
- Refactored DS naming for consistency. Nowhere else in the codebase 'DS' name is ever used, made this consistent
- Added missing validations in members form
- Simplified if conditions in the member list template. When using the if/esle statements unnecessary new-line symbols were inserted which made it hard to test. Also by using computed property view is much cleaner
- Updated member's model default value for `subscribed` to "true". It is turned on by default in the model layer  on the backend (ref: https://github.com/TryGhost/Ghost/blob/3.1.0/core/server/data/schema/schema.js#L330), this behavior is intended and should be the same on the frontend
2019-11-28 18:30:21 +07:00
Kevin Ansfield
dd94a10890 Prevented enter key submitting misleading member details save request (#1380)
no issue

- `{{gh-task-button}}` was used inside a form but didn't have a `type="button"` property which meant the browser was treating it as a submit button and triggering the save action and related animation before the field's focus-out was called resulting in a save request before the scratch value is transferred to the model
- removed the submit action from the `<form>` element to prevent any other accidental triggers before scratch values have been transferred into real model values
2019-10-21 16:24:57 +01:00
Peter Zimon
22c2ce0cf6 Refined member details
no issue
- updated copy for member since date
- added note to note field
- added subscription value to plan data
2019-10-15 16:24:20 +02:00
Peter Zimon
b7f83fad2c Refined member list
no issue
- added list headings
- added active state to search field when it has value
- set position of actions dropdown
- refined avatar typography
2019-10-15 16:11:43 +02:00
Peter Zimon
e5c968c51f Updated member email font weight
no issue
2019-10-10 16:01:38 +02:00
Peter Zimon
1960c3d649 Updated member avatar initial fontsize
no issue
2019-10-10 15:59:21 +02:00
Rish
cb1c851f21 Added unsaved changes check to member details page
no issue

- Adds unsaved changes check to member detail page for write operations
2019-10-10 18:06:33 +05:30
Rish
5a609a785f Enabled write operation for member name and note
no issue

- Allows editing member's name and note in admin
2019-10-10 17:29:35 +05:30
Rish
58e11f7b33 Added loading state for member subscription details
no issue
2019-10-07 17:56:32 +05:30
Peter Zimon
8ac7500084 Refined member details screen
no issue
2019-10-05 12:41:47 +02:00
Peter Zimon
e542fcbca3 Updated member list and detail wording
no issue
2019-10-04 13:40:10 +02:00
Peter Zimon
ce50606529 Updated member details screen design
no issue
2019-10-03 13:46:36 +02:00
Rish
4a3fd90017 Updated members list/detail screens base structure
no issue
2019-10-02 17:05:57 +05:30
Rish
e49a12cfa0 Updated member detail screen design 2019-10-02 09:30:21 +05:30
Peter Zimon
c51bce7358 🎨 Updated admin area design and usability (#1232)
refs. https://github.com/TryGhost/Team/issues/205

Major update to Ghost Admin UI including:
- improved general consistency (typography, colors and contrast, UI components, icons)
- new design for post and pages lists, improved discoverability of filters 
- search moved to modal
- account menu is decoupled from ghost logo
- further usability fixes
2019-06-18 11:47:20 +01:00
Peter Zimon
7f8dd9e4bb Members refinements (#1163)
* Updated loading state for member detail plan data

* Code refinement for loading member plan data
2019-04-17 16:18:21 +02:00
Rishabh Garg
c72e7b6040 Updated member management data (#1150)
no issue

- Updated hard-coded data in member management to use real values from API
2019-04-16 20:32:43 +05:30