Skip to content

refactor(CharacterStats): CharacterStats to Table2 and widget3 - #7967

Merged
Rathoz merged 19 commits into
mainfrom
CharacterStats-table2
Aug 20, 2026
Merged

Rathoz merged 19 commits into
mainfrom
CharacterStats-table2

Conversation

@steve020607

Copy link
Copy Markdown
Collaborator

@steve020607
steve020607 requested review from a team as code owners August 16, 2026 10:26
@steve020607 steve020607 changed the title refactor: CharacterStats to Table2 feat(CharacterStats): CharacterStats to Table2 Aug 16, 2026
@steve020607 steve020607 self-assigned this Aug 16, 2026
@Rathoz
Rathoz requested a lite review from Copilot August 16, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates the CharacterStats table rendering from the legacy DataTable/Html.Table approach to the newer Table2 widget system, aligning CharacterStats with the Table2 component API used elsewhere in the commons widget layer.

Changes:

  • Replaced DataTable usage in CharacterStats/Table.lua with Table2 (TableWidgets.Table, TableHeader, TableBody, Row, Cell, CellHeader).
  • Replaced the unchosen-characters DataTable in CharacterStats.lua with Table2.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lua/wikis/commons/Widget/CharacterStats/Table.lua Converts the main stats table and details tables to Table2 components (header/body/rows/cells).
lua/wikis/commons/Widget/CharacterStats.lua Converts the “unchosen characters” table to Table2.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lua/wikis/commons/Widget/CharacterStats/Table.lua Outdated
Comment thread lua/wikis/commons/Widget/CharacterStats/Table.lua
Comment thread lua/wikis/commons/Widget/CharacterStats/Table.lua

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should convert from widget v2 to widget v3 too

@steve020607

Copy link
Copy Markdown
Collaborator Author

should convert from widget v2 to widget v3 too

on the same pr?

@steve020607

Copy link
Copy Markdown
Collaborator Author

will be quite a lot of commit, since i do it each one of it :p

@steve020607

Copy link
Copy Markdown
Collaborator Author

the rest of the luals error seems like i'm just don't know what it is
can someone check that?

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why did you adjust the non widget stuff too?

that would need a refactor and when doing so should move into the new structure we want for features

@steve020607

steve020607 commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

why did you adjust the non widget stuff too?

that would need a refactor and when doing so should move into the new structure we want for features

So only widget characterstats and widget characterstats table?
I though all of it :/
I kinda misunderstanding it a bit, will kinda revert it when i'm home

Comment thread lua/wikis/commons/Widget/CharacterStats.lua Outdated
Comment thread lua/wikis/commons/Widget/CharacterStats.lua
Comment thread lua/wikis/commons/Widget/CharacterStats/Table.lua
Comment thread lua/wikis/commons/Widget/CharacterStats/Table.lua Outdated
Comment thread lua/wikis/commons/Widget/CharacterStats.lua Outdated

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

skimmed through it, seems okay

@steve020607 steve020607 changed the title feat(CharacterStats): CharacterStats to Table2 refactor(CharacterStats): CharacterStats to Table2 and widget3 Aug 17, 2026
@Rathoz
Rathoz requested a lite review from Copilot August 20, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

lua/wikis/commons/Widget/CharacterStats/Table.lua:349

  • The "complete statistics" link row uses a hard-coded colspan = 22, but the actual column count varies with #props.sides and whether bans/global bans are included (e.g., Brawl Stars has 0 sides; LoL/HOK have 2; includeGlobalBans defaults to false). A mismatch can break table layout/sorting by creating extra implicit columns.
				colspan = 22,

Comment thread lua/wikis/commons/Widget/CharacterStats.lua Outdated
Comment thread lua/wikis/commons/Widget/CharacterStats.lua Outdated
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
@Rathoz
Rathoz merged commit 47417ac into main Aug 20, 2026
8 checks passed
@Rathoz
Rathoz deleted the CharacterStats-table2 branch August 20, 2026 12:10
MischiefCS pushed a commit that referenced this pull request Sep 24, 2026
* refactor: CharacterStats to Table2

* Suggestion by @Copilot

* all of the checker will not liked this commit :p

* As claude suggest

* as me and claude says

* LINT

* huhhhh, idk why the commit just doing that

* well

* unused import(lua style)

* well misunderstood it :p, revert non widget module

* Add anno as suggestion

* chore: update visual snapshots

* suggestion

* correcting anno and remove diagnostic

* chore: update visual snapshots

* use nil instead of bool

* suggestion

* suggestion

Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>

---------

Co-authored-by: steve020607 <172269042+steve020607@users.noreply.github.com>
Co-authored-by: hjpalpha <75081997+hjpalpha@users.noreply.github.com>
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants