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: Add color display for file types in File Management (#2107) #2216

Merged

Conversation

aamirxshaikh
Copy link
Contributor

@aamirxshaikh aamirxshaikh commented Nov 22, 2023

Purpose

This pull request addresses issue #2107 by enhancing the File Overview component to include color-coded file types. The goal is to improve the user experience by providing a visual distinction between different file types.

Changes Made

file-overview.component.html

  • Modified the HTML code within the file overview component to dynamically set the background color of the file type container using the getFileColor method.

file-overview.component.ts

  • Added a new private property fileTypeColors (map) to store the generated colors for each file type.
  • Added a new method getFileColor to check if the color for the given file type is already stored in the map; if not, it generates a new color using the generateColorHash method.
  • Added a new private method generateColorHash to generate a color code.

Screenshots

image

Please feel free to provide feedback or suggest any changes.

Remarks

PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): no

@github-actions github-actions bot added the ui Anything that affects the UI label Nov 22, 2023
Copy link
Contributor

@bossenti bossenti left a comment

Choose a reason for hiding this comment

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

Thank you very much for this PR @aamirxshaikh 🙏🏼

I really like your solution

@bossenti bossenti merged commit 993f371 into apache:dev Nov 23, 2023
@aamirxshaikh
Copy link
Contributor Author

Thank you very much for this PR @aamirxshaikh 🙏🏼

I really like your solution

You're welcome! @bossenti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Anything that affects the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants