Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

(feat) add autocompletion for repo meta creation page#51982

Merged
erzhtor merged 16 commits intomainfrom
erzhtor/add-autocompletion-for-repo-meta-creation-page
May 23, 2023
Merged

(feat) add autocompletion for repo meta creation page#51982
erzhtor merged 16 commits intomainfrom
erzhtor/add-autocompletion-for-repo-meta-creation-page

Conversation

@erzhtor
Copy link
Contributor

@erzhtor erzhtor commented May 16, 2023

Part of https://github.com/sourcegraph/pr-faqs/issues/96.

Test plan

Screenshot

Screen.Recording.2023-05-16.at.16.59.26.mov

@erzhtor erzhtor requested review from a team, ryphil and toolmantim May 16, 2023 11:21
@erzhtor erzhtor self-assigned this May 16, 2023
@cla-bot cla-bot bot added the cla-signed label May 16, 2023
@sourcegraph-buildkite
Copy link
Collaborator

sourcegraph-buildkite commented May 16, 2023

Bundle size report 📦

Initial size Total size Async size Modules
0.04% (+1.04 kb) -0.01% (-1.68 kb) -0.02% (-2.72 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 447770c and 0ed8fe3 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 16, 2023

📖 Storybook live preview

Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

So great to see this come to life! Nice work.

I can see the auto-complete highlighting immediately as you type, but the filtering happens after a debounce/delay. I think people expect things to be more immediate, vs waiting to pause? Batching/delaying/trailing input is probably okay, but waiting for input to pause seems a bit old-school. Could we make the filtering immediate too?

Could we sort the auto-complete options same as we do the list?

I like what you've done with the key:value auto-complete, and I listened to you and @ryphil discuss the pros and cons in the call recording. But I think we should change it to autocomplete for key only on the key input. And values for the values input (but scoped based on the key, or no autocomplete if no key is set). I think this aligns more to people's existing experience with autocomplete, vs having to learn this other way of it working (autocomplete affecting two inputs).

And finally… I spotted one bug, but I've no idea how I made it happen. For this "oss" tag it's appearing twice in the autocomplete 🤔

Screenshot 2023-05-18 at 10 41 43 pm

@erzhtor erzhtor force-pushed the erzhtor/add-autocompletion-for-repo-meta-creation-page branch from 60a487c to 1651f33 Compare May 19, 2023 15:34
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 19, 2023

Codenotify: Notifying subscribers in OWNERS files for diff d71c4a8...447770c.

No notifications.

@erzhtor
Copy link
Contributor Author

erzhtor commented May 19, 2023

Thanks @toolmantim for the review and feedback!

I can see the auto-complete highlighting immediately as you type, but the filtering happens after a debounce/delay. I think people expect things to be more immediate, vs waiting to pause? Batching/delaying/trailing input is probably okay, but waiting for input to pause seems a bit old-school. Could we make the filtering immediate too?

I intentionally used debouncing, to not overload backend with suggestion queries. But I agree that probably it would be better to make it more instantenous, so changed to throttle approach.

Could we sort the auto-complete options same as we do the list?

I used sorting based on particular key:value pair usage count, so if the meta is used in more repos, it will appear higher in rank. However with separate key and value suggestion approach it make sense to just order alphabetically I think, updated.

I like what you've done with the key:value auto-complete, and I listened to you and @ryphil discuss the pros and cons in the call recording. But I think we should change it to autocomplete for key only on the key input. And values for the values input (but scoped based on the key, or no autocomplete if no key is set). I think this aligns more to people's existing experience with autocomplete, vs having to learn this other way of it working (autocomplete affecting two inputs).

Got it. I agree that your suggestion probably is more UX friendly, updated accordingly.

And finally… I spotted one bug, but I've no idea how I made it happen. For this "oss" tag it's appearing twice in the autocomplete 🤔

Should be fixed with new separate key & value suggestion filters. P.S: It seems that previously form was submitting empty string to value, which made oss:null and oss:"" as not equal. I push a migration to clear all empty values to null and add empty string constraint to create/update meta APIs.

I also, changed input forms to put in a single line, because key:value are usually short and thought to make form more compact. But let me know if you disagree.

Screen.Recording.2023-05-19.at.21.33.16.mov

Would appreciate if you could re-take a look.

@erzhtor erzhtor requested a review from toolmantim May 19, 2023 15:42
@erzhtor erzhtor force-pushed the erzhtor/add-autocompletion-for-repo-meta-creation-page branch from 7bb9f74 to cc8eb67 Compare May 22, 2023 11:13
@erzhtor erzhtor requested a review from camdencheek May 22, 2023 11:22
@erzhtor erzhtor force-pushed the erzhtor/add-autocompletion-for-repo-meta-creation-page branch from 087f493 to e0388d4 Compare May 22, 2023 11:24
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Looks great! 🙌🏼

@erzhtor erzhtor force-pushed the erzhtor/add-autocompletion-for-repo-meta-creation-page branch from e0388d4 to ae31244 Compare May 22, 2023 13:35
@erzhtor erzhtor force-pushed the erzhtor/add-autocompletion-for-repo-meta-creation-page branch from 4427d43 to 447770c Compare May 22, 2023 14:16
@erzhtor erzhtor merged commit 9bdd3f8 into main May 23, 2023
@erzhtor erzhtor deleted the erzhtor/add-autocompletion-for-repo-meta-creation-page branch May 23, 2023 07:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants