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

Feature request: Add support for notification of changes to [dir] on <html> and <body> #5761

Closed
parker-mike opened this issue Jul 14, 2017 · 3 comments
Labels
area: cdk/bidi feature This issue represents a new feature or feature request rather than a bug or bug fix P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@parker-mike
Copy link

As specified in guides/bidirectionality.md regarding change property of Directionality:

It will not emit for changes to dir on and , as these are assumed to be static.

I'm not sure that this is a correct assumption to make, since overlayed items(div.cdk-overlay-container) are generated outside the Angular application context, so currently we don't have a single point to change the layout of the application. And since overlayed items, like dialogs, do represent integral parts of an application, I believe that it should be possible to notify these components of changes to dir on <html> and <body> using the same Directionality feature, since these nodes are the only common ancestors of both div.cdk-overlay-container and Angular application context.

Since @jelbourn in his comment said that this is something that could potentially change in a subsequent iteration, I decided to open this feature request for a discussion.

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Aug 17, 2017
@zehavibarak
Copy link

Could be helpful. Right now we need to set direction on every dialog open, and set dir manually per overlay portal.

@jelbourn
Copy link
Member

Closing this since it's a pretty niche use-case to need to know when the dir changes outside of the Angular context. If someone really needs it, you can provide a custom Directionality that does this via a MutationObserver.

@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 May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/bidi feature This issue represents a new feature or feature request rather than a bug or bug fix P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

4 participants