Skip to content

Commit

Permalink
feat(match2): remove flipping of character order in match sumamry (#4904
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Rathoz authored Oct 18, 2024
1 parent a0b1095 commit 19003d0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion components/match2/wikis/clashroyale/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ function CustomMatchSummary._opponentCardsDisplay(args)
wrapperCards:node(display)
display = mw.html.create('div')
:addClass('brkts-popup-body-element-thumbs')
:addClass('brkts-popup-body-element-thumbs-' .. (flip and 'left' or 'right'))
:addClass(flip and 'brkts-popup-body-element-thumbs-right' or nil)
end

display:node(card)
Expand Down
2 changes: 1 addition & 1 deletion components/match2/wikis/splatoon/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function CustomMatchSummary._opponentWeaponsDisplay(props)

local display = mw.html.create('div')
:addClass('brkts-popup-body-element-thumbs')
:addClass('brkts-popup-body-element-thumbs-' .. (flip and 'right' or 'left'))
:addClass(flip and 'brkts-popup-body-element-thumbs-right' or nil)

for _, item in ipairs(displayElements) do
display:node(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function MatchSummaryCharacters:render()
return Div{
classes = {
'brkts-popup-body-element-thumbs',
'brkts-popup-body-element-thumbs-' .. (flipped and 'right' or 'left'),
'brkts-champion-icon'
'brkts-champion-icon',
flipped and 'brkts-popup-body-element-thumbs-right' or nil,
},
children = Array.map(self.props.characters, function(character)
return Character{
Expand Down
10 changes: 2 additions & 8 deletions stylesheets/commons/Brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -555,19 +555,13 @@
}

.brkts-popup-body-element-thumbs {
display: inline-flex;
flex: 1;
min-width: 0.01%;
}

.brkts-popup-body-element-thumbs.brkts-popup-body-element-thumbs-left {
display: inline-flex;
flex-direction: row;
justify-content: left;
}

/* TODO: Remove when able, but is currently needed for hero picks no to lack of wrapper */
.brkts-popup-body-element-thumbs.brkts-popup-body-element-thumbs-right {
display: inline-flex;
flex-direction: row-reverse;
justify-content: right;
}

Expand Down

0 comments on commit 19003d0

Please sign in to comment.