Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow for customising prefix of @attr names #265

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Jun 27, 2022

This is a feature we're intending to add just for the 1.x branch of Catalyst, in order to ease the transition into Catalyst 2.0.

This change will respect a attrPrefix static member on a class, and use that to derive the prefix of all @attrs in the class. This will default to data- meaning this is a non-breaking change, but for classes that wish to - they can add, for example, static attrPrefix = '' to remove the data- prefix. This allows us to transition controllers one-by-one while using Catalyst 1.x, which will make the transition to Catalyst 2.x much more straightforward.

This property will not be in Catalyst 2.0, as there is no need for it, as attrs are not prefixed with anything in Catalyst 2.0.

@keithamus keithamus requested a review from a team as a code owner June 27, 2022 11:32
@keithamus keithamus requested a review from srt32 June 27, 2022 11:32
@keithamus keithamus enabled auto-merge June 27, 2022 13:49
@keithamus keithamus merged commit 629ab22 into main Jun 27, 2022
@keithamus keithamus deleted the optional-dash branch June 27, 2022 13:51
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