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: Add type support for "byId" in controllers #423

Merged
merged 9 commits into from
Nov 25, 2024
Merged

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Nov 22, 2024

This feature adds type definitions for byId within controllers so that
the usage of deprecated functionality can be detected when controls or
elements from the view are accessed by their ID.
Previously, only the base element class was known, which is still the
case as a fallback.

JIRA: CPOUI5FOUNDATION-843

@matz3 matz3 requested a review from a team November 22, 2024 17:52
@d3xter666 d3xter666 requested a review from a team November 25, 2024 09:24
This feature adds type definitions for `byId` within controllers so that
the usage of deprecated functionality can be detected when controls or
elements from the view are accessed by their ID.
Previously, only the base element class was known, which is still the
case as a fallback.

JIRA: CPOUI5FOUNDATION-843
@matz3 matz3 force-pushed the support-controller-byId branch from 2eba796 to d4ca693 Compare November 25, 2024 11:52
@matz3 matz3 changed the title feat: Add type support for Controller#byId feat: Add type support for "byId" in controllers Nov 25, 2024
RandomByte
RandomByte previously approved these changes Nov 25, 2024
Copy link
Member

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

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

LGTM

@matz3 matz3 merged commit cc2cf60 into main Nov 25, 2024
13 checks passed
@matz3 matz3 deleted the support-controller-byId branch November 25, 2024 16:44
@openui5bot openui5bot mentioned this pull request Nov 25, 2024
@flovogt flovogt mentioned this pull request Nov 25, 2024
10 tasks
matz3 added a commit that referenced this pull request Nov 27, 2024
This solves an issue where the linter would falsely report access to
global variables in controller code when accessing the controller class
(e.g. by adding methods to the prototype).

The issue was caused by the introduction of type support for "byId" in
controllers and only appears when there is a view that references the
controller.

Caused by: #423
matz3 added a commit that referenced this pull request Nov 28, 2024
This solves an issue where the linter would falsely report access to
global variables in controller code when accessing the controller class
(e.g. by adding methods to the prototype).

The issue was caused by the introduction of type support for "byId" in
controllers and only appears when there is a view that references the
controller.

Caused by: #423
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