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

Truncation should be done in a smarter way #413

Open
fatadel opened this issue Nov 30, 2022 · 2 comments
Open

Truncation should be done in a smarter way #413

fatadel opened this issue Nov 30, 2022 · 2 comments
Assignees
Labels
web topics about the web package

Comments

@fatadel
Copy link
Contributor

fatadel commented Nov 30, 2022

In the graph type visualizations (jsonld-vis), the truncation should be done in a smarter way. The following screenshot shows the problem with the current approach - the string is not shown completely despite the fact it is already truncated.

telegram-cloud-photo-size-2-5206162891978425134-y

@egekorkan egekorkan added the web topics about the web package label Dec 1, 2022
@egekorkan
Copy link
Member

egekorkan commented Dec 19, 2022

This is visible only in some specific cases like the example above. The max width is the problem, this TD has the same string in two places but only the one on the right is truncated.

@fatadel
Copy link
Contributor Author

fatadel commented Apr 26, 2023

The logic for truncation contains some magic numbers, like an assumption of 1 character being 9 pixels long. The original logic for this type of visualization was adapted from here, which is used in the JSON-LD Playground.
Maybe we can constrain each text in size and let CSS decide for truncation... Though, we also need to make sure that the text direction is correctly taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web topics about the web package
Projects
None yet
Development

No branches or pull requests

2 participants