Skip to content

Commit

Permalink
fix: vaadin table in backend-ai-folder-explorer does not output som…
Browse files Browse the repository at this point in the history
…e content when there is scrolling (#2627)

### TL;DR

Remove the inline style for the LegacyFolderExplorer component and introduce `vaadin-grid` elements to the BackendAIFolderExplorer component with fixed width for the action columns.

### What changed?

Fixed the width of the last column of the vaadin table used in `backend-ai-folder-explorer` to output the full width of the content even when scrolling occurs.

### How to test?
1. Move to `Data & Storage` Page
2. Open folder explorer by clicking folder icon
3. Resize the screen so that `folder explorer` scrolls.
4. Verify that all the contents of `folder explorer` are printed correctly.

### Why make this change?

There is currently an issue where scrolling in a vaadin table inside the `backend-ai-folder-explorer` used as a modal on the `Data & Storage` page, or any other page that uses storage, does not output the full width of the content.

---

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
  • Loading branch information
ironAiken2 committed Aug 13, 2024
1 parent 03eaea3 commit d68fb64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion react/src/components/LegacyFolderExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ const LegacyFolderExplorer: React.FC<LegacyFolderExplorerProps> = ({
ref={folderExplorerRef}
active
vfolderID={vfolderID}
style={{ width: '100%' }}
/>
</BAIModal>
);
Expand Down
3 changes: 1 addition & 2 deletions src/components/backend-ai-folder-explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1792,8 +1792,7 @@ export default class BackendAIFolderExplorer extends BackendAIPage {
.renderer="${this._boundSizeRenderer}"
></vaadin-grid-sort-column>
<vaadin-grid-column
resizable
auto-width
width="130px"
header="${_t('data.explorer.Actions')}"
.renderer="${this._boundControlFileListRenderer}"
></vaadin-grid-column>
Expand Down

0 comments on commit d68fb64

Please sign in to comment.