Page MenuHomePhabricator

[web] Refactor TypeaheadTooltip component
ClosedPublic

Authored by patryk on Aug 25 2023, 3:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 29, 5:16 AM
Unknown Object (File)
Tue, Oct 29, 3:25 AM
Unknown Object (File)
Mon, Oct 28, 7:08 PM
Unknown Object (File)
Oct 27 2024, 2:04 PM
Unknown Object (File)
Oct 15 2024, 8:28 PM
Unknown Object (File)
Sep 27 2024, 6:27 PM
Unknown Object (File)
Sep 27 2024, 6:27 PM
Unknown Object (File)
Sep 27 2024, 6:26 PM
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