-
-
Notifications
You must be signed in to change notification settings - Fork 313
Fix: Redesigned Side Navbar with Improved UI/UX & Responsiveness #3984
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
Conversation
WalkthroughThe sidebar navigation in the HTML template has been completely redesigned. The layout and styling have been overhauled with updated CSS classes, transition effects, and fixed dimensions. Internal elements now use a semantic Changes
Assessment against linked issues
Suggested reviewers
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (10)
website/templates/includes/sidenav.html (10)
7-9: Sidebar Container: Responsiveness & Transition Effects
The sidebar container is now set with a fixed width (w-[350px]) and its height is calculated usingcalc(100vh-4rem), which clearly expresses the intended design. The use of utility classes for the transform and transition (e.g.-translate-x-full,transition-all duration-300 ease-in-out) is well thought out for smooth toggle animations.
However, using a hard-coded width might not be optimal on very small screens. Consider using responsive width utilities (for example, setting a max-width or adjusting the width for smaller breakpoints) to further improve mobile usability.
12-16: Organizations Section Header Styling Conflict
In the header for the Organizations section (line 15), the element has bothtext-red-500andtext-gray-500classes. This likely causes a conflict in text color styling. Please verify if the intention was to override one color with the other or if one of them should be removed to avoid visual inconsistency.
114-124: Projects Section: Layout & Header Consistency
The Projects section header and its primary link follow a similar structure as the Organizations section. Note that the header again includes bothtext-red-500andtext-gray-500, which could lead to a conflicting color result. Confirm whether the intended design is to mix these or if one should be removed. The conditional active-state logic applied to the project link is clear and consistent.
127-163: Projects Submenu Items: Repetition & Maintainability
The submenu under Projects (including links like Repositories, Bid on Issues, Funding, and BACON) consistently applies conditional styling and similar layouts. The repetition of similar utility classes across multiple links suggests that a refactor into a reusable component, template snippet, or macro could help improve maintainability over time.
165-221: Users Section: Structure & Accessibility Considerations
The Users section (header and submenu items like Messaging, Challenges, Leaderboard, Contributors, Takedowns, Badges) is well organized with consistent styling and hover effects. For a future enhancement, consider adding ARIA roles or labels to the navigation links and icons to improve accessibility for screen readers.
223-259: Teams Section: Consistency & Responsive Behavior
The Teams section follows the established pattern with a clear header and submenu items. The styling (including active state indications) is consistent with earlier sections. Similar to previous comments, if the sidebar is to be used on mobile devices, ensure that nested submenus (e.g. “Your Team”, “Challenges”, “Leaderboard”) remain easily navigable.
260-272: About Us Section: Clarity & Icon Semantics
The About Us link is styled similarly to other sections. Consider augmenting the icon markup with ARIA labels or providing visually hidden text to improve accessibility, ensuring that the purpose of the icon is clear to all users.
313-386: Contribute Section: External Links & Structural Clarity
The Contribute section groups several external and internal links (such as Documentation, Developer API, Education, etc.) in a well-structured submenu. External links use appropriate attributes (liketarget="_blank") for safe browsing. Verify that the URL conditionals remain robust if routes change in the future. Additionally, if this section broadens further, consider grouping similar items together for enhanced clarity.
521-575: Footer Links Section: Navigation & Future Scalability
The “Site Info” footer links (including Sitemap, Roadmap, Status, Stats, etc.) are arranged using the same conditional styling and layout structure. As the list of footer links grows, you might consider grouping or collapsing items into smaller segments to avoid overcrowding, especially on smaller screens.
589-615: Language Selector: Enhancing Accessibility
The language selector form is implemented functionally with a dropdown and proper form submission using Django’s CSRF token. For better accessibility, consider adding a label (or an aria-label) to clearly indicate the purpose of the dropdown for screen readers. This small improvement can help ensure that the interface is accessible to all users.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
website/templates/includes/sidenav.html(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Run Tests
- GitHub Check: Analyze (python)
- GitHub Check: docker-test
🔇 Additional comments (6)
website/templates/includes/sidenav.html (6)
17-23: Organizations Link Active State Logic & Consistency
The anchor for the Organizations link uses a conditional to check if the current URL contains “/organizations/” to apply active state styling. This approach is consistent throughout the sidebar and helps highlight the active section. Just ensure that this condition handles edge cases (such as query parameters or deeper URL paths) as intended.
24-32: Organizations Submenu Implementation
The submenu items under Organizations (e.g. Domains, Map, Feed, Hackathons) use consistent utility classes for spacing and hover/active states. The use of conditional classes is well applied here. It might be worthwhile to verify on different screen sizes that the submenu behaves as expected (e.g. proper spacing and overflow handling).
387-438: GitHub Section: External Integration & Security
The GitHub section is neatly arranged, including a prominent external link to the GitHub repository with proper security attributes (noopener noreferrer). The submenu items for additional GitHub-related links maintain consistency in styling. No immediate changes are necessary here.
459-479: Apps Section: External Link Consistency
The Apps section provides links to the iPhone App and the Chrome Extension. The utility classes and hover effects are consistent with other sections. Double-check that external links (and their associated icons) render well on all device sizes.
481-520: Social Links Section: Design & Interaction
The Social Links section, featuring Twitter and Facebook links, applies similar styling to previous sections and includes proper external link attributes. The design appears consistent; just ensure that icon contrast and text truncation behave as intended across various screen resolutions.
576-588: Legal Section: Simple & Consistent
The Terms link under the Legal section follows the established design and is implemented correctly. There are no immediate concerns with this section.
DonnieBLT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you have the headers, we don't need the duplicates, so maybe you can have the organization header and under it say "view organizations" and similar for the rest. Also since you have the headers we may not need the indentation anymore and it may look more consistent
|
I added two headers because the second header, like in the Organization section, is a link. I wanted to keep them separate. And in the Image below, earlier these components didn't have headers, so I added an extra red header for better readability. I think I should remove the red headers for sections that already have a header and keep them for sections that don't, like social links. |
|
I like the headers with no indentation |
|
Would be cool if they all look like that last image |
| class="flex items-center w-full no-underline p-2 {% if request.path == '/trademarks/' %}text-black{% else %}hover:text-[#e74c3c] text-black{% endif %}"> | ||
| <div class="w-6 mr-4 text-[#e74c3c]"> | ||
| <i class="fas fa-registered fa-lg"></i> | ||
| </div> | ||
| <span>Trademarks</span> | ||
| </a> | ||
| </li> | ||
| <li class="mb-2 {% if request.path == '/similarity-scan/' %}bg-gray-200{% endif %}"> | ||
| <a href="{% url 'similarity_scan' %}" | ||
| class="flex items-center w-full no-underline p-2 {% if request.path == '/similarity-scan/' %}text-black{% else %}hover:text-[#e74c3c] text-black{% endif %}"> | ||
| <div class="w-6 mr-4 text-[#e74c3c]"> | ||
| <i class="fas fa-clone fa-lg"></i> | ||
| </div> | ||
| <span>SimilarityScan</span> | ||
| </a> | ||
| </li> | ||
| <li class="mb-2 {% if request.path == '/discussion-rooms/' %}bg-gray-200{% endif %}"> | ||
| <a href="{% url 'rooms_list' %}" | ||
| class="flex items-center w-full no-underline p-2 {% if request.path == '/discussion-rooms/' %}text-black{% else %}hover:text-[#e74c3c] text-black{% endif %}"> | ||
| <div class="w-6 mr-4 text-[#e74c3c]"> | ||
| <i class="fas fa-door-open fa-lg"></i> | ||
| </div> | ||
| <span>Rooms</span> | ||
| </a> | ||
| </li> | ||
| <li class="mb-2"> | ||
| <a href="{% url 'video_call' %}" | ||
| class="flex items-center w-full no-underline p-2 {% if request.path == '/video-call/' %}text-black{% else %}hover:text-[#e74c3c] text-black{% endif %}"> | ||
| <div class="w-6 mr-4 text-[#e74c3c]"> | ||
| <i class="fas fa-video fa-lg"></i> | ||
| </div> | ||
| <span>Video Call</span> | ||
| </a> | ||
| </li> | ||
| <li class="mb-2 {% if request.path == '/banned-apps/' %}bg-gray-200{% endif %}"> | ||
| <a href="{% url 'banned_apps' %}" | ||
| class="flex items-center w-full no-underline p-2 {% if request.path == '/banned-apps/' %}text-black{% else %}hover:text-[#e74c3c] text-black{% endif %}"> | ||
| <div class="w-6 mr-4 text-[#e74c3c]"> | ||
| <i class="fas fa-ban fa-lg"></i> | ||
| </div> | ||
| <span>Banned Apps</span> | ||
| </a> | ||
| </li> | ||
| </ul> | ||
| <!-- Spacer --> | ||
| <div class="my-4 border-t border-gray-300"></div> | ||
| <!-- Projects Header Link --> | ||
| <li class="mb-2 {% if request.path == '/projects/' %}bg-gray-200{% endif %}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rinkitadhana can you add these back please, I missed this during review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think the links got removed accidentally. I will add them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I remember, I was making a separate section for these links because they were not related to the organization, and I forgot to add them back.
Fixes #3983
Changes Introduced in This PR:
Before:
2025-03-18.22-15-34.mp4
After:
2025-03-18.22-17-00.mp4
Summary by CodeRabbit