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

Fix sidebar width on window resize #1639

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Fix sidebar width on window resize #1639

merged 5 commits into from
Aug 14, 2024

Conversation

UnniKohonen
Copy link
Contributor

Reasons for creating this PR

Sidebar Vue components do not currently resize correctly with window resizing, this PR fixes that.

Link to relevant issue(s), if any

Description of the changes in this PR

  • Adds an event listener for window resizing in alphabetical and hierarchical components
  • Change the width of the components on window resize event

Addresses requirement 3i in #1521 and 1d in #1563

Known problems or uncertainties in this PR

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@UnniKohonen UnniKohonen added this to the 3.0 milestone Jul 24, 2024
@UnniKohonen UnniKohonen self-assigned this Jul 24, 2024
@UnniKohonen UnniKohonen requested a review from joelit August 8, 2024 06:44
Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

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

LGTM!

The resize listener works as expected. However, the layout itself is not the best in every window width - with window size just under 990px, the right margin disappears and the left margin is set pretty wide, reducing the room for deep hierarchy.
990px

Copy link

Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@UnniKohonen UnniKohonen merged commit 56fd3e6 into main Aug 14, 2024
9 of 10 checks passed
@UnniKohonen UnniKohonen deleted the sidebar-resize branch August 14, 2024 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR)
Development

Successfully merging this pull request may close these issues.

2 participants