Skip to content

Conversation

JeDeveloppe
Copy link

Bonjour,

Désolé je ne sais pas trop ou faire ceci et j'espère ne pas tout casser.

Est ce possible de rajouter cette fonction couleur sur l'icon ?

Merci

@JeDeveloppe JeDeveloppe requested a review from Kocal as a code owner September 13, 2025 17:38
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Sep 13, 2025
@carsonbot carsonbot changed the title Update Icon.php -> add color Update Icon.php -> add color Sep 13, 2025
Copy link
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution:

  1. Please use the default PR template in your description
  2. You must add test for this new feature, in order to prevent any regression
  3. You also must update existing tests and snapshots, to make the CI checks pass

Thanks

protected IconType $type,
protected int $width = 24,
protected int $height = 24,
protected ?string $color = null, // Nouvelle propriété pour la couleur
Copy link
Member

Choose a reason for hiding this comment

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

The comment does not bring any value

Suggested change
protected ?string $color = null, // Nouvelle propriété pour la couleur
protected ?string $color = null,

Comment on lines +94 to +95
* Note: This only has an effect on SvgIcon and UxIcon types when rendered client-side by the JavaScript controller.
* The color should be a valid CSS color string (e.g., 'red', '#FF0000', 'rgb(255,0,0)').
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Note: This only has an effect on SvgIcon and UxIcon types when rendered client-side by the JavaScript controller.
* The color should be a valid CSS color string (e.g., 'red', '#FF0000', 'rgb(255,0,0)').
* Must be a valid CSS color (e.g.: 'red', '#FF0000', 'rgb(255,0,0)'). Only affects UX Icon or SVG icons.

'type' => $this->type->value,
'width' => $this->width,
'height' => $this->height,
'color' => $this->color, // Ajout de la couleur au tableau de sérialisation
Copy link
Member

Choose a reason for hiding this comment

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

The comment does not bring any value

Suggested change
'color' => $this->color, // Ajout de la couleur au tableau de sérialisation
'color' => $this->color,

@carsonbot carsonbot added Status: Needs Work Additional work is needed and removed Status: Needs Review Needs to be reviewed labels Sep 15, 2025
@Kocal Kocal added Map Feature New Feature labels Sep 15, 2025
@carsonbot carsonbot changed the title Update Icon.php -> add color [Map] Update Icon.php -> add color Sep 15, 2025
@Kocal Kocal changed the title [Map] Update Icon.php -> add color [Map] Add "color" support for SVG and UX Icon icons Sep 15, 2025
Copy link
Member

@smnandre smnandre left a comment

Choose a reason for hiding this comment

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

I'm sorry but for now we cannot accept this PR.

We cannot add a specific non typed/non-validated field on an central object without tests nor full working usage...

Did you try to use metadata on your markers ? Or to follow the other guidelines / advises given on your issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Map Status: Needs Work Additional work is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants