Skip to content

fix(search): Server-render corpus search tabs (#7035) - #7635

Open
stephenstanwood wants to merge 2 commits into
freelawproject:mainfrom
stephenstanwood:7035-server-render-corpus-search-tabs
Open

fix(search): Server-render corpus search tabs (#7035)#7635
stephenstanwood wants to merge 2 commits into
freelawproject:mainfrom
stephenstanwood:7035-server-render-corpus-search-tabs

Conversation

@stephenstanwood

Copy link
Copy Markdown

Fixes

Fixes: #7035

Summary

The homepage search tabs were built with Alpine x-for, so they weren't in the HTML until JS ran and you got a flash. This switches the tabs to Django {% for %} so the labels show up right away. Alpine still handles which tab is selected. I also added a test that checks the labels are in the page HTML.

Deployment

This PR should:

  • skip-deploy (skips everything below)
    • skip-web-deploy
    • skip-celery-deploy
    • skip-cronjob-deploy
    • skip-daemon-deploy

Screenshots

Desktop

I don't have local screenshots yet. Happy to add them if helpful.

Mobile

Same. Tabs are desktop-only in this UI (hidden md:flex), so mobile still uses the scope menu.

Render homepage corpus search tabs with Django so labels appear in the
initial HTML before Alpine loads, while keeping Alpine for selection state.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@CLAassistant

CLAassistant commented Jul 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mlissner

Copy link
Copy Markdown
Member

Hi! Thanks for submitting this. It's important to look at your work to be sure it's correct. Can you please submit screenshots as well?

@stephenstanwood

Copy link
Copy Markdown
Author

Screenshots here! Also verified with JS off: the four tab labels are in the initial HTML (no Alpine flash).

cl-pr-7635-desktop-recap-selected cl-pr-7635-desktop-tabs-closeup cl-pr-7635-desktop-tabs cl-pr-7635-mobile-scope-menu

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.

Server-render corpus search tabs to prevent flash before JS loads

3 participants