Skip to content

feat: use custom html builder for widget3#7467

Open
Rathoz wants to merge 5 commits into
mainfrom
widget3-custom-html
Open

feat: use custom html builder for widget3#7467
Rathoz wants to merge 5 commits into
mainfrom
widget3-custom-html

Conversation

@Rathoz
Copy link
Copy Markdown
Collaborator

@Rathoz Rathoz commented May 6, 2026

Summary

TODO: Test performance

How did you test this change?

Comment thread lua/wikis/commons/Widget/Renderer.lua Outdated
Base automatically changed from widget30 to main May 7, 2026 08:56
@Rathoz Rathoz force-pushed the widget3-custom-html branch from 637c48e to 0abfab5 Compare May 7, 2026 08:58
@Rathoz Rathoz marked this pull request as ready for review May 11, 2026 19:24
@Rathoz Rathoz requested review from a team as code owners May 11, 2026 19:24
Copilot AI review requested due to automatic review settings May 11, 2026 19:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the Widget3 renderer to build HTML output via a custom string builder instead of relying on mw.html, likely aiming to reduce overhead during render.

Changes:

  • Added a custom HTML string builder (buildHtmlString) including a void/self-closing tag list and attribute escaping.
  • Updated Renderer.render for HTML-tag VNodes to render children and emit HTML via the new builder (with special handling for fragment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/wikis/commons/Widget/Renderer.lua Outdated
Comment thread lua/wikis/commons/Widget/Renderer.lua Outdated
Comment thread lua/wikis/commons/Widget/Renderer.lua
Copy link
Copy Markdown
Collaborator

@ElectricalBoy ElectricalBoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this compare to mw.html lib performance wise?

Comment thread lua/wikis/commons/Widget/Renderer.lua
@Rathoz
Copy link
Copy Markdown
Collaborator Author

Rathoz commented May 12, 2026

how does this compare to mw.html lib performance wise?

It's on my TODO To test, you can test if you want. It should perform better in memory management I expect

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.

4 participants