Skip to content

Conversation

@rrrr08
Copy link
Contributor

@rrrr08 rrrr08 commented Oct 18, 2025

Problem
Filter tabs on the search results page require horizontal scrolling on mobile devices, creating a poor user experience.

Solution
Implement responsive design with:

Desktop (>768px): Horizontal tabs (unchanged)
Mobile (≤768px): Dropdown menu
Both UIs exist in HTML; CSS media queries control visibility.

Changes
docs/templates/docs/search_results.html: Add filter-tabs div and filter-dropdown select
djangoproject/scss/_style.scss: Add responsive styles with @media queries

Benefits
No horizontal scrolling on mobile
Touch-friendly dropdown interface
Maintains accessibility (ARIA labels, keyboard navigation)
Desktop experience unchanged

Fixes #2266

@sarahboyce
Copy link
Contributor

sarahboyce commented Oct 18, 2025

Thank you for the updates! This is for #2266

For others to see, this is what it looks like on mobile:
Screenshot from 2025-10-18 15-58-49

I think:

  • the bottom border shouldn't exist for the dropdown
  • we might want some top margin/padding
  • possibly, we want a filter icon 🤔

Also, we still require a horizontal scroll for tablet screen/small laptop screens
Screenshot from 2025-10-18 16-01-29

So we might want this to snap a little earlier.

A different option could be that we keep the tabs, but on mobile or tablet we have it snap into something like:
All | Option 1 | More (dropdown)
Where Option 1 would be whatever is selected or the first option (if no filter is applied)

@rrrr08
Copy link
Contributor Author

rrrr08 commented Oct 19, 2025

I have improved the UI and the mobile/tablet dropdown logic as you suggested. Please review the changes once.

@sarahboyce
Copy link
Contributor

I think it will help the review if you include screenshots

This is what I see:

Screenshot from 2025-10-19 14-39-46

This is closer to what I recently suggested thank you
I think the main issue here is although "API Reference" is selected, it is not clear visually that this is selected. When I made the suggestion, I expected "All" to always be available (which you have done) but also 1 other tab (in this case it would be "API Reference" and clearly selected) and then the dropdown always says "More"
I also personally don't like having the burger menu when it is a dropdown

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.

Make the search result page filter tabs responsive on mobile

2 participants