Skip to content

Define a separate attribute for accessing user rendered components #334

@kof

Description

@kof

Right now class names are misused for that purpose. The reasoning is - classes used internally for styling should be a private implementation detail of sg, they shouldn't be used at the same time for accessing containers for visual testing. It makes a false assumption for a user that he should override styles using class names. It is better to use the default generateClassName function which generates unique class names, to make the intent clear.

In order to give a user an access to the container through the dom, we can use for e.g. a 'data-container' attribute with a specified container name or even path.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions