adamviola / parquet-explorer

Explore Parquet files with SQL
MIT License
28 stars 5 forks source link

Feature request: improve UX with extremely-long text in cells #8

Open parker-research opened 6 months ago

parker-research commented 6 months ago

I love this tool! Very awesome!

Lately, I've been using it with some data with extremely long cell values (specifically, prompts and responses from tools like ChatGPT's API).

It works well overall, but you have to do quite a bit of scrolling to get anything useful.

Easy Wins

  1. [x] Position the text in each cell at the top of the cell instead of the vertical-middle of the cell.
  2. [ ] Truncate each cell at 500 characters, and add a "..." at the end of the truncated text. Add this as an extension configuration option, probably.

More Advanced Ideas

  1. [x] Add scrolling within each cell. Show only a certain number of lines by default.
  2. [ ] Add a "cell viewer" pane, like in DBeaver. When you click on a cell, it shows the value of the cell in this alternative full-sized pane.
  3. [ ] Add a toggle option to show cell values as all-one-line, using the "paragraph break" symbol in place of actually breaking the line (very useful for viewing cells with lots of short lines). Add line wrapping within each cell.

Thanks again for making such an awesome extension!

adamviola commented 6 months ago

Thanks for the feature requests! Definitely agree that we need better support for long text. I'm thinking refactoring the table to be powered by Tabulator, which supports column resizing, pop-ups, virtual DOM (better performance on large tables), and A LOT more.

Do you have an example parquet file with a lot of long text that has given you trouble? No worries if not

adamviola commented 6 months ago

Added a few of these suggestions in the v1.2.0 release!

They make a huge difference for handling long text.

@parker-research Give it a go, let me know if these updates give you additional suggestions and/or change your mind about your existing suggestions. I'd leaning toward adding cell truncation and a "cell viewer" pane but I'm not quite sure

DeflateAwning commented 6 months ago

Drastically improved! This is fantastic!

Another great improvement would be optional text wrapping within each cell to avoid horizontal scrolling. Usage case: I have a cell which contains minified JSON with 20 fields. It's a very long string, but wrapping it sometimes would be helpful.

Another improvement is using Shift+Scroll to scroll horizontally when the cursor is hovering in the black space on either side of the DuckDB query.