Skip to content

Feat/UI#32

Merged
bhavik-mangla merged 7 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:feat/UI
Jul 16, 2026
Merged

Feat/UI#32
bhavik-mangla merged 7 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:feat/UI

Conversation

@rahul-vyas-dev

@rahul-vyas-dev rahul-vyas-dev commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Addressed Issues:

Fixes #31

Screenshots/Recordings:

Light-Theme Dark-Theme

Additional Notes:

This PR introduces a new Support Us UI component to the package, providing a modern, responsive interface for showcasing project information, organization details, sponsorship options, and support links.

What's Included

  • Added a new responsive Support Us component.
  • Implemented support for both Light and Dark themes.
  • Added a hero section displaying the project title and organization information.
  • Added project and organization information cards.
  • Added a responsive sponsor CTA section with configurable support links.
  • Added support for rendering sponsor dynamically.
  • Included custom SVG icons used throughout the component.
  • Improved responsive layouts for desktop and mobile devices.
  • Added URL validation before opening external links.
  • Styled the component using Tailwind CSS while keeping it fully configurable through component props.

Props Supported

  • Theme: Theme,
  • organizationInformation: organizationInformation,
  • projectInformation: projectInformation,
  • sponsors: sponsors,
  • ctaSection: CTASection

These props allow consumers to fully customize the component without modifying its implementation.

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

  • New Features

    • Added a dev script to run Rollup in watch mode.
  • Improvements

    • Simplified the Support Us button API and layout.
    • Updated theming to support only light/dark.
    • Added safe URL validation for outbound CTA clicks.
    • Simplified sponsor display to name + tier.
  • Documentation

    • Updated Quick Start, Props/Available API docs, and screenshots to match the new schema.
  • Chores

    • Added TypeScript support for *.css imports.
    • Bumped package version to 2.0.0.

@github-actions github-actions Bot added configuration Configuration file changes dependencies Dependency file changes documentation Changes to documentation files frontend Changes to frontend code javascript JavaScript/TypeScript code changes size/XL Extra large PR (>500 lines changed) repeat-contributor PR from an external contributor who already had PRs merged pending-coderabbit-review labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR replaces the multi-theme SupportUsButton contract with a light/dark model, refactors its layout and URL handling, updates responsive styling and Rollup watch mode, and revises README API documentation and screenshots.

Changes

SupportUsButton simplification

Layer / File(s) Summary
Simplified public data model
src/types/index.ts, src/index.ts
Theme and component data types now use reduced organization, project, sponsor, CTA, and prop shapes. Removed UI-specific types are no longer re-exported.
Refactored component interactions
src/components/SupportUsButton.tsx
The component renders the new layout for light and dark themes, displays simplified sponsor data, and validates HTTP(S) URLs before opening sponsor links.
Responsive styling and development wiring
src/styles/style.css, src/global.d.ts, package.json
Responsive flex-direction utilities and normalized theme colors replace former pattern styles; CSS imports are declared, the package version becomes 2.0.0, and Rollup watch mode is available through dev.
README contract and previews
README.md
Quick-start examples, API details, data-shape documentation, theme options, CTA documentation, and light/dark screenshots are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SupportUsButton
  participant validateUrl
  participant Browser
  SupportUsButton->>validateUrl: validate sponsor link
  validateUrl-->>SupportUsButton: return valid HTTP(S) result
  SupportUsButton->>Browser: open validated URL
Loading

Possibly related PRs

Suggested labels: Documentation, Typescript Lang

Suggested reviewers: bhavik-mangla, m4dhav, zahnentferner

Poem

I nibbled old themes from the codebase bright,
Then planted two colors: dark and light.
Links pass my whisker-safe URL test,
New docs and screenshots look their best.
Rollup watches while I hop—
A tidy button, carrot-top! 🐇

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The package version bump and new dev script are unrelated to the UI/UX redesign scope. Move versioning or build-script changes to a separate PR unless they are required for the redesign.
Title check ❓ Inconclusive The title is too vague and generic to describe the actual UI overhaul. Use a concise title that mentions the Support Us UI redesign or new component behavior.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR implements the requested full UI/UX redesign with new layout, themes, sections, and sponsor CTA behavior.
✨ 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.

@rahul-vyas-dev rahul-vyas-dev added this to the New UI milestone Jul 10, 2026
@rahul-vyas-dev

Copy link
Copy Markdown
Contributor Author

@coderabbitai review.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

The PR description images show a "Support Us" component for OrgExplorer built by AOSSIE, in both Light-Theme and Dark-Theme variants. Each screenshot displays:

  • A top navbar with the "OrgExplorer" logo (top-left), and theme toggle + "Settings" button (top-right).
  • A hero section titled "✦ Support-us for OrgExplorer" with subtitle "A Project Powered by AOSSIE ↗", and two CTA buttons: "Support Now" and "Become a Sponsor".
  • Two info cards side-by-side: "About OrgExplorer" (with a description about social voice platforms like Clubhouse/Twitter Spaces) and "About AOSSIE" (describing it as an Australian not-for-profit supporting open-source projects), separated by a heart icon.
  • A "Supported By Global Powerhouses" section showing sponsor logos for Google (Platinum Sponsor) and Microsoft (Gold Sponsor).
  • A footer with links (Documentation, Terms of Service, Privacy Policy, API Status), social icons, and copyright text "© 2026 OrgExplorer — BUILT FOR OPEN SOURCE COMMUNITIES".

The Light-Theme image uses a white/light-gray background with black text and buttons, while the Dark-Theme image uses a near-black background with white text and buttons — otherwise the layout and content are identical.

@rahul-vyas-dev, sure thing — kicking off a full review of the changes now.

✅ 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.

@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: 11

Caution

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

⚠️ Outside diff range comments (1)
src/types/index.ts (1)

74-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale doc comments describe the removed contract.

Several comments no longer match the simplified types and will mislead consumers:

  • Line 75 still lists "AOSSIE", "minimal", "corporate" although Theme is now "light" | "dark".
  • Line 78 mentions logo and nested projectInformation, which were removed from organizationInformation.
  • Line 84 mentions optional logo, link, which no longer exist on sponsor.
  • Line 88 mentions title, description, which were removed from CTASection.
📝 Suggested comment updates
-  // Theme for the button, can be one of "AOSSIE", "light", "dark", "minimal", or "corporate"
+  // Theme for the component: "light" or "dark"
   Theme?: Theme;

-  // Information about the organization, including name, description, logo, and project information
+  // Information about the organization: name, desc, image, link
   organizationInformation: organizationInformation;

   // Information about the project, including name, description, and image
   projectInformation?: projectInformation;

-  // List of current sponsors, each with name, optional logo, link, and sponsorship tier
+  // List of current sponsors, each with name and sponsorship tier
   sponsors?: sponsors;

-  // Information about the call-to-action section, including title, description, and sponsor links
+  // Call-to-action section containing sponsor links
   ctaSection: CTASection;
