Skip to content
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

DON-739 - Update Search Input Summary based on new designs #2078

Merged
merged 8 commits into from
Oct 2, 2024

Conversation

henrik-sky
Copy link
Contributor

Based on the new designs for the Date Selector, we need to make some slight changes to the Search Input Summary component.

Support there being no prefix and allowing for it to be read only.
I additionally had to make a modification deeper in BpkTextFieldImpl so that the clear button will appear even though it is read only (this is why there is the None prefix rather than it being optional).

I added the new case to the bottom of the screen in the app, see below.

Remember to include the following changes:

  • Component README.md
  • Tests

If you are curious about how we review, please read through the code review guidelines

@henrik-sky henrik-sky added the minor A new & backwards compatible feature/component label Aug 30, 2024
@henrik-sky henrik-sky force-pushed the donburi/DON-739_Search_Input_update branch from cb334f8 to 7fc3f7d Compare September 26, 2024 15:53
@@ -86,6 +86,7 @@ internal fun BpkTextFieldImpl(
minLines: Int = 1,
maxLines: Int = 1,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
isFocused: Boolean? = null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add this field? Can we always use the mutable interaction source instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We found it caused issues with the screen reader when changing the focus state programatically.

Before

date_selector_focus_requesters.mp4

After

date_selector_focus_property.mp4

placeholder = inputHint,
prefix = prefix,
status = BpkFieldStatus.Default,
clearAction = clearAction,
type = BpkTextFieldType.Search,
isFocused = type is BpkSearchInputSummaryType.ReadOnly && type.isFocused,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small thing here: I think it'd be better to change this condition to only set a non-null value for the ReadOnly type as the default input one should use the system focused state

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. I've updated 👍

@henrik-sky henrik-sky force-pushed the donburi/DON-739_Search_Input_update branch from 7fc3f7d to e94a353 Compare October 1, 2024 10:11
@marianeum marianeum merged commit 61cb939 into main Oct 2, 2024
6 checks passed
@marianeum marianeum deleted the donburi/DON-739_Search_Input_update branch October 2, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor A new & backwards compatible feature/component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants