Skip to content

feat: Allow View.setBounds to animate - #48812

Merged
jkleinsc merged 17 commits into
electron:mainfrom
TheCommieAxolotl:feat/views
Jan 30, 2026
Merged

jkleinsc merged 17 commits into
electron:mainfrom
TheCommieAxolotl:feat/views

Conversation

@TheCommieAxolotl

@TheCommieAxolotl TheCommieAxolotl commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

Description of Change

Add an optional options object to View.setBounds which, if specified, allows for the use of Chromium's AnimationBuilder to natively animate the bounds change of the view.

vew_animate.mov

Checklist

Release Notes

Notes: Add animation functionality to view.setBounds and add view.setBackgroundBlur

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Nov 6, 2025
@TheCommieAxolotl

Copy link
Copy Markdown
Contributor Author

I'm not quite sure how to test for these changes. I dont see any specs for setBounds currently.

@TheCommieAxolotl
TheCommieAxolotl marked this pull request as ready for review November 7, 2025 00:59
Comment thread shell/browser/api/electron_api_view.cc Resolved
Comment thread shell/browser/api/electron_api_view.cc Resolved
@TheCommieAxolotl TheCommieAxolotl changed the title feat: allow View.setBounds to animate feat: View enhancements Nov 11, 2025

@codebytere codebytere 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.

@TheCommieAxolotl the most recent commit view.setBackgroundBlur should be a different PR

@TheCommieAxolotl

Copy link
Copy Markdown
Contributor Author

Thanks @codebytere , should I remove the blur related changes from this then make a new PR based off this branch as they both now use a shared private GetLayer method on View? Or just bring that change as well to a seperate branch altogether?

@jkleinsc jkleinsc added the semver/minor backwards-compatible functionality label Nov 11, 2025
@reitowo

reitowo commented Nov 11, 2025

Copy link
Copy Markdown
Member

You could move the blur part to a new commit that depends on this, and rebase then start a new PR once this merged.

@TheCommieAxolotl TheCommieAxolotl changed the title feat: View enhancements feat: Allow View.setBounds to animate Nov 11, 2025
Comment thread shell/browser/api/electron_api_view.cc Resolved
Comment thread docs/api/view.md Resolved
Comment thread shell/browser/api/electron_api_view.cc Resolved
@ckerr

ckerr commented Nov 26, 2025

Copy link
Copy Markdown
Member

@reitowo Did the followup commits address your requested changes?

@reitowo reitowo 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.

API LGTM

Comment thread docs/api/view.md Resolved
@TheCommieAxolotl

Copy link
Copy Markdown
Contributor Author

This should now be updated to target the latest main, and I have added a test for bounds change after animating.

@erickzhao erickzhao 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.

API LGTM

@jkleinsc

Copy link
Copy Markdown
Member

@TheCommieAxolotl can you rebase this PR on the latest from main? That should resolve the CI error.

@TheCommieAxolotl

Copy link
Copy Markdown
Contributor Author

@jkleinsc Should be good now

@jkleinsc
jkleinsc merged commit f272723 into electron:main Jan 30, 2026
54 checks passed
@release-clerk

release-clerk Bot commented Jan 30, 2026

Copy link
Copy Markdown

Release Notes Persisted

Add animation functionality to view.setBounds and add view.setBackgroundBlur

@TheCommieAxolotl TheCommieAxolotl mentioned this pull request Apr 16, 2026
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants