This repository was archived by the owner on Sep 6, 2024. It is now read-only.
Portal-1135: Dropdown UI Component#99
Merged
Merged
Conversation
cfarmer-fearless
suggested changes
Oct 30, 2023
cfarmer-fearless
left a comment
Contributor
There was a problem hiding this comment.
Minor tweaks but looks good overall
| .dropdown-label-wrap { | ||
| display: flex; | ||
| flex-direction: row; | ||
| max-width: 18.125rem; |
Contributor
There was a problem hiding this comment.
Use units function instead of rem.
| cursor: pointer; | ||
| flex-direction: column; | ||
| margin-top: units("neg-05"); | ||
| max-width: 18.125rem; |
Contributor
There was a problem hiding this comment.
Use units function
| border-radius: 0.2rem; | ||
| position: relative; | ||
| background: #fff; | ||
| max-height: 18.125rem; |
Contributor
There was a problem hiding this comment.
Use units function
|
|
||
| dropdownItemOne.click(); | ||
|
|
||
| expect(screen.getByText("Item One")).toBeInTheDocument(); |
Contributor
There was a problem hiding this comment.
Instead of asserting that the item is in the document again after a click, you can create a function variable and assert that it was called.
|
|
||
| export interface DropdownProps { | ||
| label: string; | ||
| labelIcon?: React.ReactNode; |
Contributor
There was a problem hiding this comment.
Move optional prop down with rest of optional props.
| </div> | ||
| <div className={`dropdown-items ${dropdownOpen && "show"}`}> | ||
| {items.map((item: string, index: number) => { | ||
| return ( |
Contributor
There was a problem hiding this comment.
Can use shorthand here like items.map((...) => (<div>...</div>).
Contributor
|
Make sure the commits that are part of this PR get squashed into one commit with a "feat" prefix. |
ian-sawyer
force-pushed
the
isawyer/Portal-1135
branch
from
October 31, 2023 14:54
813e2ed to
a7f004a
Compare
cfarmer-fearless
approved these changes
Oct 31, 2023
cfarmer-fearless
pushed a commit
that referenced
this pull request
Nov 3, 2023
* feat: added dropdown component styles/update tests
cfarmer-fearless
pushed a commit
that referenced
this pull request
Nov 3, 2023
* feat: added dropdown component styles/update tests
This was referenced Nov 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Future Improvements:
Allow tabbing and enter key down to select dropdown items