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

POC: FileUpload download attribute #1938

Draft
wants to merge 4 commits into
base: usability-testing-feb-25
Choose a base branch
from

Conversation

stowball
Copy link
Contributor

@stowball stowball commented Jan 30, 2025

This demo adds the download attribute to existing file lists so the files download instead of opening in a new tab.

Ultimately, this should be an option per instance/file.

View preview

Checklist

Preflight

  • Prefix the PR title with the slug of the package or component - e.g. accordion: Updated padding or docs: Updated header links
  • Describe the changes clearly in the PR description
  • Read and check your code before tagging someone for review
  • Create a changeset file by running yarn changeset. Learn more about change management.

Testing

  • Manually test component in various modern browsers at various sizes (use Browserstack)
  • Manually test component in various devices (phone, tablet, desktop)
  • Manually test component using a keyboard
  • Manually test component using a screen reader
  • Manually tested in dark mode
  • Component meets Web Content Accessibility Guidelines (WCAG) 2.1 standards
  • Add any necessary unit tests (HTML validation, snapshots etc)
  • Run yarn test to ensure tests are passing. If required, run yarn test -u to update any generated snapshots.

Documentation

  • Create or update documentation on the website
  • Create or update stories for Storybook
  • Create or update stories for Playroom snippets

Creating new component

  • Add documentation for the component (docs/overview.mdx and docs/code.mdx at a minimum)
  • Preconstruct entrypoint has been created (run yarn in the root of the repo to do this)
  • Changeset file includes a minor
  • Export components for docs site and Playroom (docs/components/designSystemComponents.tsx)
  • Add component to Kitchen Sink (.storybook/stories/KitchenSink.tsx)
  • Add snippets to Playroom (docs/playroom/snippets.ts)
  • Add figmaGalleryNodeId to Docs (docs/components/pictograms/index.tsx)
  • Add pictogram to Docs (docs/components/pictograms/index.tsx)

Copy link

changeset-bot bot commented Jan 30, 2025

⚠️ No Changeset found

Latest commit: 8b23d4d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@stowball stowball changed the base branch from develop to usability-testing-feb-25 January 30, 2025 05:48
@stowball stowball changed the title yourgov: Let vehicle registration field to ignore spaces POC: FileUpload download attribute Jan 30, 2025
Copy link
Contributor

github-actions bot commented Jan 30, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://agriculturegovau.github.io/agds-next/pr-preview/pr-1938/

Built to branch gh-pages at 2025-01-30 22:45 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@@ -43,7 +43,12 @@ export const FileUploadExistingFile = ({
</Box>
{href ? (
<Text breakWords paddingY={1.5}>
<TextLink href={href} rel="noopener noreferrer" target="_blank">
<TextLink
download
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still needs to have target="_blank" otherwise it just tried to open it in the same tab

@stowball stowball force-pushed the usability-testing-feb-25 branch from dac0e3d to 21f7862 Compare February 3, 2025 05:15
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