🤖 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/types/index.ts` around lines 74 - 88, Update the comments in
supportUsButtonProps to match the current simplified type contracts: document
Theme as only "light" or "dark", describe organizationInformation without logo
or nested project information, describe sponsors using only the fields defined
by sponsor, and describe ctaSection without title or description.
🤖 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 `@README.md`:
- Line 256: Update the `image` field entry in the README table to describe it as
“Project image” instead of “Project description”.
- Around line 172-182: The README Quick Start comments and API table
descriptions use outdated fields. Update references around
organizationInformation, projectInformation, sponsors, and ctaSection to match
the current contract: organizationInformation has name, desc, image, and link;
sponsors have name and optional sponsorshipTier; CTA links have name and url;
remove references to deleted projectInformation, sponsor link, and CTA
title/description fields.
- Around line 239-241: Update the README organization information table so the
`image` and `link` fields are marked as required, matching the required
declarations in `organizationInformation` within `src/types/index.ts`.
- Line 317: The README screenshot images use generic, identical alt text. Update
the Light theme image near the referenced diff and the corresponding Dark theme
image to use descriptive, theme-specific alt text such as “Light theme
SupportUsButton preview” and “Dark theme SupportUsButton preview.”

In `@src/components/SupportUsButton.tsx`:
- Line 90: Replace index-based keys in the sponsorLink and sponsors renderings
of SupportUsButton with stable identifiers from each item, such as a unique id
or URL; update both mapped lists so reordering or filtering preserves correct
DOM and state association.
- Around line 54-178: Externalize all user-visible text in SupportUsButton,
including “Support-us,” “for,” “A Project Powered by,” “About,” “Supported By
Global,” “Powerhouses,” and “Sponsor,” using the project’s existing i18n
resource and translation conventions. Update the JSX in SupportUsButton and the
sponsorship-tier rendering to use translated strings and avoid appending
“Sponsor” when sponsor.sponsorshipTier is undefined.
- Line 35: Update the anchor rendering in SupportUsButton to use validatedUrl
for its href instead of organizationInformation.link, and render plain text when
validatedUrl is absent. Ensure the validated URL from validateUrl is the only
value used for the link destination.
- Around line 28-34: Add the "use client" directive at the very top of the
SupportUsButton module, before imports, because the SupportUsButton component
uses onClick and window.open and must run as a client component in Next.js App
Router.
- Around line 88-101: Update the sponsor-link buttons in the
ctaSection.sponsorLink map to include type="button", remove the ineffective rel
attribute, and pass "noopener,noreferrer" as the third argument to window.open
within the existing URL validation handler.

In `@src/styles/style.css`:
- Around line 11-22: Rename `.md-justify-between` to accurately describe its
`flex-direction: row` behavior and align its breakpoint naming with the actual
`900px` threshold, or replace both custom selectors with consistent Tailwind
responsive utilities such as `md:flex-row`; remove the trailing whitespace in
the rule.

In `@src/types/index.ts`:
- Around line 40-41: Update the doc comment above the name field in the relevant
type definition to describe the sponsor’s name rather than a logo or avatar,
preserving the existing name: string field.

---

Outside diff comments:
In `@src/types/index.ts`:
- Around line 74-88: Update the comments in supportUsButtonProps to match the
current simplified type contracts: document Theme as only "light" or "dark",
describe organizationInformation without logo or nested project information,
describe sponsors using only the fields defined by sponsor, and describe
ctaSection without title or description.
🪄 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

Run ID: 87520522-9056-430a-8751-9179d975ef4e

📥 Commits

Reviewing files that changed from the base of the PR and between 7000973 and c481754.

⛔ Files ignored due to path filters (11)
  • public/AOSSIE_THEME-SPONSOR.jpeg is excluded by !**/*.jpeg
  • public/AOSSIE_THEME.jpeg is excluded by !**/*.jpeg
  • public/AOSSIE_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME_SPONSOR.png is excluded by !**/*.png
  • public/Dark-Theme.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME_SPONSOR.png is excluded by !**/*.png
  • public/Light-Theme.jpeg is excluded by !**/*.jpeg
📒 Files selected for processing (7)
  • README.md
  • package.json
  • src/components/SupportUsButton.tsx
  • src/global.d.ts
  • src/index.ts
  • src/styles/style.css
  • src/types/index.ts
💤 Files with no reviewable changes (1)
  • src/index.ts

Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread README.md Outdated
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/styles/style.css
Comment thread src/types/index.ts
Co-authored-by: Saksham <reach2saksham2004@gmail.com>

@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: 1

🤖 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 `@src/types/index.ts`:
- Around line 75-88: Update the inline comments for Theme,
organizationInformation, sponsors, and ctaSection to accurately describe the
current simplified interfaces: document only “light” and “dark” themes, remove
references to project information and logos, omit sponsor logos and links, and
describe CTASection without the removed title and description fields.
🪄 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

Run ID: 5c2ffef8-e6d3-4427-9d85-8731b4f0e64d

📥 Commits

Reviewing files that changed from the base of the PR and between c481754 and 678604e.

⛔ Files ignored due to path filters (11)
  • public/AOSSIE_THEME-SPONSOR.jpeg is excluded by !**/*.jpeg
  • public/AOSSIE_THEME.jpeg is excluded by !**/*.jpeg
  • public/AOSSIE_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/DARK_THEME_SPONSOR.png is excluded by !**/*.png
  • public/Dark-Theme.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME_CTA.jpeg is excluded by !**/*.jpeg
  • public/LIGHT_THEME_SPONSOR.png is excluded by !**/*.png
  • public/Light-Theme.jpeg is excluded by !**/*.jpeg
📒 Files selected for processing (7)
  • README.md
  • package.json
  • src/components/SupportUsButton.tsx
  • src/global.d.ts
  • src/index.ts
  • src/styles/style.css
  • src/types/index.ts
💤 Files with no reviewable changes (1)
  • src/index.ts

Comment thread src/types/index.ts

@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: 1

🤖 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 `@src/components/SupportUsButton.tsx`:
- Around line 41-182: Convert all hyphenated SVG presentation attributes in the
added SVGs to React camelCase within SupportUsButton: use strokeOpacity,
strokeWidth, strokeDasharray, strokeLinecap, and vectorEffect across the
background, border, and four icon SVGs. Preserve all existing values and
rendering behavior.
🪄 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

Run ID: f5e79a7f-eba4-4335-8ec0-94f831dbc082

📥 Commits

Reviewing files that changed from the base of the PR and between f29c26c and 6fa4e2e.

📒 Files selected for processing (1)
  • src/components/SupportUsButton.tsx

Comment thread src/components/SupportUsButton.tsx Outdated

@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: 2

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)

28-35: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a "use client" directive at the top of src/components/SupportUsButton.tsx. This component uses onClick/window.open, so it must be a client component for App Router compatibility.

🤖 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 28 - 35, Add the "use
client" directive at the top of the module containing SupportUsButton, before
imports and other statements, so its onClick and window.open behavior is treated
as client-side in the App Router.
♻️ Duplicate comments (1)
src/components/SupportUsButton.tsx (1)

36-36: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

validatedUrl still isn't used to render the link (persists prior finding).

validatedUrl is computed here from organizationInformation?.link, but the anchor at Line 207 still uses organizationInformation.link directly and unvalidated. Since validateUrl only allows http:///https:// schemes, bypassing it means a malicious link value (e.g. javascript:...) provided via props would be rendered straight into href. Bind the anchor's href to validatedUrl and fall back to plain text when it's absent.

🔒 Suggested fix
   const validatedUrl = validateUrl(organizationInformation?.link);
...
-              <a
-                href={`${organizationInformation.link}`}
-                target="_blank"
-                rel="noopener noreferrer"
-                className="underline"
-              >
-                &nbsp;{organizationInformation.name}
-              </a>
+              {validatedUrl ? (
+                <a
+                  href={validatedUrl}
+                  target="_blank"
+                  rel="noopener noreferrer"
+                  className="underline"
+                >
+                  &nbsp;{organizationInformation.name}
+                </a>
+              ) : (
+                <span>&nbsp;{organizationInformation.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` at line 36, Update the anchor rendering
in SupportUsButton to use validatedUrl for href instead of
organizationInformation.link, and render the organization link as plain text
when validatedUrl is absent. Preserve the existing validated HTTP/HTTPS behavior
while preventing unvalidated values from reaching the anchor.
🤖 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 `@src/components/SupportUsButton.tsx`:
- Around line 42-57: Update the SVG in the Logo branch of SupportUsButton so the
path attributes use React camelCase names strokeOpacity and strokeWidth instead
of hyphenated names. Also reduce unnecessary decimal precision in the path’s d
data while preserving the rendered shape.

