Skip to content

feat(autofix): Fix deprecated Configuration APIs#699

Merged
maxreichmann merged 12 commits into
mainfrom
autofix-basic-configuration-apis-rebased
Jun 26, 2025
Merged

feat(autofix): Fix deprecated Configuration APIs#699
maxreichmann merged 12 commits into
mainfrom
autofix-basic-configuration-apis-rebased

Conversation

@RandomByte

@RandomByte RandomByte commented Jun 13, 2025

Copy link
Copy Markdown
Member

Based on #683 and #685

JIRA: CPOUI5FOUNDATION-1038

@RandomByte
RandomByte force-pushed the autofix-basic-configuration-apis-rebased branch from 387c180 to 380a937 Compare June 13, 2025 12:19
@maxreichmann
maxreichmann force-pushed the autofix-basic-configuration-apis-rebased branch from afe10d5 to e719759 Compare June 16, 2025 14:43
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
@maxreichmann
maxreichmann force-pushed the autofix-basic-configuration-apis-rebased branch 2 times, most recently from 829e96a to 3c2f75b Compare June 17, 2025 12:27
@maxreichmann maxreichmann changed the title feat(autofix): Fix basic deprecated Configuration APIs feat(autofix): Fix deprecated Configuration APIs Jun 18, 2025
@maxreichmann
maxreichmann force-pushed the autofix-basic-configuration-apis-rebased branch 2 times, most recently from b36d877 to f1a0571 Compare June 21, 2025 13:04
@maxreichmann
maxreichmann marked this pull request as ready for review June 21, 2025 13:17
@maxreichmann
maxreichmann requested a review from a team June 21, 2025 13:17

@RandomByte RandomByte left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just one nitpick, otherwise looking great!

Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
@CLAassistant

CLAassistant commented Jun 23, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@maxreichmann
maxreichmann force-pushed the autofix-basic-configuration-apis-rebased branch from e61bb24 to 18a9939 Compare June 24, 2025 09:06
@RandomByte

Copy link
Copy Markdown
Member Author

LGTM

codeworrior
codeworrior previously approved these changes Jun 24, 2025

@codeworrior codeworrior left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

My two comments should not prevent a submit.

// migration is currently not possible if the return value is used
// This could be optimized with an advanced migration that detects how the return
// value is used and e.g. migrates to something like
// (getAnimationMode() !== sap.ui.core.Configuration.AnimationMode.none)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why can't this be replaced like this in general?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This comment proposes that

if (Configuration.getAnimation())

becomes

if ((Configuration.getAnimationMode() !== sap.ui.core.Configuration.AnimationMode.none))

Now you're proposing that any usage of Configuration.getAnimation() could safely be replaced with (Configuration.getAnimationMode() !== sap.ui.core.Configuration.AnimationMode.none), right?

I guess that's correct!

@codeworrior codeworrior Jun 24, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, that was my proposal. But meanwhile I noticed that the code in sap/Ui/core/Configuration is slightly more complex (it checks the opposite, that none of the false values are set - depends on the evolution of the enum whether this remains equivalent).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Resolved due being too unsafe to migrate?

Comment thread src/linter/ui5Types/fix/collections/sapUiCoreFixes.ts Outdated
@RandomByte

Copy link
Copy Markdown
Member Author

LGTM

@RandomByte
RandomByte requested a review from codeworrior June 25, 2025 11:03
codeworrior
codeworrior previously approved these changes Jun 26, 2025

@codeworrior codeworrior left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, too

@maxreichmann
maxreichmann force-pushed the autofix-basic-configuration-apis-rebased branch from 8eca40c to a21e9d6 Compare June 26, 2025 08:15
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 86.482% (+0.03%) from 86.45%
when pulling a21e9d6 on autofix-basic-configuration-apis-rebased
into 49f54a8 on main.

@codeworrior codeworrior left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still LGTM

@maxreichmann
maxreichmann merged commit 372d80b into main Jun 26, 2025
67 of 73 checks passed
@maxreichmann
maxreichmann deleted the autofix-basic-configuration-apis-rebased branch June 26, 2025 09:52
@flovogt flovogt mentioned this pull request Jul 8, 2025
10 tasks
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.

5 participants