feat(our-sponsors): Improved sponsor tabs and responsive styling#1292
Conversation
|
@iaadillatif is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
|
✅ Synchronized metadata from Issue #1291:
|
|
@sanjay-kv Sir please check the PR for issue #1291 |
There was a problem hiding this comment.
Pull request overview
This PR updates the “Our Sponsors” page UI to improve responsiveness, stabilize the tab layout, and refine styling (including dark-mode) while aiming to prevent layout issues and style conflicts across breakpoints.
Changes:
- Updated tab button markup (added
tab-labelspans) and removed an in-panel heading for the “Current Sponsors” section. - Added/adjusted Sponsors page CSS for tab styling polish, dark-mode styling, and multiple responsive breakpoints.
- Adjusted heading gradient styling and introduced additional layout guards for smaller screens.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/pages/our-sponsors/index.tsx | Updates tab button markup and removes the “Current Sponsors” heading within the current tab panel. |
| src/pages/our-sponsors/Sponsors.css | Adds scoped tab styling, dark-mode updates, and extensive responsive breakpoint rules for the Sponsors page layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [data-theme="dark"] .sponsor-page .tabs { | ||
| border-color: var(--dark-border); | ||
| background: linear-gradient( | ||
| 180deg, | ||
| color-mix(in srgb, var(--dark-card-bg) 90%, white 10%) 0%, | ||
| var(--dark-card-bg) 100% | ||
| ); |
There was a problem hiding this comment.
color-mix() in the dark-mode tabs background is not supported in some browsers; when unsupported, the entire linear-gradient(...) becomes invalid and the background may drop to none. Add a safe fallback (e.g. a preceding background-color / simpler background value) or avoid color-mix() here to keep dark-mode tabs readable everywhere.
| .TitleText { | ||
| margin-top: 1rem; | ||
| background: linear-gradient( | ||
| 90deg, | ||
| rgb(152 0 255) 0%, | ||
| rgb(246 41 41) 50%, | ||
| rgb(255 169 8) 100% | ||
| #4f46e5 0%, | ||
| #7c3aed 25%, |
There was a problem hiding this comment.
.TitleText is defined as a global class (and redefined in media queries), which can unintentionally affect any other page that uses the same className in the future. To keep the sponsors styles isolated, scope this selector under .sponsor-page (or rename it to something sponsors-specific) and update the JSX accordingly.
| @@ -120,9 +120,6 @@ const OurSponsors: React.FC = () => { | |||
| className={`tab-content ${activeTab === "current" ? "active" : ""}`} | |||
| > | |||
There was a problem hiding this comment.
The “Current Sponsors” tab panel no longer has an in-content heading (while “Past Sponsors” still does). This can reduce page structure/navigation for assistive tech and makes the two panels inconsistent. Consider keeping a heading for the current section (optionally visually hidden) or adding proper tabs semantics (role="tablist"/"tab"/"tabpanel" with aria-controls/aria-labelledby) so the active panel is clearly labeled.
| > | |
| > | |
| <h2 className="sponsors-heading">Current Sponsors</h2> |
| .sponsor-page .tabs { | ||
| justify-content: center !important; | ||
| gap: 0.65rem; | ||
| margin: 0 auto 2rem; | ||
| padding: 0.42rem; | ||
| width: fit-content; | ||
| border: 1px solid #e5e7eb; | ||
| border-radius: 14px; | ||
| background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); | ||
| box-shadow: | ||
| 0 8px 24px rgba(15, 23, 42, 0.06), | ||
| 0 1px 2px rgba(15, 23, 42, 0.05); | ||
| } |
There was a problem hiding this comment.
The sponsors page stylesheet still defines generic global selectors like .tabs, .tab-button, .tab-badge, .tab-content, and .tab-button::after (elsewhere in this file). Because this CSS is bundled globally, these rules can override Docusaurus’ built-in .tabs and other pages’ .tab-button styles (e.g. src/pages/broadcasts/video.css, src/pages/dashboard/dashboard.css). Consider renaming these classes (e.g. sponsor-tabs, sponsor-tab-button, etc.) or scoping all tab-related selectors under .sponsor-page and removing the unscoped versions to prevent cross-page regressions.
| padding: 1px 6px; | ||
| } | ||
|
|
||
| .tab-button::after { |
There was a problem hiding this comment.
In the responsive block this selector is unscoped (.tab-button::after), so at <=968px it will affect every .tab-button across the site (e.g. broadcasts/dashboard tabs), not just the sponsors page. Scope this to .sponsor-page .tab-button::after (or remove it if the pseudo-element is intentionally disabled via .sponsor-page .tab-button::after { display: none; }).
| .tab-button::after { | |
| .sponsor-page .tab-button::after { |
| text-wrap: balance; | ||
| } | ||
|
|
||
| .tab-button::after { |
There was a problem hiding this comment.
This responsive override also targets .tab-button::after without the .sponsor-page prefix, which can unintentionally modify other pages’ tab buttons at <=640px. Scope this rule to the sponsors page (or delete if the pseudo-element is disabled for sponsors tabs).
| .tab-button::after { | |
| .sponsor-page .tab-button::after { |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This PR improves the Sponsors page by fixing responsiveness issues, stabilizing tab layout behavior, resolving a CSS build error, isolating class names to prevent global style conflicts, and refining visual polish for a premium UI experience.
Fixes #1291
Type of Change
Changes Made
Added scoped responsive breakpoints in Sponsors.css:
Adjusted:
Before fixing:
After fixing:
Fixed heading hidden behind navbar for tablet range:
After fixing:
Stabilized tab layout:
Before fixing:
After fixing:
Maintained two-column grid on mobile:
Fixed:
Before changes:
After changes:
Desktop layout above 968px remains unchanged in design intent.
Dependencies
No new dependencies added.
No version changes required.
Checklist