-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Replaced react-select menu with headless ui menu source
and destination
buttons
#17664
Replaced react-select menu with headless ui menu source
and destination
buttons
#17664
Conversation
d1d5b29
to
fcc9c08
Compare
0d19973
to
e58c6e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that we have SidebarDropdown
and DropdownMenu
now in our codebase and they repeat a lot of the same styles and functionality.
Could SidebarDropdown
either be a DropdownMenu
or utilize DropdownMenu
to decrease the repeated code?
Good idea 😀 |
source
and destination
buttonssource
and destination
buttons
2c66591
to
e715bfb
Compare
source
and destination
buttonssource
and destination
buttons
9c86fe2
to
961ea4e
Compare
961ea4e
to
6caa5b7
Compare
d62198e
to
c1814a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a lot closer!
Instead of typing the individual properties on the options where we implement this, let's type the entire object. I left a comment where I saw this. After that, I'd say it looks good to me!
@@ -54,16 +58,18 @@ const SourceItemPage: React.FC = () => { | |||
|
|||
const connectionsWithSource = connections.filter((connectionItem) => connectionItem.sourceId === source.sourceId); | |||
|
|||
const destinationsDropDownData = useMemo( | |||
const destinationDropdownOptions = useMemo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const destinationDropdownOptions = useMemo( | |
const destinationDropdownOptions: DropdownMenuOptionType[] = useMemo( |
should enable us to remove the casting below ("button" as DropdownMenuElementType
and others)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
@@ -59,20 +63,22 @@ const DestinationItemPage: React.FC = () => { | |||
(connectionItem) => connectionItem.destinationId === destination.destinationId | |||
); | |||
|
|||
const sourcesDropDownData = useMemo( | |||
const sourceDropdownOptions = useMemo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const sourceDropdownOptions = useMemo( | |
const sourceDropdownOptions: DropdownMenuOptionType[] = useMemo( |
should enable us to remove the casting below (ie: "right" as DropdownMenuItemIconPositionType
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
267c486
to
42cb0e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Did not retest locally after the type change.
- Code refactoring - Added keyboard interaction
- Code refactoring - Added keyboard interaction
- Code refactoring - Added keyboard interaction
42cb0e3
to
e0e6794
Compare
…ation` buttons (#17664) * Replaced react-select menu with headless ui menu - Code refactoring - Added keyboard interaction
What
Closes #17501
How
Replaced react-select menu with headless ui menu
source
anddestination
buttonsreact-selcet
withheadless ui
Loom
Updated Loom with latest changes
https://www.loom.com/share/16412d05a4fc497392bc124ae3b5ef5a