Skip to content

feat(ratings): use new table#7160

Open
Eetwalt wants to merge 11 commits intomainfrom
d2r-redesign
Open

feat(ratings): use new table#7160
Eetwalt wants to merge 11 commits intomainfrom
d2r-redesign

Conversation

@Eetwalt
Copy link
Collaborator

@Eetwalt Eetwalt commented Feb 25, 2026

Summary

Migrate the Rating table (used in dota2 rankings) to the new Table2 widget.

How did you test this change?

|dev=drd + dev tools

Before:
image

After:
image

Mainpage:
image

@Eetwalt Eetwalt requested a review from a team as a code owner February 25, 2026 14:17
Copilot AI review requested due to automatic review settings February 25, 2026 14:17
@Eetwalt Eetwalt requested a review from a team as a code owner February 25, 2026 14:17
@Eetwalt Eetwalt added c: ratings stylesheets Changes to stylesheets labels Feb 25, 2026
Copy link
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 migrates the Dota2 Rankings table from a legacy HTML table structure to the new Table2 widget system. The migration modernizes the table implementation while maintaining all existing functionality including graph toggling, responsive design, and data attributes required by JavaScript handlers.

Changes:

  • Migrated from manual HTML table elements (HtmlWidgets.Table/Tr/Td/Th) to Table2 widget components (TableWidgets.Table/Row/Cell/CellHeader)
  • Refactored SCSS styling to work with Table2's structure, removing legacy wrapper/border styles and updating selectors
  • Added striped prop to Table2 widget with default value of true, allowing tables to opt-out of automatic striping

Reviewed changes

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

File Description
stylesheets/commons/RankingTable.scss Updated styles to work with Table2 structure; removed legacy wrapper/border styles; simplified row and graph styling
lua/wikis/commons/Widget/Table2/TableBody.lua Added support for disabling automatic row striping when BodyStripe context is nil
lua/wikis/commons/Widget/Table2/Table.lua Added striped prop (default true) to allow tables to control automatic row striping
lua/wikis/commons/Widget/Ratings/List.lua Migrated from legacy table structure to Table2 widget; restructured title as widget prop; converted all rows and cells to Table2 components

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

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

Labels

c: ratings stylesheets Changes to stylesheets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants