Frontend: Improves file explorer UI with visual cues#91
Merged
Conversation
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.
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.
There was a problem hiding this comment.
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) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #90.