CorentinTh / it-tools

Collection of handy online tools for developers, with great UX.
https://it-tools.tech
GNU General Public License v3.0
21.2k stars 2.54k forks source link

Screen Width & Copy Issue - Wide JSON/CSV #1203

Open undaunt opened 2 months ago

undaunt commented 2 months ago

Describe the bug

If I have a set of JSON data that has a lot of fields, the CSV conversion output becomes extremely wide and it is not possible to scroll over to click the 'copy' button.

What happened?

I pasted in a JSON array with each entry having 20 dictionary entries, one or two of which are several sentences of text. I was then unable to copy the data successfully off the screen. Perhaps a maximum width limit which auto wraps the CSV output (only visually) would solve this?

System information

Docker, Ubuntu 24.04 LTS

Where did you encounter the bug?

A self hosted

sharevb commented 2 months ago

Hi @undaunt, cannot reproduce in it-tools.tech. Probably, you need to rebuild docker image with latest main branch or use the nightly build

undaunt commented 2 months ago

@sharevb I'm seeing the same as you, no issues on it-tools.tech. I'm currently running latest but it is also happening on nightly. I tried both via my FQDN as well as ip:port to exclude any issues w/my reverse proxy authentication.

Edit: I noted this is not an issue with JSON to YAML.

YuriyGavrilov commented 2 months ago

Actually it is not working at all json to csv

Снимок экрана 2024-07-19 в 23 10 18

tried here https://it-tools.tech/json-to-csv

with this json https://json.org/example.html

Mac OS Safari

sharevb commented 2 months ago

Hi @YuriyGavrilov, sounds like, this is another problem, this tool only probably support "array of flattened objects"

angelofan commented 2 months ago

This format requirement needs to be indicated in the placeholder, or pre-filled with a sample format. And, when any error occurs, an error prompt needs to be displayed instead of nothing happening.

sharevb commented 3 weeks ago

Hi @angelofan and @CorentinTh, implemented "single object to csv" and "flattening of objects" in PR #1277