Skip to content

feat(squads): use new tables#7127

Merged
Rathoz merged 11 commits intomainfrom
update-roster-tables
Feb 24, 2026
Merged

feat(squads): use new tables#7127
Rathoz merged 11 commits intomainfrom
update-roster-tables

Conversation

@Eetwalt
Copy link
Collaborator

@Eetwalt Eetwalt commented Feb 20, 2026

Summary

This PR:

  • implements the new Table2 widget to Squad tables on team pages.
  • implements logic to not render columns that have no contents in them (most common scenarios being position or loan column for auto squad tables)
    • teamIcon - Shows if any player has a loan to another team
    • name - Shows if any player has name data
    • role/position - Shows if any player has role or position info
    • joindate - Shows if any player has join date
    • inactivedate - Shows for inactive squads with inactive dates
    • leavedate/newteam - Shows for former squads with departure info
  • converts the squad rendering to widget system
  • cleans up unused code from previous implementation (like separate mobile layout, css)

How did you test this change?

|dev=urt on squad tables on team pages. Tested on Dota2, Valorant, CS

Before (manual):
image

After(manual):
image

Before(auto):
image

After(auto):
image

Copilot AI review requested due to automatic review settings February 20, 2026 13:06
@Eetwalt Eetwalt requested a review from a team as a code owner February 20, 2026 13:06
@Eetwalt Eetwalt requested a review from a team as a code owner February 20, 2026 13:06
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 squad tables from the legacy DataTable widget system to the new Table2 widget system, implementing dynamic column visibility to hide empty columns and removing obsolete mobile-specific layouts.

Changes:

  • Replaces DataTable-based squad rendering with Table2 widgets
  • Implements column visibility analysis to hide columns with no data (e.g., team icons for loan status, position/role, dates)
  • Removes old RosterCard.scss and mobile-specific markup
  • Updates SquadRow API to accept columnVisibility parameter and removes cellTitle parameter from date() method
  • Wraps squad output in ColumnVisibility context for propagation to child components

Reviewed changes

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

Show a summary per file
File Description
stylesheets/commons/RosterCard.scss Deleted entire legacy squad table stylesheet (180 lines including mobile responsive styles)
stylesheets/Main.scss Removed import of deleted RosterCard.scss
lua/wikis/commons/Widget/Table2/Cell.lua Added defaultProps with nowrap=true and added buildCellAttributes call for align/nowrap/shrink support
lua/wikis/commons/Widget/Table2/CellHeader.lua Added buildCellAttributes call for header cells to support align/nowrap/shrink properties
lua/wikis/commons/Widget/Squad/Core.lua Migrated from DataTable to Table2 widgets, added column visibility checking in header generation
lua/wikis/commons/Widget/Contexts/Squad.lua Added ColumnVisibility context for propagating visibility state
lua/wikis/commons/Squad/Utils.lua Added analyzeColumnVisibility function, updated defaultRunManual/Auto to compute and pass columnVisibility, updated function signatures to include columnVisibility parameter
lua/wikis/commons/Squad/Row.lua Migrated from Widget.Td/Tr to Table2 Cell/Row, added columnVisibility support, removed mobile-specific markup, removed cellTitle parameter from date() method, simplified content rendering
lua/wikis/stormgate/Squad/Custom.lua Updated _playerRow signature to accept columnVisibility, removed cellTitle arguments from date() calls
lua/wikis/starcraft2/Squad/Custom.lua Updated _playerRow signature to accept columnVisibility, removed cellTitle arguments from date() calls
lua/wikis/starcraft/Squad/Custom.lua Updated inline function in defaultRunManual to accept columnVisibility, removed cellTitle arguments from date() calls
lua/wikis/smash/Squad/Custom.lua Added columnVisibility computation and wrapping with ColumnVisibility context, removed cellTitle arguments from date() calls
lua/wikis/overwatch/Squad/Custom.lua Added columnVisibility computation and passing to _playerRow, added ColumnVisibility context wrapper, removed cellTitle arguments from date() calls
lua/wikis/dota2/Squad/Custom.lua Updated _playerRow signature to accept columnVisibility, removed cellTitle arguments from date() calls

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

Copy link
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.

from quick glance:

  • avoid making direct calls to mw.ext.TeamTemplate (we have #6496 as tracking issue for that)
    use Module:TeamTemplate instead
  • should probably check compatibility with #5523 too (cc @mbergen)

@hjpalpha
Copy link
Collaborator

is it intended to remove the mobile display?

before:
image

after:
image

@Rathoz
Copy link
Collaborator

Rathoz commented Feb 20, 2026

is it intended to remove the mobile display?

yes

@Rathoz Rathoz changed the title feat(squad tables): use new tables feat(squads): use new tables Feb 23, 2026
@Rathoz Rathoz requested a review from ElectricalBoy February 23, 2026 09:05
@Rathoz Rathoz merged commit b6c2d1c into main Feb 24, 2026
7 checks passed
@Rathoz Rathoz deleted the update-roster-tables branch February 24, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants