Skip to content

feat(PrizePool): redesign table via Table2 with collapse rework#7688

Open
Eetwalt wants to merge 52 commits into
mainfrom
pp-redesign
Open

feat(PrizePool): redesign table via Table2 with collapse rework#7688
Eetwalt wants to merge 52 commits into
mainfrom
pp-redesign

Conversation

@Eetwalt

@Eetwalt Eetwalt commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migrate prize pool table rendering from the legacy Widget/Table to Widget/Table2 (header/body/footer sections, declarative rowspan/colspan)
  • Reorder columns: Participant moves directly after Place; points column now renders before qualifies; currency/points cells right-aligned
  • Rework collapse: class-based general-collapsible toggle rendered in the footer, replacing the per-row applyToggleExpand machinery; child classes now only supply open/close label text
  • Rewrite per-column prize-cell merging via a prize matrix + Array.groupAdjacentBy/Table.deepEquals, extracted into _opponentPrizeCells
  • Display placements as plain numbers/ranges (e.g. 1, 1-2) instead of ordinals, with colored gold/silver/bronze badges and pale row tints for top-3
  • Restyle stylesheet for the Table2 structure; skip the legacy JS toggle when the table is inside .prizepool-table-wrapper
  • Emit rowspan/colspan from Table2 Cell/CellHeader even without column definitions

How did you test this change?

dev + devtools

Before After
image image
image image

@Eetwalt Eetwalt requested a review from a team as a code owner June 23, 2026 09:30
Copilot AI review requested due to automatic review settings June 23, 2026 09:30
@Eetwalt Eetwalt requested a review from a team as a code owner June 23, 2026 09:30
@Eetwalt Eetwalt added c: standard c: prize_pool stylesheets Changes to stylesheets javascript Changes to JavaScript files labels Jun 23, 2026
@hjpalpha

Copy link
Copy Markdown
Collaborator

since we are at it this should also take room for currency switch into account

This can be in a separate PR imo

there already is #7687
but it will obviously get a shit ton of merge conflicts with this PR :P

@ElectricalBoy

Copy link
Copy Markdown
Collaborator

there already is #7687 but it will obviously get a shit ton of merge conflicts with this PR :P

there's no way that there won't be a merge conflict
that thing is grid-based :p

Comment thread stylesheets/commons/Prizepooltable.scss Outdated
Comment thread stylesheets/commons/Prizepooltable.scss Outdated
Comment thread lua/wikis/commons/Widget/GeneralCollapsible/ChevronToggle.lua Outdated
Comment thread stylesheets/commons/Prizepooltable.scss
@Eetwalt

Eetwalt commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Looking at https://liquipedia.net/dota2/index.php?title=BLAST/SLAM/7 with old and new prizepool, there seems to be not much difference

New Old
image image

@Eetwalt Eetwalt requested a review from ElectricalBoy June 29, 2026 10:33
Comment thread lua/wikis/commons/Widget/GeneralCollapsible/ChevronToggle.lua Outdated
Comment thread javascript/commons/ExportImage.js
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
end

return start
return tostring(self.placeStart)

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.

I don't think we need tostring here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I believe we do, as self.placeStart get gsub :ed at Placement.lua:174 and Import.lua:539 later, which will error out right? Before it got Ordinal.toOrdinal which returned a string, but now we don't use ordinals so we need to do tostring here I think

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.

other solution would be to use string.gsub(self:_displayPlace(), '-', '-') in line 174
(string.gsub converts it to string before the gsub, while :gsub requires a string beforehand)

Comment thread lua/wikis/commons/Widget/GeneralCollapsible/ChevronToggle.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool.lua Outdated
Comment thread lua/wikis/commons/PrizePool.lua Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: prize_pool c: standard javascript Changes to JavaScript files stylesheets Changes to stylesheets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants