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

Restore HTML menu max length, but as an optional feature and improved the trimming with HTML banners #758

Conversation

Dliix66
Copy link

@Dliix66 Dliix66 commented Feb 4, 2025

This PR is following #747

It adds the ability to enable or disable the limit. But it also improves the trimming by not taking HTML banners into account, but it also closes the open banners after trimming to avoid any visual issues.

Example:
"Hello World! This is a test." trimmed to 8 characters will be "Hello Wo"

To do this, add this in your config:
"MaxHtmlMenuTitleLength": 0, // 0 = unlimited, previous value = 32
"MaxHtmlMenuOptionLength": 0, // 0 = unlimited, previous value = 26`

@Dliix66 Dliix66 requested a review from roflmuffin as a code owner February 4, 2025 23:33
@roflmuffin
Copy link
Owner

roflmuffin commented Feb 5, 2025

Not sure this should really be a core config, given that the plugin author themselves would not be able to predict the behaviour of their menu based on this setting. If this is a desired functionality of the menu, I think it should be opt-in by the plugin author when they create the menu, rather than it coming from CSS

@Dliix66 Dliix66 closed this Feb 8, 2025
@Dliix66 Dliix66 mentioned this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants