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

FocusCycler's #focusables collection should only contain FocusableView instances #15632

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

oleq
Copy link
Member

@oleq oleq commented Jan 4, 2024

Suggested merge commit message (convention)

Other (ui): FocusCycler's #focusables collection should only contain FocusableView instances. Closes #14973.

MINOR BREAKING CHANGE (ui): The view collection focusables required by FocusCycler#constructor() must only contain views implementing the FocusableView interface. Failing to do so will result in a TypeScript error. If your custom code creates FocusCycler instances, please make sure that all views passed in focusables implement the focus() method.


Additional information

Requires https://github.com/cksource/ckeditor5-commercial/pull/5886

@oleq oleq force-pushed the ck/15631-unified-focuscycler-collection branch from 530c13d to 0860906 Compare January 4, 2024 15:03
@scofalik scofalik requested a review from arkflpc January 5, 2024 14:37
Copy link
Contributor

@scofalik scofalik left a comment

Choose a reason for hiding this comment

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

LGTM. I added some questions.

Do we want to merge this as MINOR BREAKING CHANGE?

@oleq
Copy link
Member Author

oleq commented Jan 8, 2024

Do we want to merge this as MINOR BREAKING CHANGE?

I think so. Before these changes, developers were able to populate FocusCycler's focusable collection with non-focusable views. It worked because the system has JS mechanisms built-in to work around this. After this PR, their TS projects will show errors and they'll need to stop adding these (invalid) views there. It may involve some conditions or some filtering but still - there will be some action required.

@oleq oleq requested a review from scofalik January 8, 2024 10:54
@scofalik scofalik merged commit bd80b20 into ck/14973-dialogs Jan 8, 2024
@scofalik scofalik deleted the ck/15631-unified-focuscycler-collection branch January 8, 2024 15:55
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.

3 participants