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: FileInput component (internal) #2912

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

katiegeorge
Copy link
Member

Description

This PR is part one of multiple for file upload decomposition, to make the pull requests easier to review.

Full plan:

  • File input (internal) - this PR
  • File token group (internal)
  • File dropzone (internal)
  • PR to move all 3 out of /internal to make public
  • Adding file-upload variant to button group

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@katiegeorge katiegeorge requested a review from a team as a code owner October 21, 2024 21:27
@katiegeorge katiegeorge requested review from cansuaa and removed request for a team October 21, 2024 21:27
}

if (variant === 'icon' && !ariaLabel) {
warnOnce('FileInput', 'Aria label is required with icon variant.');
Copy link
Member Author

Choose a reason for hiding this comment

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

For reviewer: is this how we typically enforce a property that is only required in certain configurations? Should we throw an error instead?

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 92.59259% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.23%. Comparing base (6ac2909) to head (048b8df).

Files with missing lines Patch % Lines
src/internal/components/file-input/index.tsx 90.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2912    +/-   ##
========================================
  Coverage   96.23%   96.23%            
========================================
  Files         767      768     +1     
  Lines       21699    21720    +21     
  Branches     7363     7028   -335     
========================================
+ Hits        20882    20903    +21     
- Misses        764      809    +45     
+ Partials       53        8    -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant