Skip to content

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

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

feat(PrizePool): redesign table via Table2 with collapse rework#7688
Eetwalt wants to merge 53 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
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
Comment thread lua/wikis/commons/PrizePool/Placement.lua
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
Comment on lines +17 to +30
---@param class string
---@param text Renderable?
---@param iconName string
---@return Widget
local function labeledButton(class, text, iconName)
return Button{
classes = {class},
children = Span{
children = WidgetUtil.collect(text, text and ' ' or nil, Icon{iconName = iconName}),
},
size = 'sm',
variant = 'ghost',
}
end

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.

Suggested change
---@param class string
---@param text Renderable?
---@param iconName string
---@return Widget
local function labeledButton(class, text, iconName)
return Button{
classes = {class},
children = Span{
children = WidgetUtil.collect(text, text and ' ' or nil, Icon{iconName = iconName}),
},
size = 'sm',
variant = 'ghost',
}
end
---@param buttonType 'expand'|'collapse'
---@param text Renderable?
---@param iconName string
---@return VNode
local function labeledButton(buttonType, text, iconName)
return Button{
classes = {'general-collapsible-' .. buttonType .. '-button'},
children = Span{
children = WidgetUtil.collect(text, text and ' ' or nil, Icon{iconName = iconName}),
},
size = 'sm',
variant = 'ghost',
}
end

Comment on lines +42 to +43
labeledButton('general-collapsible-expand-button', props.expandText, 'expand'),
labeledButton('general-collapsible-collapse-button', props.collapseText, 'collapse'),

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.

Suggested change
labeledButton('general-collapsible-expand-button', props.expandText, 'expand'),
labeledButton('general-collapsible-collapse-button', props.collapseText, 'collapse'),
labeledButton('expand', props.expandText, 'expand'),
labeledButton('collapse', props.collapseText, 'collapse'),

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.

optional: `Module:Widget/GeneralCollapsible/LabeledToggle' maybe?

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.

6 participants