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

feat: added customizable text control to file input #2417

Merged
merged 7 commits into from
Jun 21, 2023

Conversation

werdnanoslen
Copy link
Contributor

@werdnanoslen werdnanoslen commented May 25, 2023

Summary

Adds property to FileInput component to allow text inside component to be customized. Before, it was hardcoded making it inappropriate for mobile and non-English contexts.

Related Issues or PRs

Resolves #2399

How To Test

  • Give custom text to either or both dragText and chooseText
  • Ensure all other file input functions behave as before

Screenshots (optional)

Screenshot 2023-05-25 at 14 52 17

@werdnanoslen werdnanoslen requested a review from a user May 25, 2023 21:08
@werdnanoslen werdnanoslen changed the title added customizable text control to file input feat: added customizable text control to file input May 25, 2023
Copy link
Contributor

@brandonlenz brandonlenz left a comment

Choose a reason for hiding this comment

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

Small things. Ping me to reapprove please. Looks great!

src/components/forms/FileInput/FileInput.stories.tsx Outdated Show resolved Hide resolved
src/components/forms/FileInput/FileInput.tsx Outdated Show resolved Hide resolved
src/components/forms/FileInput/FileInput.tsx Outdated Show resolved Hide resolved
@haworku haworku added the i18n Relates to internationalization or localization standards label Jun 6, 2023
@werdnanoslen
Copy link
Contributor Author

werdnanoslen commented Jun 6, 2023

Small things. Ping me to reapprove please. Looks great!

@brandonlenz Ping :)

@werdnanoslen werdnanoslen enabled auto-merge (squash) June 21, 2023 14:00
@werdnanoslen werdnanoslen merged commit 0a387be into main Jun 21, 2023
@werdnanoslen werdnanoslen deleted the an-fileinputtext-2399 branch June 21, 2023 14:15
id="file-input-single"
name="file-input-single"
dragText="Arrastre el archivo aquí o "
chooseText="elija de una carpeta"
Copy link
Contributor

Choose a reason for hiding this comment

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

@werdnanoslen FYI There's also error text - still a bit more english in this component looks for "This is not a valid file type.". I just saw this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, just missed it. Started a new issue

gidjin pushed a commit that referenced this pull request Jul 14, 2023
## [5.1.0](5.0.0...5.1.0) (2023-07-14)


### Features

* added customizable text control to file input ([#2417](#2417)) ([0a387be](0a387be))
* adds unbounded functionality to pagination ([#2418](#2418)) ([f9e7957](f9e7957))


### Bug Fixes

* a11y: adds css to hide search clear button that causes accessibility issues ([#2467](#2467)) ([d19527f](d19527f))
* added error param, test, story ([#2488](#2488)) ([42da85d](42da85d))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Relates to internationalization or localization standards
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Support internationalization and customization of the File Input's instructions
4 participants