-
Notifications
You must be signed in to change notification settings - Fork 371
fix: changed the button lable from Upload to Browse #9275
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
Conversation
Preview: https://patternfly-react-pr-9275.surge.sh A11y report: https://patternfly-react-pr-9275-a11y.surge.sh |
packages/react-core/src/components/MultipleFileUpload/MultipleFileUploadButton.tsx
Outdated
Show resolved
Hide resolved
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.
see inline comment
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.
It'd also be worth including a check to ensure either an aria-label or label is passed in. Our NavGroup component has a console warn for something similar
packages/react-core/src/components/MultipleFileUpload/MultipleFileUploadButton.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/MultipleFileUpload/MultipleFileUploadButton.tsx
Outdated
Show resolved
Hide resolved
…ternfly-react into tarun_samanta/#9274
packages/react-core/src/components/MultipleFileUpload/MultipleFileUploadButton.tsx
Outdated
Show resolved
Hide resolved
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.
In addition to the above, since MultipleFileUploadButton is only rendered internally within MultipleFileUploadMain and not exported we'll need to update the MultipleFileUploadMain component to add the new prop and pass it in to where <MultipleFileUploadButton />
is rendered.
Might be better to rename the new label
prop to browseButtonText
since that'd be more descriptive within MultipleFileUploadMain.
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.
This is looking good! The test file needed the prop updated. As mentioned above, could you also add the browseButtonText
prop to the MultipleFileUploadMain component (we could give it the same default value of "Upload"). Then you'll want to pass MultipleFileUploadMain's browseButtonText
prop into line 40ish where we're rendering <MultipleFileUploadButton />
.
...ges/react-core/src/components/MultipleFileUpload/__tests__/MultipleFileUploadButton.test.tsx
Outdated
Show resolved
Hide resolved
if everything has been done for this PR, then please merge. if any changes are required then please let me know. |
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.
Thanks for working on this!
* fix: changed the button lable from Upload to Browse * change button label from hardcoded text to props element * passes label as Browse * Update MultipleFileUploadMain.tsx * made changes as per your requirements * follow-up * follow-up * follow-up
* fix(Toolbar): resolved typeerror on full page demo (#9355) * chore(TreeView): converted examples to TS (#9286) * fix(ExpandableSection): added ARIA attributes (#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (#9293) * fix(chore): Fix deprecated wizard integration tests (#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> * Rebase postv5 (#9393) * chore(deps): bump docs framework (#9370) * chore(docs): Updated screenshots (#9337) * chore(docs): Updated screenshots * updated screenshots after logo update --------- Co-authored-by: Titani <[email protected]> * chore(release): releasing packages [ci skip] - @patternfly/[email protected] * chore(deps): bump to latest chore version (#9389) * chore(deps): bump to latest chore version * bump to 16 * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] * fix(fileupload): use default readonly text input instead of plain (#9387) * fix(fileupload): use default readonly text input instead of plain * chore(build): snaps * fix(CodeEditor): prevent clicks in textarea from opening fileupload (#9385) * fix(toolbar): added chip container class to toolbar content (#9379) * feat(Menu): added support for tooltips to menu (#9382) * fix(whitespace): Update readme to trigger release * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] * fix(Toolbar): resolved typeerror on full page demo (#9355) * chore(TreeView): converted examples to TS (#9286) * fix(ExpandableSection): added ARIA attributes (#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (#9293) * fix(chore): Fix deprecated wizard integration tests (#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> --------- Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: Eric Olkowski <[email protected]> * feat(MenuItem): allow target and rel on links (#9294) * feat(MenuItem): allow target and rel on links * update desc * move desc to right prop * chore(deps): update dependency lint-staged to v13.2.3 (#9335) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(JumpLinks) href does not work properly (#9307) * chore(deps): update dependency eslint to v8.42.0 (#9236) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(SelectToggle): corrected removeEventListener on unmount for v5 (#9380) * fix(Page) allow change of main tag (#9296) * fix(Page) allow change of main tag * rename prop and add it to render method * change prop name and description * update description * Reverted prop name --------- Co-authored-by: Eric Olkowski <[email protected]> * fix(AlertActionLink) support ReactNode as child (#9278) * fix(AlertActionLink) support ReactNode as child * add test * update prop type and description * update test * fix: changed the button lable from Upload to Browse (#9275) * fix: changed the button lable from Upload to Browse * change button label from hardcoded text to props element * passes label as Browse * Update MultipleFileUploadMain.tsx * made changes as per your requirements * follow-up * follow-up * follow-up * fix snaphots --------- Co-authored-by: Eric Olkowski <[email protected]> Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: kmcfaul <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dominik Petřík <[email protected]> Co-authored-by: Eric Olkowski <[email protected]> Co-authored-by: Tarun Samanta <[email protected]>
* fix(Toolbar): resolved typeerror on full page demo (patternfly#9355) * chore(TreeView): converted examples to TS (patternfly#9286) * fix(ExpandableSection): added ARIA attributes (patternfly#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (patternfly#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (patternfly#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (patternfly#9293) * fix(chore): Fix deprecated wizard integration tests (patternfly#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> * Rebase postv5 (patternfly#9393) * chore(deps): bump docs framework (patternfly#9370) * chore(docs): Updated screenshots (patternfly#9337) * chore(docs): Updated screenshots * updated screenshots after logo update --------- Co-authored-by: Titani <[email protected]> * chore(release): releasing packages [ci skip] - @patternfly/[email protected] * chore(deps): bump to latest chore version (patternfly#9389) * chore(deps): bump to latest chore version * bump to 16 * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] * fix(fileupload): use default readonly text input instead of plain (patternfly#9387) * fix(fileupload): use default readonly text input instead of plain * chore(build): snaps * fix(CodeEditor): prevent clicks in textarea from opening fileupload (patternfly#9385) * fix(toolbar): added chip container class to toolbar content (patternfly#9379) * feat(Menu): added support for tooltips to menu (patternfly#9382) * fix(whitespace): Update readme to trigger release * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] * fix(Toolbar): resolved typeerror on full page demo (patternfly#9355) * chore(TreeView): converted examples to TS (patternfly#9286) * fix(ExpandableSection): added ARIA attributes (patternfly#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (patternfly#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (patternfly#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (patternfly#9293) * fix(chore): Fix deprecated wizard integration tests (patternfly#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> --------- Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: Eric Olkowski <[email protected]> * feat(MenuItem): allow target and rel on links (patternfly#9294) * feat(MenuItem): allow target and rel on links * update desc * move desc to right prop * chore(deps): update dependency lint-staged to v13.2.3 (patternfly#9335) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(JumpLinks) href does not work properly (patternfly#9307) * chore(deps): update dependency eslint to v8.42.0 (patternfly#9236) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(SelectToggle): corrected removeEventListener on unmount for v5 (patternfly#9380) * fix(Page) allow change of main tag (patternfly#9296) * fix(Page) allow change of main tag * rename prop and add it to render method * change prop name and description * update description * Reverted prop name --------- Co-authored-by: Eric Olkowski <[email protected]> * fix(AlertActionLink) support ReactNode as child (patternfly#9278) * fix(AlertActionLink) support ReactNode as child * add test * update prop type and description * update test * fix: changed the button lable from Upload to Browse (patternfly#9275) * fix: changed the button lable from Upload to Browse * change button label from hardcoded text to props element * passes label as Browse * Update MultipleFileUploadMain.tsx * made changes as per your requirements * follow-up * follow-up * follow-up * fix snaphots --------- Co-authored-by: Eric Olkowski <[email protected]> Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: kmcfaul <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dominik Petřík <[email protected]> Co-authored-by: Eric Olkowski <[email protected]> Co-authored-by: Tarun Samanta <[email protected]>
What: Closes #9274
Issue Description:
The 'Upload' button text in the 'File upload - multiple' PF component is hardcoded and cannot be changed.
I expect to be able to change the button text. E.g., label it as 'Browse' instead of 'Upload'.
Currently, this is not a blocker.
I am trying to use this component for a feature in Apicurio Registry. We are expecting to implement this feature in Q4.
Additional issues: