X Tutup
Skip to content

fix(class): allow class names with mixed case#3264

Closed
pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
pkozlowski-opensource:issue3001
Closed

fix(class): allow class names with mixed case#3264
pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
pkozlowski-opensource:issue3001

Conversation

@pkozlowski-opensource
Copy link
Copy Markdown
Member

Fixes #3001

@pkozlowski-opensource
Copy link
Copy Markdown
Member Author

@tbosch I've moved the normalization of class names to the ProtoViewBuilder so we are not messing with the casing for class names that come from JS (class directive or host properties). IMO we could / should do this with attribute and style names as well, but wanted to check with you first.

Could you PTAL?

@pkozlowski-opensource pkozlowski-opensource added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jul 24, 2015
@tbosch
Copy link
Copy Markdown
Contributor

tbosch commented Jul 24, 2015

This looks good, the only question is which interface we want to provide for people that use the Renderer directly: Before this PR they would always send over camelCase class/attribute/style names and let the renderer decide whether it supports camelCase or not. I.e. directives would be more independent of the renderer than with the PR.

Having said this, we also have issues with the auto camel casing (#3001). So yes, let's do it, but please mark this as a BREAKING CHANGE.

@pkozlowski-opensource
Copy link
Copy Markdown
Member Author

@tbosch I would say that the renderer shouldn't touch CSS class casing (hence this change, that was done to fix #3001). We do those case-converting massaging only to handle [class.my-class]=exp properly.

Agree that it is a breaking change, will mark as one (although I don't think it is going to break peoples code, hopefully)

@tbosch tbosch added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 24, 2015
@tbosch
Copy link
Copy Markdown
Contributor

tbosch commented Jul 24, 2015

Should we merge this as is or wait for more changes to come?

Fixes angular#3001

BREAKING CHANGE:

View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.
@pkozlowski-opensource
Copy link
Copy Markdown
Member Author

@tbosch I've updated the commit message to add info about the breaking change. Let's land this one so it doesn't become bit-rotten - I will take care of attributes and styles in a separate PR.

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to turn off dash case for CSSClass directive

3 participants

X Tutup