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

Plugin description tooltip has no limits #78202

Closed
KoBeWi opened this issue Jun 13, 2023 · 2 comments · Fixed by #79090
Closed

Plugin description tooltip has no limits #78202

KoBeWi opened this issue Jun 13, 2023 · 2 comments · Fixed by #79090

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Jun 13, 2023

Godot version

4.1 beta1

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

image
This is a plugin description that spans 2 screens and goes beyond the right screen border.
I just wanted to test if there is any limit to plugin description size. There is none. You can potentially put a text that will cover your whole screen (don't try it 🙃).

Not sure how we should solve that. We could autowrap the label, but to gracefully display extremely long texts they either need to be scrolled (in a tooltip??) or truncated.

Steps to reproduce

  1. Open Project Settings
  2. Go to Plugins -> Create New Plugin
  3. Write a book in the Description field

Minimal reproduction project

https://www.lipsum.com/

@KoBeWi KoBeWi changed the title Plugin description popup has no limits Plugin description tooltip has no limits Jun 13, 2023
@Calinou
Copy link
Member

Calinou commented Jun 14, 2023

I suggest using String's wrap function to wrap lines in the tooltip to 80 characters or so (using a per-word basis).

We should do the same for project description tooltips in the Project Manager, and editor description tooltips in the Scene tree dock.

@KoBeWi
Copy link
Member Author

KoBeWi commented Jul 5, 2023

We actually have a function for that, here's example usage:

const PackedInt32Array boundaries = TS->string_get_word_breaks(config_err, "", 80);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants