Skip to content

feat(ui): update SVG assets, ui fixes, enhance theme compatibility, add dev preview and refine responsiveness - #36

Open
reach2saksham wants to merge 2 commits into
AOSSIE-Org:mainfrom
reach2saksham:feat/ui-enhancements
Open

feat(ui): update SVG assets, ui fixes, enhance theme compatibility, add dev preview and refine responsiveness#36
reach2saksham wants to merge 2 commits into
AOSSIE-Org:mainfrom
reach2saksham:feat/ui-enhancements

Conversation

@reach2saksham

@reach2saksham reach2saksham commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary of Changes

This PR introduces major UI/UX refinements, light and dark theme compatibility enhancements, asset replacements using original SVG files, responsive layout fixes for mobile and tablet viewports, interactive sponsor hover states, and a lightweight dev preview environment.

Screenshots/Recordings:

2026-07-27.21-56-05.mp4

1. Dev Preview Environment

  • A simple dev preview environment that we can use to see the exact design without the requirement of integrating the package into any project. Users can simple type npm run dev:demo to open it.

2. Responsive Layout & Mobile/Tablet Enhancements

  • Proper Boundary locations, alignments of "+" signs, managed margin and padding for all the viewports for both the whole content as well as boundaries.
  • 768px – 950px Viewport Overflow Fix:
    • Shifted the About section 2-column flex layout breakpoint from md: (768px) to lg: (1024px).
    • Below 1024px (including 768px – 950px tablet screens), "About Project" and "About Organization" remain stacked vertically in 1 full-width column (flex-col), preventing text truncation and border clipping.
  • Left-Aligned Section Titles:
    • Left-aligned About {Project} and About {Organization} headings (justify-start text-left w-full) with scaled logo icons (h-8 w-8 sm:h-9 sm:w-9 lg:h-10 lg:w-10).
    • Removed rigid whitespace-nowrap from section headings and added break-words, allowing long project names to wrap naturally onto a second line without overflowing.
  • Hero Main Heading:
    • Updated title to text-3xl sm:text-3xl md:text-5xl flex-wrap sm:flex-nowrap, allowing clean 2-line wrapping on narrow mobile screens while maintaining a fluid single line on desktop.
  • Mobile Boundary Inset & Padding:
    • Increased root container horizontal padding on mobile (px-12 sm:px-14 md:px-20 py-10 sm:py-10 md:py-14) and inner wrapper padding (pt-16 pb-16 sm:pt-10 sm:pb-10), providing comfortable, elegant spacing for vertical dashed boundary lines away from screen edges.

3. Sponsors Section Refinements

  • Strict 2-Line Header: Applied whitespace-nowrap to Line 1 ("Supported By Global ") and Line 2 ("Powerhouses") with pr-8 right padding.
  • Vertical Alignment: Centrally aligned the "Supported By Global Powerhouses" title block and sponsor items vertically (items-center).
  • Interactive Golden Hover States: Added hover elevation, golden hover color (hover:text-[#ffd700]), and scale transform (hover:-translate-y-1 hover:scale-105 active:scale-95 transition-all duration-300 cursor-pointer) to sponsor items, matching the main CTA button hover interactions.
  • Cleaned Up Demo Sponsors: Removed placeholder sponsors (Community Backer A & Community Backer B), leaving real sponsors (Google Open Source, GitHub Sponsors, Stability Nexus).

4. Developer Preview Playground

  • Configured Vite dev server setup (vite.config.ts, index.html, demo/main.tsx, demo/App.tsx) featuring an interactive top control bar for real-time Light/Dark theme and background logo toggling.
  • Added "dev:demo": "vite" script to package.json.
  • Note: The dev playground files in /demo and devDependencies do NOT affect the published npm package or add any weight for end users (0 bytes added to published dist/).

5. SVG Asset Replacement & Light/Dark Theme Compatibility

  • Heart Icon (public/heart.svg): Replaced inline hero heart paths with official public/heart.svg paths and applied fill="currentColor" for dynamic theme fill color inheritance.
  • Star Icons (public/star.svg): Replaced central section separator and sponsor header stars with public/star.svg path data using fill="currentColor".
  • AOSSIE Logomark (public/aossie_logomark.svg): Updated SVG paths from hardcoded fill="white" to fill="currentColor". Added brightness-0 invert (Dark Theme) and brightness-0 (Light Theme) CSS image filters so logomark images dynamically render pure white in dark mode and black in light mode.
  • External Link Arrow (public/arrow.svg): Replaced the "A Project Powered by AOSSIE" link arrow with public/arrow.svg path data using proportional h-[0.85em] w-auto sizing to match adjacent text font height.
  • Project Logo Filters: Applied brightness-0 invert (Dark Theme) / brightness-0 (Light Theme) image filters to projectInformation?.image, ensuring colorful project logos transform into monochromatic white/black to align with the overall design system.

Future Scopes & Potential Enhancements

  1. Host Website Background & Typography Integration:
    • Improve integration compatibility by allowing the component design to inherit the exact background color/theme of the parent website it is being integrated into.
    • Extend font-family inheritance so the component can adopt the parent website's custom typography dynamically.
  2. Loading Animations & Micro-Interactions:
    • Introduce smooth entrance and skeleton loading animations for headings, text descriptions, logos, and sponsor badges to enhance perceived performance and visual engagement upon initial render.
  3. Branding and Design System (If required):
    • We can place and make the colours used in the project and properly document them within a design system.

🔍 Files Changed

  • src/components/SupportUsButton.tsx: Core component layout, SVG replacements, theme filters, CTA button hover styles, and responsive typography/padding.
  • public/heart.svg: Updated fill attributes to currentColor.
  • public/star.svg: Updated fill attributes to currentColor.
  • public/aossie_logomark.svg: Updated fill attributes to currentColor.
  • public/arrow.svg: Updated fill attributes to currentColor.
  • demo/App.tsx: Interactive preview app with theme toggles and cleaned-up sample sponsors.
  • package.json: Added "dev:demo": "vite" script and dev preview dependencies.
  • vite.config.ts & index.html: Local dev server configuration.

🧪 Verification & Testing

  1. Local Build Check:
    npx vite build
    npm run build
    
    

Additional Notes:

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a browser-based demo page for the Support Us Button, with a Vite-powered dev experience.
    • Added on-page controls to toggle light/dark theme and show/hide the logo.
    • Included sample project, organization, sponsor, and call-to-action content.
  • Improvements

    • Refined the button’s look with updated Tailwind styling, decorative SVG positioning, and responsive layout.
    • Redesigned the hero, “About” sections, and sponsor cards with improved spacing, hover/active behavior, and theme-specific effects.

…dd dev preview and refine responsiveness

- Replace heart, star, arrow, and logomark SVGs with public assets using fill="currentColor"
- Add brightness-0 invert filters to logomark and project logo for light/dark theme compatibility
- Fix 768px-950px tablet layout overflow by shifting 2-column breakpoint to lg (1024px)
- Left-align About section titles with responsive font sizes and break-words wrapping
- Add golden hover color and scale interactions to sponsors
- Refine mobile boundary padding and hero heading typography
- Add local Vite dev preview playground (npm run dev:demo)
@reach2saksham reach2saksham added enhancement New feature or request frontend Changes to frontend code gsoc labels Jul 27, 2026
@github-actions github-actions Bot added no-issue-linked PR is not linked to any issue configuration Configuration file changes dependencies Dependency file changes javascript JavaScript/TypeScript code changes size/XL Extra large PR (>500 lines changed) first-time-contributor First PR of an external contributor pending-coderabbit-review labels Jul 27, 2026
@socket-security

socket-security Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvite@​8.1.5981008298100
Added@​tailwindcss/​vite@​4.3.31001008997100
Added@​vitejs/​plugin-react@​6.0.49910010092100

View full report

@socket-security

socket-security Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @emnapi/runtime is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package-lock.jsonnpm/@tailwindcss/[email protected]npm/[email protected]npm/@tailwindcss/[email protected]npm/@tailwindcss/[email protected]npm/@emnapi/[email protected]

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@emnapi/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds an interactive Vite React demo for SupportUsButton and refreshes its responsive layout, SVG positioning, CTA styles, information sections, sponsor cards, and default border coordinates.

Changes

SupportUsButton demo and component refresh

Layer / File(s) Summary
SupportUsButton visual refresh
src/components/SupportUsButton.tsx
Updates border coordinates, responsive structure, decorative SVGs, CTA buttons, project and organization sections, and sponsor card layouts.
Interactive demo preview
demo/App.tsx
Adds typed sample props, theme and logo toggles, and a preview rendering SupportUsButton.
Vite runtime wiring
index.html, demo/main.tsx, package.json, vite.config.ts
Adds the HTML mount point, React entrypoint, Vite configuration, required tooling, and dev:demo script.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Vite
  participant App
  participant SupportUsButton
  Browser->>Vite: load index.html
  Vite->>App: mount App through demo/main.tsx
  App->>SupportUsButton: pass sampleProps and theme state
  SupportUsButton-->>Browser: render preview UI
Loading

Suggested labels: Typescript Lang

Suggested reviewers: zahnentferner, m4dhav, rahul-vyas-dev

Poem

A bunny hops through Vite’s bright door,
With themes to flip and logos galore.
Borders stretch wide, sponsors shine,
Cards bounce softly in a neat design.
“Support Us!” the rabbit sings—
Preview magic grows new wings!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately reflects the main UI, theme, responsiveness, and demo-preview changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@demo/App.tsx`:
- Around line 37-41: Update the header element in App to replace deprecated
bg-opacity-80 with theme-specific slash-notation background utilities: use
bg-zinc-950/80 for dark mode and bg-gray-100/80 for light mode, while preserving
the existing backdrop blur and other classes.

In `@src/components/SupportUsButton.tsx`:
- Line 47: Update the organization rendering in SupportUsButton to use the
validatedUrl value from validateUrl instead of organizationInformation.link.
Render the anchor only when validatedUrl exists; otherwise render
organizationInformation.name as plain text, preserving the existing organization
display content.
- Around line 219-229: Externalize all newly added user-visible strings through
the existing i18n resource mechanism. In src/components/SupportUsButton.tsx
ranges 219-229, 287-289, 338-340, and 365-383, update SupportUsButton to use
localized resources for hero, attribution, About, and sponsor labels. In
demo/App.tsx ranges 14-31 and 42-67, move sample copy, control labels, and state
text into demo locale resources and reference them from App.
- Around line 198-222: Update the heading layout in SupportUsButton by removing
sm:flex-nowrap from the surrounding flex container and sm:whitespace-nowrap from
the h1, then add min-w-0 to the h1 so long projectInformation.name values wrap
instead of overflowing at tablet widths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 13ff5d08-c538-4402-aaa6-7d62eed98337

📥 Commits

Reviewing files that changed from the base of the PR and between 497eb3e and 7621904.

⛔ Files ignored due to path filters (5)
  • package-lock.json is excluded by !**/package-lock.json
  • public/aossie_logomark.svg is excluded by !**/*.svg
  • public/arrow.svg is excluded by !**/*.svg
  • public/heart.svg is excluded by !**/*.svg
  • public/star.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • demo/App.tsx
  • demo/main.tsx
  • index.html
  • package.json
  • src/components/SupportUsButton.tsx
  • vite.config.ts

Comment thread demo/App.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx Outdated
Comment on lines +219 to +229
<h1 className="font-medium text-3xl sm:text-3xl md:text-5xl leading-tight tracking-tight text-center sm:whitespace-nowrap">
Support-us {projectInformation?.name && "and"}{" "}
{projectInformation?.name}
</span>
</h1>
</div>
{projectInformation?.name && (
<div>
<span className="text-[clamp(1rem,2vw,2rem)] leading-snug italic flex justify-center items-center">
A Project Powered by
<span className="text-lg sm:text-base md:text-xl leading-snug flex flex-wrap justify-center items-center gap-1">
<p className="italic">
A Project Powered by
</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Externalize the newly added user-visible strings.

The refreshed component and demo add hard-coded labels and content instead of resource-backed strings.

  • src/components/SupportUsButton.tsx#L219-L229: externalize the hero and attribution labels.
  • src/components/SupportUsButton.tsx#L287-L289: externalize the project “About” label.
  • src/components/SupportUsButton.tsx#L338-L340: externalize the organization “About” label.
  • src/components/SupportUsButton.tsx#L365-L383: externalize the sponsor-section labels.
  • demo/App.tsx#L14-L31: move visible sample copy into demo locale resources.
  • demo/App.tsx#L42-L67: externalize control labels and state text.

As per path instructions, user-visible strings should be externalized to resource files (i18n).

📍 Affects 2 files
  • src/components/SupportUsButton.tsx#L219-L229 (this comment)
  • src/components/SupportUsButton.tsx#L287-L289
  • src/components/SupportUsButton.tsx#L338-L340
  • src/components/SupportUsButton.tsx#L365-L383
  • demo/App.tsx#L14-L31
  • demo/App.tsx#L42-L67
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/SupportUsButton.tsx` around lines 219 - 229, Externalize all
newly added user-visible strings through the existing i18n resource mechanism.
In src/components/SupportUsButton.tsx ranges 219-229, 287-289, 338-340, and
365-383, update SupportUsButton to use localized resources for hero,
attribution, About, and sponsor labels. In demo/App.tsx ranges 14-31 and 42-67,
move sample copy, control labels, and state text into demo locale resources and
reference them from App.

Source: Path instructions

@rahul-vyas-dev

rahul-vyas-dev commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Overall nice work but I have a few things to ask:

  • Why are the SVGs stored as separate public/*.svg files when they're not being used as image files and are instead rendered directly as <svg>...</svg>?
  • Have you tested this on the AOSSIE website? Since the website has a max-width container, it could affect the UI and may need additional handling. For example, in the current UI, the "+" icon isn't positioned correctly.
  • The alignment of the sponsors also seems to break when the viewport changes to a mobile size: -
image

@reach2saksham

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@reach2saksham

Copy link
Copy Markdown
Member Author

Hi @rahul-vyas-dev , I kept /public/*.svg as standalone vector source assets for the dev preview (demo/App.tsx) and documentation, while using inline <svg> inside SupportUsButton.tsx so the published npm component remains 100% self-contained with zero external asset dependencies, instant loading, and full fill="currentColor" support for Light/Dark theme switching and hover animations.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/SupportUsButton.tsx (1)

369-395: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prevent sponsor cards from overflowing on mobile.

The sponsor group combines fixed-width SVGs with text-2xl names, but neither the group nor each card has min-w-0/max-w-full constraints. Long names can exceed the narrow content width and be clipped by the component’s overflow-hidden root. Let cards and their text shrink/wrap on mobile, while retaining auto-sized cards on larger screens.

Proposed fix
- <div className="flex flex-wrap items-center justify-center lg:justify-start gap-6 select-none flex-1">
+ <div className="flex w-full min-w-0 flex-wrap items-center justify-center lg:justify-start gap-6 select-none lg:flex-1">
...
- className="group flex items-center gap-2 transition-all duration-300 hover:text-[`#ffd700`] hover:-translate-y-1 hover:scale-105 cursor-pointer active:scale-95"
+ className="group flex w-full max-w-full min-w-0 items-center justify-center gap-2 transition-all duration-300 hover:text-[`#ffd700`] hover:-translate-y-1 hover:scale-105 cursor-pointer active:scale-95 sm:w-auto"

Also add min-w-0 to the sponsor text wrapper and break-words to the sponsor-name span.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/SupportUsButton.tsx` around lines 369 - 395, Update the
sponsor group and each sponsor card in the sponsors.map block to include min-w-0
and max-w-full constraints, while preserving auto-sized cards at larger
breakpoints. Add min-w-0 to the sponsor text wrapper and break-words to each
sponsor-name span so long names shrink and wrap within the mobile container
instead of being clipped.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/SupportUsButton.tsx`:
- Around line 369-395: Update the sponsor group and each sponsor card in the
sponsors.map block to include min-w-0 and max-w-full constraints, while
preserving auto-sized cards at larger breakpoints. Add min-w-0 to the sponsor
text wrapper and break-words to each sponsor-name span so long names shrink and
wrap within the mobile container instead of being clipped.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dc810a19-079b-437d-bf6b-9e18641d2354

📥 Commits

Reviewing files that changed from the base of the PR and between 7621904 and 2e58587.

📒 Files selected for processing (2)
  • demo/App.tsx
  • src/components/SupportUsButton.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Configuration file changes dependencies Dependency file changes enhancement New feature or request first-time-contributor First PR of an external contributor frontend Changes to frontend code gsoc javascript JavaScript/TypeScript code changes no-issue-linked PR is not linked to any issue pending-coderabbit-review size/XL Extra large PR (>500 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants