Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Invitation flow #9928

Merged
merged 14 commits into from
May 22, 2024
Merged

Improve Invitation flow #9928

merged 14 commits into from
May 22, 2024

Conversation

MrFlashAccount
Copy link
Contributor

@MrFlashAccount MrFlashAccount commented May 13, 2024

Pull Request Description

Tl;dr 

Closes: enso-org/cloud-v2#1186
This PR significantly improves the invitation UX and add ability to view/resend/copy/delete invitations

Demo Presentation

CleanShot.2024-05-14.at.16.28.40.mp4


Context:

This Change:

What the change does in the larger context? Specific details to highlight for review:

  1. Redesign the Invitation dialog
  2. Add the ability to edit emails after typing
  3. Adds ability to use different separators: <space>, <semicolon>, <colon> or <newline>
  4. Shows Invitation on the members page in settings.
  5. Adds ability to remove, resend, copy or delete invitations
  6. Improve the UI of dialogs, buttons

Test Plan:

Go over how you plan to test it. Your test plan should be more thorough the riskier the change is. For major changes, I like to describe how I E2E tested it and will monitor the rollout.


Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@MrFlashAccount MrFlashAccount self-assigned this May 13, 2024
@MrFlashAccount MrFlashAccount added the CI: No changelog needed Do not require a changelog entry for this PR. label May 13, 2024
@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/improve-invitation branch 2 times, most recently from d67d0af to 7b83a0b Compare May 14, 2024 12:58
@MrFlashAccount MrFlashAccount marked this pull request as ready for review May 14, 2024 13:46
@somebody1234 somebody1234 added x-new-feature Type: new feature request g-dashboard labels May 15, 2024
Copy link
Collaborator

@somebody1234 somebody1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR passed (other than minor issues raised in comments).
QA not yet done

app/ide-desktop/lib/dashboard/src/tailwind.css Outdated Show resolved Hide resolved
@@ -254,15 +254,58 @@ export default class RemoteBackend extends Backend {

/** Invite a new user to the organization by email. */
override async inviteUser(body: backend.InviteUserRequestBody): Promise<void> {
const path = remoteBackendPaths.INVITE_USER_PATH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR I inlined the varible

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i mean that works, but separate path just makes it consistent with all the other endpoints in this file

[locale]
)

const isUserOnMembersPage = decodeURIComponent(search) === `?${membersSearchParams}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason this isn't passed as a boolean prop?

@somebody1234
Copy link
Collaborator

uhh

@somebody1234
Copy link
Collaborator

QA ❌ ("CSS.highlights is undefined" crashing the entire app the moment i press any key in the invite modal)

@somebody1234
Copy link
Collaborator

also remember to change Spaces to spaces

@somebody1234
Copy link
Collaborator

QA ❌

  • Note: QA performed on Electron as the modal is currently still crashing on Firefox.
  • ✔️ Emails in the "invite users" modal are now editable
  • ✔️ Pending invites are visible in the "members" settings tab
  • ⚠️ No warning when typing two of the same email in the input box. Maybe it shouldn't block sending invites, but IMO it should still be highlighted - e.g. in case the user copy-pasted an email because they plan to fill in the rest later (e.g. .group@example.com)
  • ⚠️ "Spaces" -> "spaces, commas or semicolons" - or "spaces, , or ;"
  • ❌ The font size of the success screen is way too big:
    • ⚠️ The entire list is surrounded by quotes. Either each individual email should be surrounded by quotes, or there should be no quotes at all.
  • ℹ️ Cannot mass delete invites. Maybe we should have a button to clear all pending invites?
    • Marked as ℹ️ because multi-select would require a major refactor and hence is probably out of scope.

image

  • ❌ The modal cannot be closed by clicking on the dimmed background
  • ❌ Username should be a separate column in the "members" table in the settings
  • ❌ You should not be able to remove yourself from the organization
    • ⚠️ Remove button should probably also always be red
  • ❌ No dimmed background for "invite" modal in "members" settings tab
    • ✔️ Clicking outside the modal hides the modal
  • ⚠️ Ideally, deleted invitations would be removed from the list optimistically
    • ⚠️ Deleting multiple invitations at once feels laggy

Minor UI nits:

  • ⚠️ The font size for the title is tiny for some reason
  • ⚠️ we should maybe make the close button red on hover? see the dashboard-122 branch (or related PR) for the specific color that is currently being used
  • The border radius of the buttons are a lot lower than those of the buttons everywhere else
    • The height of the buttons is also inconsistent

@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/improve-invitation branch 2 times, most recently from b5d518e to b8df31f Compare May 17, 2024 11:46
@MrFlashAccount
Copy link
Contributor Author

MrFlashAccount commented May 17, 2024

Addressing your QA remarks:

❌ Username should be a separate column in the "members" table in the settings

Why though?

❌ You should not be able to remove yourself from the organization

Currently, this button does nothing, I think we can tune up the behavior in this issue: https://github.com/enso-org/cloud-v2/issues/890

❌ No dimmed background for "invite" modal in "members" settings tab

Popovers do not dim background because basically, they are tooltips with rich content.

we should maybe make the close button red on hover

Not sure. I think generally we should use red color when we want to highlight irreversible actions like "Remove" or cancel. Closing the dialog isn't one of them.

@somebody1234
Copy link
Collaborator

Username should be a separate column
why?

for consistency - none of our other tables have multiline cells

Currently, this button does nothing

we have a dedicated button elsewhere for deleting the current user, and it comes with plenty of warning

Popovers do not dim background

in that case we might want an actual modal instead - the "invite users" dialog is something that:

  • should take the user's focus, and
  • should either be addressed immediately (or closed immediately)

Closing the dialog isn't an irreversible action

oh, i meant the traffic light in the top left, so that it matches the macos traffic lights

@MrFlashAccount
Copy link
Contributor Author

for consistency - none of our other tables have multiline cells

We'll have then an empty cell for invitations, which is strange.

in that case we might want an actual modal instead - the "invite users" dialog is something that:

Okay

oh, i meant the traffic light in the top left, so that it matches the macos traffic lights

Good idea 👍

@MrFlashAccount
Copy link
Contributor Author

No warning when typing two of the same email in the input box. Maybe it shouldn't block sending invites, but IMO it should still be highlighted - e.g. in case the user copy-pasted an email because they plan to fill in the rest later (e.g. .group@example.com)

We just ignore duplicates, not sure we need to warn users...

@MrFlashAccount
Copy link
Contributor Author

we have a dedicated button elsewhere for deleting the current user, and it comes with plenty of warning

Thanks for noticing, will take a look once when we'll work on this feature. Ideally, I think, we should merge the behavior.
But for invitations - I think it's safe if we delete without confirmation (We can create a new invitation anytime)

@MrFlashAccount
Copy link
Contributor Author

I think I've addressed most of the issues and PR is ready for re-QA

@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/improve-invitation branch from aa03b2f to c0b9c43 Compare May 20, 2024 14:10
@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/improve-invitation branch from c0b9c43 to 02c8640 Compare May 22, 2024 11:38
@PabloBuchu
Copy link
Contributor

  1. Go to members page is not working (nothing happens)
  2. Secondly if GET /invites is not ending with success it hangs Enso. I am on solo so backend responds with 403 but if I reload I dont see Enso only periodically re issued get invites request
Screen.Recording.2024-05-22.at.14.11.15.mov

Copy link
Contributor

@PabloBuchu PabloBuchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@PabloBuchu PabloBuchu added the CI: Ready to merge This PR is eligible for automatic merge label May 22, 2024
@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/improve-invitation branch from 50b3e3d to e457804 Compare May 22, 2024 16:40
@MrFlashAccount MrFlashAccount removed the CI: Ready to merge This PR is eligible for automatic merge label May 22, 2024
@MrFlashAccount MrFlashAccount added the CI: Ready to merge This PR is eligible for automatic merge label May 22, 2024
@mergify mergify bot merged commit 58ae73d into develop May 22, 2024
36 checks passed
@mergify mergify bot deleted the wip/sergeigarin/improve-invitation branch May 22, 2024 18:26
@@ -237,6 +237,8 @@

--menu-entry-padding: 0.25rem;

--delete-color: rgba(243 24 10 / 87%);
--cta-color: rgb(250, 108, 8);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this causes issues with overriding opacity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge g-dashboard x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants