GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Studio export to csv/Excel truncates String values longer than 30 characters · Issue #721 · ArcadeData/arcadedb

Studio export to csv/Excel truncates String values longer than 30 characters #721

New issue
Copy link
New issue
Copy link
Closed
Closed
Studio export to csv/Excel truncates String values longer than 30 characters#721
Copy link
Assignees
lvca
Labels
enhancementNew feature or request
Milestone
23.1.1

Description

@vic0824
vic0824
opened on Dec 30, 2022
Issue body actions

ArcadeDB Version: v22.11.1

JDK Version: openjdk 11.0.12 2021-07-20 LTS

OpenJDK Runtime Environment Corretto-11.0.12.7.1 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.12.7.1 (build 11.0.12+7-LTS, mixed mode)

OS: CentOS release 6.9 (Final)

Expected behavior

The export to csv/Excel generates a file which include the same values stored in the database

Actual behavior

the csv/Excel export includes ellipsis for values longer than 30 characters.
This does not seem to be linked to the browser and screen settings, because if I open a side window (e.g. developer tools), all the table columns shrink but the amount of text displayed stays the same, it just wraps around.
The attached screenshot "Studio table view" shows that the Studio table view shows the value "CS_OPER_AUX_WNDCHE_00000000T00..." for the "name" property
The attached screenshot "json table view" shows that the actual value of the name property for that record is "CS_OPER_AUX_WNDCHE_00000000T000000_99999999T999999_0001.DBL"

Steps to reproduce

  1. Create a type
  2. create a property "name" of type String
  3. insert a value longer than 30 characters for the "name" property, e.g. 'property_name_longer_than_30_ch', which is 31 characters long.
  4. issue a select query for the type
  5. verify that the table view shows ellipsis "..." at the end of the value, e.g. 'property_name_longer_than_30_c...'
  6. click the json view and verify that the name property has value = property_name_longer_than_30_ch
  7. export to csv or Excel
  8. open the file and verify that the value is truncated and it contains ellipsis and the end, e.g. "property_name_longer_than_30_c..."

Studio Table view
Studio json view

Activity

Next
  1. lvca commented on Dec 30, 2022

    @lvca
    lvca
    on Dec 30, 2022
    Member
    More actions

    Find the issue:

    arcadedb/server/src/main/resources/static/js/studio-table.js

    Line 63 in 31ec156

    value = value.toString().substr( 0, 30) + "...";

    Any column longer than 30 chars is truncated. Since the table doesn't scroll on the right (overflow) like OrientDB Studio, it's challenging to keep long values. Any advice?

    1. Remove any truncation and let the table scroll to the right if overflows
    2. Like (1) but make it configurable with a checkbox like "Fit values in the page" checked by default, but you can disable it. We should save this settings into the localStorage, so you don't have to reset the same option every time. Probably we should save other things, like the current database in the localStorage....
    3. Leave like it's now, but re-render the table on CSV/Excel export, so it's not truncated

    WDYT?

  2. lvca commented on Dec 30, 2022

    @lvca
    lvca
    on Dec 30, 2022
    Member
    More actions

    I moved ahead and implemented both as new options in the "Settings" menu under Table:

    image

    Now you can select:

    • truncate values (30 characters)
    • fit the table in the page

    Also these settings are saved in the browser's storage, together with the database name, so once you change your settings they are persistent (unless you clear web browser's local storage)

  3. lvca
    added a commit that references this issue on Dec 30, 2022

    new: studio render result in table now with 2 options (truncate long …

    dc5ad7f
  4. lvca commented on Dec 30, 2022

    @lvca
    lvca
    on Dec 30, 2022
    Member
    More actions

    @vic0824 you can try now to remove "Truncate long values" and export in CSV/Excel.

  5. lvca
    closed this as completedon Dec 30, 2022
  6. lvca
    self-assigned this
    on Dec 30, 2022
  7. lvca
    added
    enhancementNew feature or request
    on Dec 30, 2022
  8. lvca
    added this to the 23.1.1 milestone on Dec 30, 2022
  9. vic0824 commented on Dec 31, 2022

    @vic0824
    vic0824
    on Dec 31, 2022
    Author
    More actions

    Excellent, thanks.
    We could go one step further and set "table-layout: auto" + "word-break:break-all" when "Fit table in page" mode is selected. If necessary, min-width could be specified for the @Rid, it's probably the only column we don't want to ever wrap around.
    The rationale is that the contents of some of the columns is often going to be shorter than others, e.g. the @Rid and @type columns take up too much space and they are not the most important information.
    Other, more aggressive, optimizations, could be:

    • move the main menu to the top, i.e. lay it out horizontally on the top, instead of vertically on the side
    • reduce the font
    • remove redundant columns (e.g. the @type in table view: if I do a select on a type, I already know what the type is, and repeating the same value for each record is a waste of space)
  10. lvca commented on Dec 31, 2022

    @lvca
    lvca
    on Dec 31, 2022
    Member
    More actions

    Hey @vic0824, could you please send a PR about the first part once you tested and work better?

    About the more aggressive optimizations, you can always reduce the font by zooming in and out with your browser if you need it. The main menu on the top is an option, especially because we don't have so many options to justify a vertical tab.

    About the removal of @type is not a good idea, because you could do a select from Customer and the resultset not only has Customer but also all the instances from sub-classes: types are polymorphic.

  11. vic0824 commented on Jan 1, 2023

    @vic0824
    vic0824
    on Jan 1, 2023
    Author
    More actions

    I have downloaded the entire content of the "static" folder (from the main branch) and patched the server jar, but it does not seem to work for me. When I execute a query, it hangs and the browser console displays a js error message (see attached screenshot). What am I doing wrong?
    Studio error

  12. lvca commented on Jan 1, 2023

    @lvca
    lvca
    on Jan 1, 2023
    Member
    More actions

    Hard to tell. If you forked the project, could you please create a PR of your changes so I can see them?

  13. vic0824 commented on Jan 2, 2023

    @vic0824
    vic0824
    on Jan 2, 2023
    Author
    More actions

    Tested it with v23.1.1-SNAPSHOT (build 1b37118/1672647527307/main).

    It works, more or less.
    The functionality is there (see attached "fit table in page" screenshot and "Studio export" csv file, and I have verified it also for Excel, PDF, copy and print), but the checkboxes do not behave correctly:

    1. the default configuration is "fit table in page", but none of the two options is selected by default (see attached "Studio setting default none selected" screenshot)
    2. It is possible to select both options (see attached "Studio setting both selected" screenshot)
    3. Clicking on the checkbox itself does not have any effect: it is necessary to click on the text. This might be an intrinsic feature of the css/javascript libraries, but it is nevertheless not consistent with the usual behavior of checkboxes.

    By clicking around I've managed to select only "Fit table in page".
    I have then refreshed the browser, logged in again and verified that "Fit table in page was selected".
    This makes me think that the code sets the checkbox status based only on the value in the local storage, and if it doesn't find any (because it is the first time that page is displayed by that browser or because the cache has been cleared), then it does not select any.
    I suggest to modify the javascript code so that if it doesn't find a value in the local storage, it selects the "Fit table in page" checkbox, which would then be consistent with the default behavior, i.e. to fit the table in the page.

    fit table in page
    Studio export.csv
    Studio setting default none selected
    Studio setting both selected

  14. vic0824 commented on Jan 2, 2023

    @vic0824
    vic0824
    on Jan 2, 2023
    Author
    More actions

    Hold on, there are more behaviors, probably because it is possible to select both options and deselect both options, but depending on the order in which they are applied, they produce different results.

    The "default behavior" (when no option is selected) seems to be: values are not truncated and the column widths adjust to the content, corresponding to "table-layout: auto"

    I think the default behavior make the best use of the space, by using table-layout: auto, so I propose that, apart from fixing the problems with the selection, both options use "table-layout: auto" instead of "table-layout: fixed"
    default behavior

  15. lvca
    reopened this on Jan 2, 2023
  16. 3 remaining items

  17. lvca
    reopened this on Jan 2, 2023
  18. lvca commented on Jan 2, 2023

    @lvca
    lvca
    on Jan 2, 2023
    Member
    More actions

    Too early. The saved values are not correct, and as you noticed, clicking on the actual checkbox doesn't work.

  19. lvca
    added a commit that references this issue on Jan 2, 2023

    fix: studio management of table setting now consistent after restart

    5086e2d
  20. lvca commented on Jan 2, 2023

    @lvca
    lvca
    on Jan 2, 2023
    Member
    More actions

    Ok, I hope this is the good one. Checkboxes now work and the settings are correctly saved and displayed at the opening. Please confirm when you can, in case there is still an issue, we can reopen this issue. Thanks in advance.

  21. lvca
    closed this as completedon Jan 2, 2023
  22. vic0824 commented on Jan 3, 2023

    @vic0824
    vic0824
    on Jan 3, 2023
    Author
    More actions

    Tested it with v23.1.1-SNAPSHOT (build 8c8df17/1672742152255/main).

    Clicking on the checkbox now works, but maybe I misunderstood the design: did you intend for the two checkboxes to be mutually exclusive or not?
    If not, then it works as expected.
    Screenshots:

    • "default view": table-layout = auto, word-wrap = break-word, values are not truncated, no checkbox is selected
    • "Fit table in page": table-layout = fixed, word-wrap = break-word, values are not truncated, the correct checkbox is selected
    • "truncate long values": table-layout = auto, word-wrap = break-word, values are truncated, the correct checkbox is selected
    • "both selected": table-layout = fixed, word-wrap = break-word, values are truncated, both checkboxes are selected

    Anyway, I think it's good enough, it's not worth spending more time on it.

    default view
    Fit table in page
    truncate long values
    both selected

  23. lvca commented on Jan 3, 2023

    @lvca
    lvca
    on Jan 3, 2023
    Member
    More actions

    They are not mutually exclusive, one is to truncate values no matter the layout. If you have any suggestions to make it better don't hesitate to comment here.

  24. lvca commented on Jan 6, 2023

    @lvca
    lvca
    on Jan 6, 2023
    Member
    More actions

    @vic0824 I think I finally understood what you mean. Just fixed. Not if "Fit In Page" is not selected, the table scrolls to display all the columns.

  25. lvca
    added a commit that references this issue on Jan 6, 2023

    fix: studio not fit in page for table now works as expected

    40db1c6
  26. vic0824 commented on Jan 13, 2023

    @vic0824
    vic0824
    on Jan 13, 2023
    Author
    More actions

    Great, thanks!

  27. tae898
    added 4 commits that reference this issue on Jun 28, 2026

    new: studio render result in table now with 2 options (truncate long …

    32c0433

    fix: studio default settings for table are now displayed correctly

    d9eaed6

    fix: studio management of table setting now consistent after restart

    eb2f035

    fix: studio not fit in page for table now works as expected

    2e6623b
  28. mergify
    added a commit that references this issue on Jul 5, 2026

    chore(deps): bump actions/setup-go from 5.5.0 to 6.5.0 [skip ci]

    d240f4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    • 23.1.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.