Skip to content

[Feature Request]: Allow configurability of file icon actions #19643

@SMassola

Description

@SMassola

The problem

The current file uploader component displays file items whenever a file is added, however, the only action that can be taken on each individual file item is the delete action.

Image

The solution

This feature request is for configurability of the file items of the file uploader, allowing new action icons to be added to each file item.

For example,

  1. Changing the delete icon from a cross to a trash can for each file item,
  2. Adding a download icon action to each file item to download the file,

Image

  1. Adding a view icon action to each file item to view the file,
Image
  1. Changing file item text to a link to view attachment in new tab.
Image Image

Examples

Unable to find live example with these features, but here's a reference to other file uploader components:

https://component.gallery/components/file-upload/

Package

@carbon/web-components, @carbon/react

Application/PAL

UIHub

Business priority

Medium Priority = upcoming release but is not pressing

Available extra resources

I can contribute to both the react and angular implementation.

Code of Conduct


Design spec

Important

Design needs to provide a design spec before we can approve and merge the open PR for this.

Enhancement criteria

  • Providing a trash can icon instead of the close icon. Is this okay and do we want people to do this? Would our guidance say to just be consistent across your product whether you are using trash can icons or close icons for this component?
  • Providing a download icon to download the file.
  • Providing a view icon to view the file.
  • Providing a link as the file name to open the file in another tab.
  • Show how the error icon in the invalid state would appear if there are additional icons with the close icon or trash can icon.

Tasks

  • Come up with an initial spec with the above criteria.
  • Playback to the team in design crit
  • Create final design specs and post in this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    ⏱ Backlog

    Status

    Next ➡

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions