Skip to content

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

Closed
Dliix66 wants to merge 2 commits intoroflmuffin:mainfrom
Dliix66:feature/optionalImprovedHtmlMenuTextLength
Closed

Restore HTML menu max length, but as an optional feature and improved the trimming with HTML banners#758
Dliix66 wants to merge 2 commits intoroflmuffin:mainfrom
Dliix66:feature/optionalImprovedHtmlMenuTextLength

Conversation

@Dliix66
Copy link
Copy Markdown

@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
Copy Markdown
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