Skip to content

feat(webui): add reset column sizes button to grid toolbar, Fixes #1308#1320

Open
mohamadyasser118 wants to merge 3 commits intocybertec-postgresql:masterfrom
mohamadyasser118:feat/reset-column-sizes
Open

feat(webui): add reset column sizes button to grid toolbar, Fixes #1308#1320
mohamadyasser118 wants to merge 3 commits intocybertec-postgresql:masterfrom
mohamadyasser118:feat/reset-column-sizes

Conversation

@mohamadyasser118
Copy link
Contributor

Description

Fixes #1308

useGridState already exposes resetColumnSizes() but it was never
connected to the UI.

I Added optional onResetColumns prop to GridToolbar so only grids that use useGridState show the button,
And Wired resetColumnSizes through SourcesGridToolbar into SourcesGrid.

image

AI & Automation Policy

  • I am the human author and take full personal responsibility for every change in this PR.
  • No AI or automated generative tool was used in any part of this PR OR I have disclosed all tool(s) below.
    Drafted with the assistance of Claude Sonned 4.6

Checklist

  • Code compiles and existing tests pass locally.
  • New or updated tests are included where applicable.
  • Documentation is updated where applicable.

@Mazen050
Copy link
Contributor

Hello @mohamadyasser118, similar to last time. the connection string column doesn't reset size (doesn't expand/contract to default size). Although every other column does.

@mohamadyasser118
Copy link
Contributor Author

Hello @mohamadyasser118, similar to last time. the connection string column doesn't reset size (doesn't expand/contract to default size). Although every other column does.

Yes I know, This can be avoided when the glitching problem is fixed, However as this problem still exist, it will need another refactor after fixing it.

@mohamadyasser118
Copy link
Contributor Author

As I mentioned in the previous PR, ConnetionString has a different behavior because of using flex rather than width

@mohamadyasser118
Copy link
Contributor Author

@pashagolub
Hello, I made edits on SourcesGrid.tsx after your PR (replacing onColumnResizewith onColumnWidthChange)
also the problem of Connection String column has been fixed in #1324

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.

feat(webui): add "Reset column sizes" button to grid toolbars

2 participants