patternfly / patternfly/patternfly-react

DatePicker - multiple validators should render separate helper texts

Open
#11,712 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Breaking change :boom: PF Team
Dominant language
TypeScript
Stars
862
Forks
392
Avg merge
4d 8h
Merged PRs (30d)
9

Description

Is this a new component or an extension of an existing one?
DatePicker

Describe the feature
Currently DatePicker renders only a single HelperText for errors, regardless of how many validators may be passed in. If multiple validators return a error string, each string is added to a single string state with an escaped newline between them, resulting in a single helper text item (with the intent being each validator string will be separated by a new line, but it doesn't seem like that is happening for me, i.e. it all gets rendered as a single line).

Instead we should create a new HelperText item for each validator that returns an error string so as to be less confusing if multiple errors are being rendered.

CC @andrew-ronaldson is this the intended behavior, or is there something else in mind for multiple validators returning error text?

Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
Include screenshots or links to Marvel or other mockups.

Any other information?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the DatePicker entry point and its current HelperText rendering and validator handling. Confirm how multiple validator error strings are represented, then make the completed behavior one separate HelperText item per returned error string and verify the DatePicker behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.