Skip to content

Conversation

@lulco
Copy link
Collaborator

@lulco lulco commented Oct 5, 2025

Resolved https://en.boardgamearena.com/bug?id=61987

Some screenshots from BGA studio

image
image
image

@lulco lulco requested a review from kuwizard October 5, 2025 14:00
if (isset($data['player'])) {
$data['player_id'] = $data['player']->getId();
$data['player_name'] = $data['player']->getName();
$data['player_name'] = !isset($data['player_name']) ? $data['player']->getName() : $data['player_name'];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please invert !isset to isset? It's harder to read ternary conditions when it starts with !

return $this->name;
$name = $this->name;
if ($withCharacter && $this->getCharName()) {
$name .= ' (' . $this->getCharName() . ')';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we go with JS-like syntax: $name = "{$name} ({$this->getCharName()})" ? It's much more readable IMO

@kuwizard
Copy link
Collaborator

kuwizard commented Oct 14, 2025

Looks great overall actually, thanks for adding this.
One general comment - @lulco, could you add some top and bottom margins a bit before and after the character name at playerboard? It looks a bit messy now

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants