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

feat(cdk/bidi): support auto direction value #23906

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 5, 2021

Adds support for the auto value of the dir attribute. The value gets resolved to ltr or rtl based on browser's locale.

Fixes #10186.

Note: I didn't include a test, because mocking navigator.language is difficult.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround G This is is related to a Google internal issue target: minor This PR is targeted for the next minor release labels Nov 5, 2021
@crisbeto crisbeto requested a review from a team as a code owner November 5, 2021 10:21
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 5, 2021
@devversion devversion removed the request for review from a team November 5, 2021 12:55
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

Could you add a brief paragraph in the docs that explains how we handle "auto"?

src/cdk/bidi/directionality.ts Outdated Show resolved Hide resolved
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes angular#10186.
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Nov 5, 2021
@crisbeto
Copy link
Member Author

crisbeto commented Nov 5, 2021

The feedback has been addressed.

@crisbeto crisbeto removed the action: merge The PR is ready for merge by the caretaker label Nov 5, 2021
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Nov 10, 2021
@mmalerba mmalerba merged commit c381a6c into angular:master Nov 15, 2021
@its-dibo
Copy link

nice work <3 @crisbeto crisbeto

@angular-automatic-lock-bot
Copy link

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 Dec 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Directionality is not implemented for dir="auto"
4 participants