-
Notifications
You must be signed in to change notification settings - Fork 680
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
[BUG] Docs | Side menu truncated on reduced widths #5194
Comments
Thank you for opening your first issue here! 🛠 |
Hey @teocns! Great to see you back 🚀! Ran into another quirky adventure on the Flyte docs site, huh? Let's dive into this together! Thank you for bringing this to our attention. It seems like the sidebar's responsiveness could indeed be improved to accommodate various screen sizes and zoom levels. Here are some suggestions on how to address this issue:
@media only screen and (max-width: 1199px) {
.sidebar-drawer {
width: 16em; /* Adjust the width as needed for smaller screens */
}
}
@media only screen and (max-width: 768px) {
.sidebar-drawer {
width: 12em; /* Further adjust for even smaller screens */
}
}
/* Add a button to toggle the sidebar visibility */
.sidebar-toggle-btn {
position: fixed;
top: 20px;
left: 20px;
z-index: 1001; /* Ensure it's above other content */
cursor: pointer;
background-color: #9d68e4; /* Match the theme */
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
}
/* Style to hide the sidebar */
.sidebar-hidden .sidebar-drawer {
transform: translateX(-100%);
transition: transform 0.3s ease-in-out;
}
/* Ensure content area expands to fill the space */
.sidebar-hidden .content-area {
margin-left: 0;
} And the JavaScript to toggle the sidebar visibility: document.addEventListener('DOMContentLoaded', function() {
const toggleBtn = document.createElement('button');
toggleBtn.classList.add('sidebar-toggle-btn');
toggleBtn.textContent = 'Toggle Sidebar';
toggleBtn.addEventListener('click', function() {
document.body.classList.toggle('sidebar-hidden');
});
document.body.appendChild(toggleBtn);
});
.sidebar-drawer {
overflow-y: auto; /* Allows scrolling */
height: 100vh; /* Full viewport height */
} These changes aim to make the sidebar more responsive and accessible across a range of devices and zoom levels. Adjust the specific values (e.g., widths, colors) as needed to match the Flyte documentation site's design and layout preferences. Please note that these changes should be made in the docs/_static/flyte.css file. I hope this helps! If you have any further questions or need additional clarification, please don't hesitate to ask. Sources
|
Dosubot seems to make sense!? |
Hello @davidmirror-ops , I'd love to try out Dosubot's recommendations on fixing this 😅 |
@vickywane great! Please let us know soon if you have questions. Thanks |
@vickywane I've tried resizing the window and zooming in and out, but I'm not experiencing the behavior described in the issue. Could you please provide more specific details or steps to reproduce the problem? It would be helpful to know if this happens under certain conditions, such as specific screen resolutions or browser types. |
Describe the bug
Expected behavior
Additional context to reproduce
Zoom in and out on a tight window width
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: