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

task/WG-253 - File Listing Component using Chonky #230

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

shayanaijaz
Copy link
Contributor

@shayanaijaz shayanaijaz commented Apr 4, 2024

Overview:

Added a File Listing component using the Chonky library. Added this component to the Create Map modal with some dummy file data

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Testing Steps:

  1. Start the app and click on the Create Map button from the main menu
  2. Test out file listing functionality. Actions performed in the component will be visible in the console logs. Multiple files can be selected by holding shift and selecting files

UI Photos:

Screen Shot 2024-04-04 at 11 37 05 AM

Notes:

TODO:

  • Add unit tests
  • Add File Listing functionality to other components as listed in WG-208

Copy link
Contributor

@tjgrafft tjgrafft left a comment

Choose a reason for hiding this comment

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

LGTM! Spoke with Shayan in DMs. There's a bug related to window size/media queries that caused a side effect for this PR. Previously, we were using the medium modal size, but here we're using XL. We will need to change the CSS rules in CreateMapModal to satisfy the new media queries/device sizes.

Does Chonky allow us to customize the icons and fade styles? Can we customize the selection pattern/image?

@tjgrafft
Copy link
Contributor

Master should have a fix for the .hazmapper overflow issue--so I think that will be resolved whenever you resolve conflicts and merge master with this branch

@shayanaijaz shayanaijaz force-pushed the task/WG-253--file-listing-component branch from a8c843b to 559fcef Compare December 9, 2024 19:17
Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

Looks great. left two comments but we could do those as follow on work.

path:
path || (selectedSystem?.id === myDataSystem?.id ? user?.username : ''),
offset: '0',
limit: '100',
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need a follow on ticket for pagination?

? file.name.substring(file.name.lastIndexOf('.') + 1)
: undefined,
icon: file.type === 'dir' ? 'folder' : 'file',
selectable:
Copy link
Collaborator

Choose a reason for hiding this comment

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

'selectable' is set to false for the files in CreateMapModal, but it's kinda hard to tell because of the styling. Maybe we can tweak that to make it clearer? Or in the short term, we could try using isHidden or just filter them out ourselves.

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.

3 participants