Skip to content

Frontend: Improves file explorer UI with visual cues#91

Merged
iamandrii merged 2 commits into
mainfrom
m-90-files-divisors
Jun 9, 2025
Merged

Frontend: Improves file explorer UI with visual cues#91
iamandrii merged 2 commits into
mainfrom
m-90-files-divisors

Conversation

@iamandrii
Copy link
Copy Markdown
Contributor

Closes #90.

Adds a visual distinction for the last file or directory in a list
by adding a dashed bottom border to all but the last items. This
enhances the user's ability to quickly identify the end of a
directory listing.

The VDirectory and VFile components now receive an `isLast` prop to
indicate if they are the last item in their parent's `nested` array.
This prop is used to conditionally apply the `vobj-last` class.
@iamandrii iamandrii requested a review from Copilot June 9, 2025 18:20

This comment was marked as outdated.

Fixes an issue where the `isLast` prop was not being correctly assigned to the last element in a nested directory structure.

The previous implementation incorrectly assumed that the `isLast` prop from the parent was applicable to all children. This change ensures that each child element in the `nested` array receives its own `isLast` prop based on its index, indicating whether it is the final element within that level of the directory structure.

This fixes potential rendering issues related to the visual appearance of last elements in the directory tree.
@iamandrii iamandrii requested a review from Copilot June 9, 2025 18:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enhances the file explorer UI by introducing visual cues and updating component properties for clearer data usage.

  • Introduces a dashed border for non-last file/directory objects in the SCSS file.
  • Refactors VFile and VDirectory components to wrap file data in a nested "data" object and adds an "isLast" property for styling.
  • Updates the Files component to pass the new prop structure to VDirectory.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
web/eclipse/src/pages/files/VObj.scss Adds a dashed border style to non-last file explorer items.
web/eclipse/src/pages/files/VFile.tsx Refactors props to expect a nested data object and applies the "vobj-last" class based on the new "isLast" flag.
web/eclipse/src/pages/files/VDirectory.tsx Refactors props similarly and computes an "isLast" flag for nested items to control styling on directories and files.
web/eclipse/src/pages/files/Files.tsx Updates the VDirectory component usage to comply with the new props design.
Comments suppressed due to low confidence (1)

web/eclipse/src/pages/files/VObj.scss:19

  • [nitpick] Consider adding a comment explaining the styling intent behind using ':not(.vobj-last)' to improve clarity for future maintainers.
&:not(.vobj-last) {

Comment thread web/eclipse/src/pages/files/VDirectory.tsx
@iamandrii iamandrii merged commit 829247c into main Jun 9, 2025
3 checks passed
@iamandrii iamandrii deleted the m-90-files-divisors branch June 9, 2025 18:32
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.

Frontend: Add divisors between files list

2 participants