Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-search-field] Added invalid red box for invalid search field #3981

Closed
wants to merge 6 commits into from

Conversation

udaymattam
Copy link
Contributor

@udaymattam udaymattam commented Nov 20, 2023

Summary

What was changed:
added invalid red box for invalid search field

Why it was changed:

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:
closed : #3973
UXPLATFORM-XXXX


Thank you for contributing to Terra.
@cerner/terra

@udaymattam udaymattam requested a review from a team as a code owner November 20, 2023 14:06
@udaymattam udaymattam self-assigned this Nov 20, 2023
@saket2403 saket2403 changed the title added invalid red box for invalid search field [terra-search-field] Added invalid red box for invalid search field Nov 21, 2023
Comment on lines 50 to 53
&.error-clear {
outline: var(--terra-search-field-focus-outline, 2px solid #e50000);
outline-offset: var(--terra-search-field-focus-outline-offset, 1px);
}
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 error outline on clear button. are these styles provided UX team ?

@supreethmr
Copy link
Contributor

PR description is too vague added invalid red box for invalid search field Why do we need red box for invalid search field ?

Looking at the Jira 3973, Ask was to highlight the search field with red outline when user enters invalid value. In this case PR should only have changes on doc-site and not on source code. Since search field provides a callback prop onInvalidSearch consuming applications should do error handling ( like displaying messages or changing color Or adding aria-invalid attribute for input) when onInvalidSearch is invoked.

example should update to pass required style changes to search field whenever they need. ( custom class names can be passed down through inputAttributes for search-field).

@sugan2416 sugan2416 self-requested a review November 23, 2023 04:37
@github-actions github-actions bot temporarily deployed to preview-pr-3981 November 23, 2023 13:28 Destroyed
@supreethmr
Copy link
Contributor

Why are we updating screenshots in this PR ..? As we can see PR has only doc example changes

@udaymattam
Copy link
Contributor Author

closing this PR changes will track under #3986 PR

@udaymattam udaymattam closed this Nov 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants