-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow borderless SearchBox.ExpandButton
#2238
Merged
Merged
Conversation
This file contains 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
This reverts commit 77934e4.
r100-stack
requested review from
mayank99 and
smmr-dn
and removed request for
a team
September 16, 2024 21:17
r100-stack
commented
Sep 16, 2024
mayank99
reviewed
Sep 16, 2024
mayank99
reviewed
Sep 17, 2024
mayank99
approved these changes
Sep 17, 2024
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.
LGTM
smmr-dn
approved these changes
Sep 17, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Goal of this PR is to allow a borderless
SearchBox.ExpandButton
during the collapsed state. This should be supported sinceSearchBox.ExpandButton
is essentially anIconButton
. However, it doesn't happen so far even with addingstyleType="borderless"
toSearchBox.ExpandButton
since the border that on the container is never removed.I first thought to add a new
styleType
prop toCollapsedState
. When this prop isborderless
, it sets a data attribute iniui-expandable-searchbox
. Presence of this attribute will remove its border and the background. However, to decrease the complexity of the API, @mayank99 suggested to try to avoid adding a new prop.The current approach I'm using is to directly hide the border and background on
iui-expandable-searchbox
when it's collapsed. No visual change should be perceived as the same background and border now come from theExpandButton
instead.Collapsed state (before and after are the same)
Users using the
SearchBox
in ways that we haven't demoed in our examples may notice some change after this PR. However, after discussing with @mayank99, we concluded that those custom cases are uncommon and also unlikely to be useful for users.Testing
Added a story and thus a visual test. Since this PR mainly adds a visual change using css styles, I felt no unit or e2e tests were necessary.
Docs
@itwin/itwinui-css
and@itwin/itwinui-react
.