rill icon indicating copy to clipboard operation
rill copied to clipboard

Autocomplete and invite in Share Project Popover

Open lovincyrus opened this issue 6 months ago • 25 comments

Fixes ENG-732

This pull request introduces the functionality to search for and invite both emails and groups within the Share Project Popover.

https://github.com/user-attachments/assets/e772ad55-8997-49cd-ab5d-3abf6880360a

Checklist:

  • [ ] Covered by tests
  • [x] Ran it and it works as intended
  • [x] Reviewed the diff before requesting a review
  • [x] Checked for unhandled edge cases
  • [x] Linked the issues it closes
  • [ ] Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • [ ] Intend to cherry-pick into the release branch
  • [x] I'm proud of this work!

lovincyrus avatar May 31 '25 01:05 lovincyrus

Looks good!

Some feedback:

  • [x] When typing an email or group, can we maintain the tab to create email pill?

  • [x] Highlight the search box when it's active. See what's in production today: Screenshot 2025-06-02 at 9 27 34 AM

  • [x] Maintain the same font size as what's in production: Screenshot 2025-06-02 at 9 28 34 AM vs Screenshot 2025-06-02 at 9 28 46 AM

  • [x] In the dropdown, display avatar for each item (also, if a member is a guest, display the guest pil)

  • [x] Make sure that the dropdown box width matches the width of the search box

ericokuma avatar Jun 02 '25 16:06 ericokuma

Looks good!

Some feedback:

  1. When typing an email or group, can we maintain the tab to create email pill?
  2. Highlight the search box when it's active. See what's in production today:
Screenshot 2025-06-02 at 9 27 34 AM 3. Maintain the same font size as what's in production:

Screenshot 2025-06-02 at 9 28 34 AM vs Screenshot 2025-06-02 at 9 28 46 AM 4. In the dropdown, display avatar for each item (also, if a member is a guest, display the guest pil) 5. Make sure that the dropdown box width matches the width of the search box

fyi: This PR is still in draft.

lovincyrus avatar Jun 02 '25 17:06 lovincyrus

Latest demo:

https://github.com/user-attachments/assets/e772ad55-8997-49cd-ab5d-3abf6880360a

lovincyrus avatar Jun 03 '25 23:06 lovincyrus

This is ready for UXQA review @ericokuma

lovincyrus avatar Jun 03 '25 23:06 lovincyrus

Looks great!
Some feedback:

Screenshot 2025-06-03 at 5.07.38 PM.png
  • [x] Update placeholder text to say: "Search users, groups, or add emails, separated by commas"

  • [x] When there are more than 1 row of pills, the dropdown doesn't move along with the bottom edge of the search field

    my-rill-project overview - Rill - 3 June 2025

ericokuma avatar Jun 04 '25 00:06 ericokuma

This is ready for code review @ericpgreen2

lovincyrus avatar Jun 04 '25 00:06 lovincyrus

Ah dang…I guess the placeholder text is now too long with the font size change. Sorry to do this but let's revert back to what you had before

Screenshot 2025-06-04 at 11.27.47 AM.png

otherwise LGTM! @jkhwu?

ericokuma avatar Jun 04 '25 18:06 ericokuma

  • [x] I guess another thing I noticed is the search field height up larger than the invite button.

    Here's what it looked like before:
Screenshot 2025-06-04 at 12.02.24 PM.png
  • [x] And another thing I noticed is when the search field is blank, the role selector shouldn't be there:
Screenshot 2025-06-04 at 12.03.47 PM.png

ericokuma avatar Jun 04 '25 19:06 ericokuma

NIT: Admin role isn't right-aligned with the other roles

Screenshot 2025-06-04 at 6.06.02 PM.png

ericokuma avatar Jun 05 '25 01:06 ericokuma

my-rill-project overview - Rill - 4 June 2025

  • [x] Actually, General Access area should be fixed and everything scrolls underneath it. That might solve this

ericokuma avatar Jun 05 '25 01:06 ericokuma

@jkhwu UXQA:

  • [x] There should be hover states for the following:
    • [x] Link to docs
    • [x] Dropdown selector for the general access (invite only or everyone at) selector

ericokuma avatar Jun 05 '25 01:06 ericokuma

NIT: Admin role isn't right-aligned with the other roles

Screenshot 2025-06-04 at 6.06.02 PM.png

How do I replicate that? Here's what I'm seeing:

CleanShot 2025-06-05 at 10 04 41@2x

lovincyrus avatar Jun 05 '25 17:06 lovincyrus

  • Dropdown selector for the general access (invite only or everyone at) selector

~~What is the hover state for this? Can you link it or provide a screenshot?~~

Update: Found it

lovincyrus avatar Jun 05 '25 17:06 lovincyrus

Addressed the feedback above @ericokuma

lovincyrus avatar Jun 05 '25 17:06 lovincyrus

From @jkhwu, the last item is that the "invite" button should be enabled once a user starts typing something into the search:

in Prod:

Screenshot 2025-06-05 at 11.53.31 AM.png

in this PR:

Screenshot 2025-06-05 at 11.53.47 AM.png

Otherwise, LGTM!!

ericokuma avatar Jun 05 '25 18:06 ericokuma

From @jkhwu, the last item is that the "invite" button should be enabled once a user starts typing something into the search:in Prod:

Screenshot 2025-06-05 at 11.53.31 AM.png

in this PR:

Screenshot 2025-06-05 at 11.53.47 AM.png

We shouldn't do that. The invite button should only be available when a chip/pill is created from the users' input. We want to avoid submitting users' jibberish texts.

lovincyrus avatar Jun 05 '25 19:06 lovincyrus

While that's true, you could enter an actual email: [email protected] but if you didn't press the tab, comma, or space key, the invite button remains disabled. So it looks like it's broken

ericokuma avatar Jun 05 '25 19:06 ericokuma

While that's true, you could enter an actual email: [email protected] but if you didn't press the tab, comma, or space key, the invite button remains disabled. So it looks like it's broken

Ok, resolved!

lovincyrus avatar Jun 05 '25 19:06 lovincyrus

hmmm, the UX is not quite right. Could you reference what you've already built in production?

  1. Hitting invite triggers a loading state in the invite button
  2. Hitting invite doesn't first convert the string into pill
  3. Interestingly, there's some complex logic you built previously with regards to non-pill strings and the enablement/disablement of the invite button

ericokuma avatar Jun 05 '25 20:06 ericokuma

  • My avatar isn't rendering correctly image

I believe this is a known CORS issue in local dev.

lovincyrus avatar Jun 10 '25 18:06 lovincyrus

  • Typing one letter in the input element causes the height to expand. I'd expect the height to remain constant.

Nice catch, addressed!

lovincyrus avatar Jun 10 '25 19:06 lovincyrus

I believe this is a known CORS issue in local dev.

Are you sure? My avatar renders correctly in the top-right.

image

ericpgreen2 avatar Jun 12 '25 02:06 ericpgreen2

Clicking the "invite" button doesn't do anything for me here: Jam

ericpgreen2 avatar Jun 12 '25 02:06 ericpgreen2

I believe this is a known CORS issue in local dev.

Are you sure? My avatar renders correctly in the top-right.

image

CleanShot 2025-06-11 at 19 43 37@2x

lovincyrus avatar Jun 12 '25 02:06 lovincyrus

I have to say I'm very uneasy with how large the SearchAndInviteInput and ShareProjectPopover components are. Both of them could be decomposed into smaller-scoped, more approachable components. Are you sure you want to proceed as is?

I took another look at the files. I'd prefer to only turn them into reusable components, such as the table components (BasicTable, InfiniteScrollTable) in incremental efforts. I had previously created the ProjectUsergroupItem and OrgUsergroupItem list items prematurely. When we dropped the project user group and only focused on org user group in the latest user management designs, they became too tangled up, and it wasn't a straightforward effort. I'd rather the waves subside before we turn them into reusable components in the follow-ups.

Update: one component that I can decompose into smaller-scoped in the ShareProjectPopover is General access's dropdown.

Update: refactored some parts of ShareProjectPopover!

lovincyrus avatar Jun 18 '25 19:06 lovincyrus