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: File input, file token group, and file dropzone components #3001

Merged
merged 23 commits into from
Nov 12, 2024

Conversation

katiegeorge
Copy link
Member

@katiegeorge katiegeorge commented Nov 11, 2024

Description

This pulls file input, file token group, and file dropzone out of internal and into the public folder.

It also updates file dropzone colors based on discussions with the visual design team.

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

Note: I decided to combine the external PRs to avoid merge conflicts and easier release.

Full plan:

  • File dropzone (internal)
  • File input (internal)
  • File token group (internal)
  • File dropzone (external) - this PR
  • File input (external) - this PR
  • File token group (external) - this PR
  • 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.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.30%. Comparing base (6539f15) to head (2eff922).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3001   +/-   ##
=======================================
  Coverage   96.30%   96.30%           
=======================================
  Files         771      776    +5     
  Lines       21820    21846   +26     
  Branches     7450     7452    +2     
=======================================
+ Hits        21013    21039   +26     
  Misses        799      799           
  Partials        8        8           

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

src/file-upload/internal.tsx Show resolved Hide resolved
props: {
showFileLastModified,
showFileSize,
showFileThumbnail,
Copy link
Member

Choose a reason for hiding this comment

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

Let's also add alignment and limit as props and something like useFilesLoading as metadata.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean by useFilesLoading? Is there an example you can share?

src/file-input/index.tsx Outdated Show resolved Hide resolved
import { applyDisplayName } from '../internal/utils/apply-display-name';
import { FileDropzoneProps } from './interfaces';
import InternalFileDropzone from './internal';
import { useFilesDragging } from './use-files-dragging';
Copy link
Member

Choose a reason for hiding this comment

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

Can we add metrics instrumentation to useFilesDragging (as a follow-up, I'd say)?

pages/file-input/simple.page.tsx Show resolved Hide resolved
pages/file-dropzone/container.page.tsx Outdated Show resolved Hide resolved
pages/file-dropzone/container.page.tsx Outdated Show resolved Hide resolved
pages/file-dropzone/container.page.tsx Outdated Show resolved Hide resolved
@katiegeorge katiegeorge changed the title feat: Files feat: File input, file token group, and file dropzone components Nov 12, 2024
@katiegeorge katiegeorge marked this pull request as ready for review November 12, 2024 18:30
@katiegeorge katiegeorge added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit 31cd27d Nov 12, 2024
38 checks passed
@katiegeorge katiegeorge deleted the kg/files-combo branch November 12, 2024 20:16
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.

2 participants