CorentinTh / it-tools

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

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

Open undaunt opened 4 months ago

undaunt commented 4 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 4 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 4 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 4 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 4 months ago

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

angelofan commented 4 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 2 months ago

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