Skip to content

Conversation

@stewx
Copy link
Contributor

@stewx stewx commented Sep 11, 2025

Description

This fixes an issue with the context menu in which the menu has an undesired shift in width while expanding, which is caused by scrollbars displaying briefly before disappearing.

The fix is to only apply the overflow: auto once the CSS transition has completed.

How Has This Been Tested?

Opened a photo and opened the context menu

Screenshots (if appropriate)

Before video (slowed down):

contextmenu.mp4

After video (slowed down):

contextmenuafter.mp4

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

Copilot helped

@alextran1502
Copy link
Member

Oh darn, this issue has annoyed me for quite a while. I wonder if there is any native CSS's properties we can use instead of having to rely on the the transition life cycle

@stewx
Copy link
Contributor Author

stewx commented Sep 11, 2025

Are you worried about performance? I can't see that being an issue with this.

@stewx stewx marked this pull request as ready for review September 11, 2025 23:08
@alextran1502 alextran1502 changed the title Fix issue with context menu jank fix: context menu jank Sep 12, 2025
Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

I feel like this must be possible without animations but this is probably good enough for now. Thanks!

@aminomaboul
Copy link

Fixes #17312

@stewx
Copy link
Contributor Author

stewx commented Sep 12, 2025

I removed the comment. Should be good to go now

@alextran1502 alextran1502 merged commit 4059638 into immich-app:main Sep 13, 2025
47 checks passed
jochbru pushed a commit to pixelunioneu/immich that referenced this pull request Sep 16, 2025
* Fix issue with context menu jank by only applying overflow styling when transition is complete

* Remove comment

Co-authored-by: Alex <[email protected]>

---------

Co-authored-by: Alex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants