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/focus-trap) Backwards compatible factory create method #18336

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

vanessanschmitt
Copy link
Collaborator

@vanessanschmitt vanessanschmitt commented Jan 30, 2020

Optionally accept a boolean instead of a ConfigurableFocusTrapConfig
object in the ConfigurableFocusTrapFactory create method, so that
it is backwards compatible with FocusTrapFactory create.

This will enable apps to turn on the new functionality with
{provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory}.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 30, 2020
@jelbourn jelbourn added the target: minor This PR is targeted for the next minor release label Jan 30, 2020
@@ -6,6 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

export class ConfigurableFocusTrapConfig<D = any> {
export class ConfigurableFocusTrapConfig {
defer: boolean = false;
Copy link
Member

Choose a reason for hiding this comment

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

We should have docs on the class and the defer property since it's not immediately obvious what deferring means in this case.

Copy link
Member

Choose a reason for hiding this comment

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

Was this just a request for adding comments or API docs? It looks like this Class isn't in the API docs since it wasn't added to the public API in

export * from './focus-trap/configurable-focus-trap';
export * from './focus-trap/event-listener-inert-strategy';
export * from './focus-trap/focus-trap';
export * from './focus-trap/configurable-focus-trap-factory';
export * from './focus-trap/focus-trap-inert-strategy';

Optionally accept a boolean instead of a ConfigurableFocusTrapConfig
object in the ConfigurableFocusTrapFactory create method, so that
it is backwards compatible with FocusTrapFactory create.

This will enable apps to turn on the new functionality with
{provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory}.
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.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Feb 5, 2020
@andrewseguin andrewseguin merged commit 35421c8 into angular:master Feb 20, 2020
@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 Mar 22, 2020
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 target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants