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

Dtale has no toolbar to view longer values #477

Closed
Azrael1 opened this issue May 11, 2021 · 12 comments
Closed

Dtale has no toolbar to view longer values #477

Azrael1 opened this issue May 11, 2021 · 12 comments
Labels
enhancement New feature or request UI Updates to the front-end

Comments

@Azrael1
Copy link

Azrael1 commented May 11, 2021

I am trying to view a dataset, with large text values. Dtale increases the column width so much, that it is a pain to scroll to the right.

Can there be an option to change the default column width?

Also, a toolbar that shows the current cell's value, would be quite useful(similar to excel). This would also eliminate the need for really big column sizes.

@Azrael1
Copy link
Author

Azrael1 commented May 11, 2021

#472

I see this issue, here but it does not address the issue, if there is a lot of text in that column value, then it remains collapsed. How am I supposed to see the value inside, without scrolling over the entire text in that small column?

This is an example of the problem here

problem

Excel solves this by adding the tool bar
problem-solution

Would it be possible to create something like this?

@Azrael1 Azrael1 changed the title Dtale has no column resizing Dtale has no toolbar to view longer values May 11, 2021
@aschonfeld
Copy link
Collaborator

Sorry I thought I had left a little tooltip with the full value, but I think that only happens if you use the string formatting functionality to trim the value and an ellipses exists. Until I can build something more permanent (like what is in excel) I can update the code to have a tooltip display the full value a column is over a certain length (100 characters sound good?)

@Azrael1
Copy link
Author

Azrael1 commented May 12, 2021

Sure, and thank you for the prompt response.

Dtale is amazing btw!

@aschonfeld
Copy link
Collaborator

@Azrael1 here's what I have so far. This is using a giant string of 1369 characters and I just created a dataframe with random substrings of this long string:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,
Screen.Recording.2021-05-17.at.1.22.15.PM.mov

So the idea is that you can adjust the maximum width of the columns in your grid using that slider or the text input from the ribbon menu. Once you updated the value the grid is re-drawn. After its been re-drawn you can still drag the column widths past that maximum if you'd like. You can also turn off the maximum width by toggling that checkbox from the ribbon menu.

Not sure how long the text is that you're viewing but as you can see the tooltip hits some height issues depending on your browser.

@aschonfeld
Copy link
Collaborator

Now I'm going to work on trying to add a view at the top (similar to excel) which will appear when you double-click a cell for editing. And it will be hidden when nothing is being edited. Currently you can press "Esc" to exit editing.

@aschonfeld
Copy link
Collaborator

@Azrael1 getting a little further...

editing_cells.mov

@Azrael1
Copy link
Author

Azrael1 commented May 20, 2021

Thanks a bunch, this really helps. Should I close the issue then?

@aschonfeld
Copy link
Collaborator

I’ll keep it open until I do a release in a few days. Just need to add some test coverage

@aschonfeld
Copy link
Collaborator

@Azrael1 this has been released to pypi in v1.47.0 (it will be in conda-forge shortly). Please throw your ⭐ on the repo if you haven't done so already. And let me know if you hit any issues 🙏

@failable
Copy link

@aschonfeld Hi, I can't get cell text previewed as shown in you video when max-width is applied. Do you have any idea of this? Thanks.

@aschonfeld
Copy link
Collaborator

@liebkne sorry I just merged a fix for this issue and will hopefully have a release out sometime in the next couple days

@aschonfeld
Copy link
Collaborator

@liebkne this has been fixed in v1.53.0 If you haven't already, please take a second to toss your ⭐ on the repo. Thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI Updates to the front-end
Projects
None yet
Development

No branches or pull requests

3 participants