Page MenuHomePhabricator

[web] Refactor TypeaheadTooltip component
ClosedPublic

Authored by patryk on Aug 25 2023, 3:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 26, 9:06 AM
Unknown Object (File)
Thu, May 16, 11:46 AM
Unknown Object (File)
Wed, May 1, 3:40 PM
Unknown Object (File)
Apr 3 2024, 8:40 AM
Unknown Object (File)
Mar 31 2024, 8:33 AM
Unknown Object (File)
Mar 31 2024, 8:30 AM
Unknown Object (File)
Mar 30 2024, 10:56 AM
Unknown Object (File)
Mar 30 2024, 10:55 AM
Subscribers

Details

Summary

This diff refactors TypeaheadTooltip component, like in D8897. New refactored component reuses new types introduced in that diff.

Depends on D8908.

Test Plan

Check if typeahead tooltip on web works properly.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

patryk held this revision as a draft.
patryk edited the test plan for this revision. (Show Details)
rohan requested changes to this revision.Aug 29 2023, 10:31 AM

Just 1 question inline, requesting changes so it doesn't get lost in the stack

web/chat/chat-input-bar.react.js
380–382 ↗(On Diff #30307)

Is there a reason these are imported and just passed in as props? Can they be imported directly in typehead-tooltip.react.js?

web/chat/typeahead-tooltip.react.js
28–33 ↗(On Diff #30307)

If you can just import them directly here, that'd remove the complexity in the props here.

This revision now requires changes to proceed.Aug 29 2023, 10:31 AM
web/chat/chat-input-bar.react.js
380–382 ↗(On Diff #30307)

This is because in the future, we might want to create another typeahead tooltip that renders buttons with a different style. I have provided an explanation for why it's worth considering this refactoring here.

rohan added inline comments.
web/chat/chat-input-bar.react.js
380–382 ↗(On Diff #30307)

Ah ok I guess it makes sense to make future work easier

This revision is now accepted and ready to land.Aug 30 2023, 10:23 AM