In `@src/types/index.ts`:
- Around line 77-79: Expand the comment immediately above the Logo option in the
relevant type definition into a full descriptive sentence explaining what
enabling or disabling the flag does, matching the style of the neighboring field
comments without changing the Logo property itself.

---

Outside diff comments:
In `@src/components/SupportUsButton.tsx`:
- Around line 28-35: Add the "use client" directive at the top of the module
containing SupportUsButton, before imports and other statements, so its onClick
and window.open behavior is treated as client-side in the App Router.

---

Duplicate comments:
In `@src/components/SupportUsButton.tsx`:
- Line 36: Update the anchor rendering in SupportUsButton to use validatedUrl
for href instead of organizationInformation.link, and render the organization
link as plain text when validatedUrl is absent. Preserve the existing validated
HTTP/HTTPS behavior while preventing unvalidated values from reaching the
anchor.
🪄 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

Run ID: 061f6957-0c57-4fbd-b2b3-9c1043a795bb

📥 Commits

Reviewing files that changed from the base of the PR and between 6fa4e2e and 0f3cc3c.

⛔ Files ignored due to path filters (2)
  • public/Dark-Theme.png is excluded by !**/*.png
  • public/Light-Theme.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • README.md
  • src/components/SupportUsButton.tsx
  • src/types/index.ts

Comment thread src/components/SupportUsButton.tsx
Comment thread src/types/index.ts
@bhavik-mangla
bhavik-mangla merged commit 228b368 into AOSSIE-Org:main Jul 16, 2026
7 checks passed
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 documentation Changes to documentation files frontend Changes to frontend code javascript JavaScript/TypeScript code changes pending-coderabbit-review repeat-contributor PR from an external contributor who already had PRs merged size/XL Extra large PR (>500 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI/UX improvement overall.

2 participants