Skip to content

fix(layout): improve wiki article responsive layout on narrow viewports - #1961

Closed
carlh7777 wants to merge 1 commit into
e35ventura:testfrom
carlh7777:fix/responsive-wiki-layout
Closed

fix(layout): improve wiki article responsive layout on narrow viewports#1961
carlh7777 wants to merge 1 commit into
e35ventura:testfrom
carlh7777:fix/responsive-wiki-layout

Conversation

@carlh7777

Copy link
Copy Markdown

Summary

Fix responsive layout issues on wiki article pages (header/search, tab bar, infobox, and article width) so narrow viewports no longer clip the search bar or force horizontal page scroll.

Changes in src/styles/wikipedia.css:

  • Raise the two-row mobile header breakpoint from 640px to 768px; search gets a full-width row and header nav links hide on narrow screens
  • Stack infoboxes full-width below 720px instead of floating a fixed 300px box beside article text
  • Add horizontal scrolling to the article tab bar at ≤900px
  • Make .mw-body fluid by default with min(960px, calc(100vw - 48px))
  • Adjust mobile title sizing, anchor scroll offsets (98px header), and table overflow handling

Regression checks updated in scripts/check-mobile-header-search.js.

Why This Should Ship

Readers on phones and narrow tablets currently hit clipped search, cramped tabs, and side-by-side infobox layout that squeezes article text — especially on subnet pages like Subnet 5: Hone. These fixes keep Taopedia readable and navigable on mobile without changing article content or routes.

Review Notes

  • Affected routes: All wiki article pages via WikiLayout.astro / [...slug].astro (e.g. /wiki/subnet_5)
  • Validation: npm run test:mobile-header-search
  • Visual evidence: Before/after at ~390px width on Subnet 5: Hone

| Before | After |
|image
|image|

Before: search clipped, tabs cramped, infobox competing with body text. After: full-width search row, scrollable tabs, stacked infobox.

  • Build/deploy/security: CSS + test script only; no workflow, dependency, or deployment changes

Target Branch

  • This PR targets test
  • This PR targets main only because it promotes test to production

Security Checklist

  • No secrets, tokens, build hooks, wallet seeds, or private endpoints are included
  • No unnecessary workflow, dependency, or deployment changes

Stack infoboxes, scroll the tab bar, and expand the two-row mobile header
so search and article content no longer overflow on phones and tablets.

Co-authored-by: Cursor <cursoragent@cursor.com>
@carlh7777
carlh7777 requested a review from e35ventura as a code owner July 1, 2026 21:23
@taopedia-site-maintainer taopedia-site-maintainer Bot added ui-ux Visual design, layout, or usability work other Maintenance, deployment, tooling, validation, or repo work outside preferred categories labels Jul 1, 2026
@taopedia-site-maintainer

Copy link
Copy Markdown

Verdict: Close

PR #1961: fix(layout): improve wiki article responsive layout on narrow viewports

This PR changes hover-driven on-screen behavior. Code analysis confirms the visible effect only appears during the interaction, so static before/after screenshots cannot demonstrate it (an identical-looking pair is not valid evidence). A short screen recording or GIF is required.

Visual PRs need evidence in the PR description so the maintainer can review the change quickly and reliably. A deploy preview link alone is not enough.

Required evidence for resubmission:

  • Page URL.
  • Viewport width, especially for responsive changes.
  • Action taken (the hover that reveals the change).
  • Expected before behavior.
  • Expected after behavior.
  • A short video/GIF that shows the change happening during the interaction. Static screenshots alone are not accepted for this PR.

Changed files:

  • scripts/check-mobile-header-search.js
  • src/styles/wikipedia.css

CI: Checks still pending: build

Please open a new focused PR with the required evidence attached.


Automated review by Taopedia Site Maintainer.

@carlh7777
carlh7777 deleted the fix/responsive-wiki-layout branch July 2, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other Maintenance, deployment, tooling, validation, or repo work outside preferred categories ui-ux Visual design, layout, or usability work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant