janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
211 stars 30 forks source link

Clicking on table after "resize column to 200px" causes cells to vanish #146

Closed JeremyLeland closed 6 months ago

JeremyLeland commented 6 months ago

What OS?

VS Code Info: Version: 1.87.0 Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2 Date: 2024-02-27T23:42:16.599Z (6 days ago) Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.87.0 Chrome/118.0.5993.159 Electron/27.3.2 Safari/537.36

Description

Clicking anywhere in the table after performing "resize column to 200px" causes all the cells to vanish.

Expected behavior

Should be able to continue working with table after resizing a column to 200px.

Steps to reproduce

  1. Create a new CSV file in VS Code, such as:
    Name, Age, City, Ice Cream
    Frederich, 31, Davis, Chocolate
  2. Click "Edit CSV" button in upper right
  3. Right click on any cell and choose "Resize column to 200px"
  4. Left Click on one of the right-most cells in table

Actual: Table cells all vanish Expected: Should select the clicked cell

NOTE: The horizontal scrollbar appears and is tiny, suggesting the document somehow got very wide after the resize. I can manually drag it back into place, but clicking on any cell (especially the right-most cells of the table) sends it way off to the right again (where no cells are visible).

This also affects keyboard navigation (arrow keys to attempt to find your way back)

The person who originally showed me this bug said it "stopped working recently", possibly after a VS Code update.

janisdd commented 6 months ago

Maybe I’m doing something wrong, but I just tested it and it works as expected for me… (I’m on Mac and also vs code 1.87.0)

Did you change the default value of the csv-edit.initialColumnWidth setting? Did you change any other setting of the extension?

In the last update I implemented the column hiding feature #140 which might be related to this.

I'll test on another machine and report back.

JeremyLeland commented 6 months ago

This repros immediately after installing extension, no changes made to any settings. Attaching a screen recording.

https://github.com/janisdd/vscode-edit-csv/assets/50390633/e6c0aef1-0914-4fd8-98a0-0619cda0fd30

janisdd commented 6 months ago

I can also reproduce this on another machine... maybe I have overwritten some files or settings on my dev machine. I'll look into it and thanks for reporting the bug.

JeremyLeland commented 6 months ago

It works for us now, thank you for the quick fix!