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

Footer JS-based responsiveness on pages without the sidebar is unnecessary #5196

Open
obulat opened this issue Nov 28, 2024 · 3 comments
Open
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Nov 28, 2024

Current Situation

The footer layout needs to account for the sidebar width (if any) to make its layout responsive. This is achieved by using the JS-based responsiveness. However, this is not necessary on pages that do not have a sidebar, and lead to a layout shifts on the homepage.

Suggested Improvement

Audit the footer layout responsiveness, and only add it on the search layout with the sidebar.

Benefit

Improved performance and less layout shifting.

Additional context

@obulat obulat added ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend labels Nov 28, 2024
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Nov 28, 2024
@dhruvkb
Copy link
Member

dhruvkb commented Nov 30, 2024

@obulat instead of JS-based responsiveness on pages with a sidebar and regular media queries in pages without a sidebar, i think using container queries consistently in both scenarios would be the better approach.

@obulat
Copy link
Contributor Author

obulat commented Nov 30, 2024

I agree, @dhruvkb. This looks like a good guide on implementing container queries while also supporting older browsers: https://web.dev/blog/how-to-use-container-queries-now
We'll need to create a solution that works with Tailwind

@dhruvkb
Copy link
Member

dhruvkb commented Nov 30, 2024

Tailwind supports container queries with an official plugin. I hadn't considered that older browsers will need workarounds, thanks for the guide! Based on Can I use, it seems like the feature is supported for ~93% of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants