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

simplify media manager panel height #3935

Merged
merged 1 commit into from Apr 4, 2023
Merged

Conversation

splitbrain
Copy link
Collaborator

The height of the panel was calculated in JavaScript, trying to use the remaining space. With larger headers that lead to a relatively small area. In addition the height calculation behaved weirdly on certain resolutions (in some templates) resulting in a decreasing height on each image interaction.

This patch simply sets the panel height 60% of the browser window using the vh unit (which was not available when the media manager was written).

To keep backward compatibility and not accidentally break a bunch of templates, the height is still set from JavaScript but only once instead of updating it on every resize operation.

A proper refactoring of the whole media manager code is still something we need to tackle in the future, but this change should make it slightly better.

The height of the panel was calculated in JavaScript, trying to use the
remaining space. With larger headers that lead to a relatively small
area. In addition the height calculation behaved weirdly on certain
resolutions (in some templates) resulting in a decreasing height on each
image interaction.

This patch simply sets the panel height 60% of the browser window using
the vh unit (which was not available when the media manager was
written).

To keep backward compatibility and not accidentally break a bunch of
templates, the height is still set from JavaScript but only once instead
of updating it on every resize operation.

A proper refactoring of the whole media manager code is still something
we need to tackle in the future, but this change should make it slightly
better.
@splitbrain splitbrain merged commit 5399538 into master Apr 4, 2023
14 of 16 checks passed
@splitbrain splitbrain deleted the mediamanagerheight branch April 4, 2023 07:08
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.

None yet

1 participant