Skip to content

Conversation

nathanwoulfe
Copy link
Contributor

Description

Change updates uui-input-file to only show the add button only when multiple is true, or when no files are selected (single-file mode).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Motivation and context

The picker works correctly in it's current shape (ie single mode only allows one file, multiple allows many), I'm just not sure the UI makes sense - continuing to display the Add button after selecting a file in single mode is potentially confusing, even though the button will replace the existing selection.

Alternatively could consider changing the button text when a file is selected in single-mode (ie Replace or Change selection or something similar)

I won't lose a minute of sleep if the current implementation is preferred.

How to test?

Screenshots (if appropriate)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

nathanwoulfe and others added 2 commits January 13, 2023 11:16
@iOvergaard iOvergaard added the bug Something isn't working label Jan 27, 2023
Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

Hi @nathanwoulfe
I think you might be right here, but something's happened with Storybook, where the story for a prevalue doesn't look right anymore (it should show the selected image). Also, the build is failing because of linting issues :-)

@nathanwoulfe
Copy link
Contributor Author

Heya @iOvergaard, should be better now - was missing an import, which broke the story.

@iOvergaard iOvergaard added enhancement New feature or request and removed bug Something isn't working labels Jan 30, 2023
@iOvergaard iOvergaard merged commit 61e6716 into v1/contrib Jan 30, 2023
@iOvergaard iOvergaard deleted the nathanwoulfe-patch-1 branch January 30, 2023 13:58
iOvergaard added a commit that referenced this pull request Apr 20, 2023
…elected (#395)

* Update uui-input-file.element.ts

Only show add button when multiple or no file selected

* missing import

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants