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

[ui-storageBrowser] Add home, refresh, edit and copy path functionalities #3996

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nidhibhatg
Copy link
Collaborator

@nidhibhatg nidhibhatg commented Feb 12, 2025

What changes were proposed in this pull request?

  • Added home and refresh button for the storage browser
  • Added copy and edit path functionalities to the path browser
  • Fixed the folder name not displaying the filesystem or bucket error
  • Fixed the folder icon and name misalignment in the storage directory table
  • Fixed the focus issues on Search bar
  • Removed file path and destination path title from path browser and the relevant tests
  • Improved styling on path browser
  • Added :// seperator to path browser
Screenshot 2025-02-18 at 2 40 01 PM

How was this patch tested?

  • Manually

Please review Hue Contributing Guide before opening a pull request.

@nidhibhatg nidhibhatg changed the title [ui-storageBrowser] Add home, refresh, edit path and copy path functi… [ui-storageBrowser] Add home, refresh, edit and copy path functionalities Feb 18, 2025
Copy link
Collaborator

@bjornalm bjornalm left a comment

Choose a reason for hiding this comment

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

Nice work, just a couple of smaller changes, especially the spelling.

@nidhibhatg nidhibhatg requested a review from bjornalm February 18, 2025 10:23
@nidhibhatg nidhibhatg enabled auto-merge (squash) February 18, 2025 10:36
Copy link
Collaborator

@bjornalm bjornalm left a comment

Choose a reason for hiding this comment

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

Great, nice work!

Copy link
Collaborator

@ramprasadagarwal ramprasadagarwal left a comment

Choose a reason for hiding this comment

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

Great PR overall, left few minor comments.

display: flex;
gap: vars.$fluidx-spacing-xs;
max-width: 70%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Setting 70% width with no media query might mis-align the UI element when screen size is reduces below certain point.
Can you add media query or check if UI elements are looking fine with reduced screen width?

}
}

.hue-path-browser__home-btn {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we combine both home and refresh class into one?

@@ -49,10 +52,10 @@ const StorageBrowserTab = ({ fileSystem, testId }: StorageBrowserTabProps): JSX.
urlFileSystem === fileSystem.file_system ? urlFilePath : fileSystem.user_home_directory;

const [filePath, setFilePath] = useState<string>(initialFilePath);
const fileName = filePath.split('/').pop() ?? '';
const fileName =
filePath.split('/').pop() !== '' ? filePath.split('/').pop() : filePath.split('://')[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice fix,
Will it also cover a path ABFS://path/to/file.txt?

@@ -20,11 +20,13 @@ $cell-height: 40px;
$table-placeholder-height: 100px;
$action-dropdown-width: 214px;
$icon-margin: 5px;
// $icon-height: 24px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: remove extra code if not needed

title={'Edit Path'}
icon={<EditIcon />}
/>
<BorderlessButton
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel that the icons are enough on its own, we need not have to have border around the icons when we hover it.
Let me know your thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it is clickable like a button it should be a button and if we wanna use a borderless button we should follow the cuix styles for borderless buttons, which is showing the border on hover. An alternative is the LinkButton

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