Skip to content

Update website download#208

Merged
Kitenite merged 4 commits intomainfrom
website-download
Dec 1, 2025
Merged

Update website download#208
Kitenite merged 4 commits intomainfrom
website-download

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 1, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features

    • Added a unified platform download dropdown with clearer platform sections, a "Build from source" GitHub link, and a Windows/Linux waitlist entry.
    • Added a waitlist modal for sign-ups and consolidated waitlist handling across site.
  • Refactor

    • Replaced inline download links with a component-driven download flow and simplified header/CTA integrations.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 1, 2025 3:54pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new PlatformDropdown component, refactors DownloadButton to use it, and replaces inline download links with DownloadButton + WaitlistModal in CTASection and HeroSection. Renames DownloadButton prop onJoinWindowsWaitlistonJoinWaitlist and adds GITHUB_REPO_URL.

Changes

Cohort / File(s) Change Summary
New PlatformDropdown component
apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx, apps/website/src/app/components/PlatformDropdown/index.ts
Adds PlatformDropdown plus exported types DropdownItem and DropdownSection; renders multi-section dropdown with titles, dividers, and item variants (primary/secondary).
DownloadButton refactor
apps/website/src/app/components/DownloadButton/DownloadButton.tsx
Replaces hard-coded dropdown with data-driven PlatformDropdown usage; introduces sections including Mac download, “Other platforms” (Windows & Linux waitlist, GitHub build-from-source); renames prop onJoinWindowsWaitlistonJoinWaitlist.
CTA & Hero waitlist wiring
apps/website/src/app/components/CTASection/CTASection.tsx, apps/website/src/app/components/HeroSection/HeroSection.tsx
Adds local isWaitlistOpen state, uses DownloadButton with onJoinWaitlist to open WaitlistModal, and renders WaitlistModal with onClose to reset state.
Header integration
apps/website/src/app/components/Header/Header.tsx
Removes JoinWaitlistButton usage and replaces it with DownloadButton using updated onJoinWaitlist prop; removes previously hidden class usage.
Constants
apps/website/src/constants.ts
Adds export const GITHUB_REPO_URL = "https://github.com/superset-sh/superset";.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus review on DownloadButton.tsx for correct PlatformDropdown sections, icons, and click handlers.
  • Verify CTASection.tsx and HeroSection.tsx manage isWaitlistOpen consistently and WaitlistModal props/onClose behavior.
  • Confirm all call sites updated to the renamed prop onJoinWaitlist.

Possibly related PRs

Poem

🐰 A tiny hop, a clever click,
Dropdowns gather platforms quick,
Waitlist opens, GitHub in sight,
Downloads tidy, all just right —
🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the empty default template with no substantive information about changes, related issues, type of change selection, testing, or context. Fill in all required template sections: provide a clear description of changes, link related issues if applicable, mark the appropriate type of change, describe testing performed, and add any relevant context about the refactoring.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Update website download' is vague and lacks specificity about the actual changes made to the download functionality. Provide a more descriptive title that clarifies the specific changes, such as 'Refactor download button with unified platform dropdown and waitlist modal' or 'Consolidate download and waitlist UI into shared components'.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1866f5e and 20696a8.

📒 Files selected for processing (2)
  • apps/website/src/app/components/HeroSection/HeroSection.tsx (1 hunks)
  • apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (1 hunks)

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
apps/website/src/app/components/CTASection/CTASection.tsx (1)

9-10: Consider extracting waitlist modal logic into a custom hook.

The waitlist modal state management pattern (isWaitlistOpen state + setIsWaitlistOpen handlers + WaitlistModal component) is duplicated across Header, HeroSection, and CTASection. A custom hook like useWaitlistModal() could reduce duplication:

// Example: useWaitlistModal.ts
export function useWaitlistModal() {
  const [isOpen, setIsOpen] = useState(false);
  const open = () => setIsOpen(true);
  const close = () => setIsOpen(false);
  return { isOpen, open, close };
}

This is optional and can be deferred if the current approach is preferred for explicitness.

apps/website/src/app/components/HeroSection/HeroSection.tsx (1)

129-227: Consider extracting ProductDemo and SelectorPill to separate files.

Per the coding guidelines, each component should have one component per file. ProductDemo and SelectorPill are currently defined alongside HeroSection. Since these appear to be specific to the hero section, they could be moved to a components/ subdirectory within HeroSection/:

HeroSection/
├── HeroSection.tsx
├── index.ts
└── components/
    ├── ProductDemo/
    │   ├── ProductDemo.tsx
    │   └── index.ts
    └── SelectorPill/
        ├── SelectorPill.tsx
        └── index.ts

This is a non-blocking suggestion that can be addressed in a follow-up. As per coding guidelines.

apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (1)

57-86: Consider accessibility of nested interactive elements.

The <button> elements inside <DropdownMenuItem> create nested interactive elements, which can cause accessibility issues (keyboard navigation, screen readers). The DropdownMenuItem is already interactive (focusable/clickable).

Since onClick is already passed to DropdownMenuItem on line 59, the inner buttons may be redundant. Consider using non-interactive <div> elements for styling while letting DropdownMenuItem handle the interaction:

 								<DropdownMenuItem
 									key={item.id}
 									onClick={item.onClick}
-									className="p-0 focus:bg-transparent"
+									className="p-0 focus:bg-transparent cursor-pointer"
 								>
 									{item.variant === "primary" ? (
-										<button
-											type="button"
+										<div
 											className="w-full bg-zinc-900 text-white rounded-[5px] px-4 py-3 flex items-center justify-between hover:bg-zinc-800 transition-colors gap-4"
 										>
 											...
-										</button>
+										</div>
 									) : (
-										<button
-											type="button"
+										<div
 											className="w-full bg-zinc-50 text-black rounded-[5px] px-3 py-2 flex items-center gap-2 hover:bg-zinc-100 transition-colors text-sm"
 										>
 											...
-										</button>
+										</div>
 									)}
 								</DropdownMenuItem>
apps/website/src/app/components/DownloadButton/DownloadButton.tsx (1)

73-78: Consider handling missing onJoinWaitlist more explicitly.

The fallback onJoinWaitlist || (() => {}) creates a silent no-op when the handler isn't provided—clicking the waitlist button would do nothing without any user feedback. Consider either:

  1. Making onJoinWaitlist required if consumers should always provide it
  2. Conditionally omitting/disabling this item when no handler is provided
  3. Adding a visual indicator (e.g., disabled state) when the action isn't available
-					onClick: onJoinWaitlist || (() => {}),
+					onClick: onJoinWaitlist,
+					disabled: !onJoinWaitlist,

Note: This assumes DropdownItem supports a disabled prop. Verify against the PlatformDropdown component's interface.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f837d27 and 1866f5e.

📒 Files selected for processing (7)
  • apps/website/src/app/components/CTASection/CTASection.tsx (1 hunks)
  • apps/website/src/app/components/DownloadButton/DownloadButton.tsx (2 hunks)
  • apps/website/src/app/components/Header/Header.tsx (1 hunks)
  • apps/website/src/app/components/HeroSection/HeroSection.tsx (1 hunks)
  • apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (1 hunks)
  • apps/website/src/app/components/PlatformDropdown/index.ts (1 hunks)
  • apps/website/src/constants.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid using any type - use explicit types instead for type safety
Use camelCase for variable and function names following existing codebase patterns
Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications
Follow existing patterns and match the codebase style when writing new code

Files:

  • apps/website/src/constants.ts
  • apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx
  • apps/website/src/app/components/CTASection/CTASection.tsx
  • apps/website/src/app/components/PlatformDropdown/index.ts
  • apps/website/src/app/components/Header/Header.tsx
  • apps/website/src/app/components/HeroSection/HeroSection.tsx
  • apps/website/src/app/components/DownloadButton/DownloadButton.tsx
**/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/components/**/*.tsx: Create one folder per component with structure: ComponentName/ComponentName.tsx + index.ts for barrel export
Co-locate tests next to the component file they test (e.g., ComponentName.test.tsx)
Co-locate dependencies (utils, hooks, constants, config, stories) next to the file using them
Use nested components/ subdirectory within a parent component only if a sub-component is used 2+ times within that parent; otherwise keep it in the parent's components/ folder
One component per file - avoid multi-component files

Files:

  • apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx
  • apps/website/src/app/components/CTASection/CTASection.tsx
  • apps/website/src/app/components/Header/Header.tsx
  • apps/website/src/app/components/HeroSection/HeroSection.tsx
  • apps/website/src/app/components/DownloadButton/DownloadButton.tsx
🧬 Code graph analysis (4)
apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (2)
apps/website/src/app/components/PlatformDropdown/index.ts (3)
  • DropdownItem (1-1)
  • DropdownSection (1-1)
  • PlatformDropdown (2-2)
packages/ui/src/components/dropdown-menu.tsx (4)
  • DropdownMenu (245-245)
  • DropdownMenuTrigger (247-247)
  • DropdownMenuContent (248-248)
  • DropdownMenuItem (251-251)
apps/website/src/app/components/CTASection/CTASection.tsx (1)
apps/website/src/app/components/DownloadButton/DownloadButton.tsx (1)
  • DownloadButton (13-100)
apps/website/src/app/components/HeroSection/HeroSection.tsx (2)
apps/website/src/app/components/DownloadButton/DownloadButton.tsx (1)
  • DownloadButton (13-100)
apps/website/src/app/components/WaitlistModal/WaitlistModal.tsx (1)
  • WaitlistModal (10-77)
apps/website/src/app/components/DownloadButton/DownloadButton.tsx (3)
apps/website/src/constants.ts (1)
  • GITHUB_REPO_URL (4-4)
apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (2)
  • DropdownSection (20-23)
  • PlatformDropdown (32-94)
apps/website/src/app/components/PlatformDropdown/index.ts (2)
  • DropdownSection (1-1)
  • PlatformDropdown (2-2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (12)
apps/website/src/app/components/PlatformDropdown/index.ts (1)

1-2: LGTM!

The barrel export follows the component folder structure guidelines correctly, exporting both types and the component from index.ts. Using export type for type-only exports is a TypeScript best practice.

apps/website/src/constants.ts (1)

3-4: LGTM!

Good practice centralizing the repository URL as a constant for reuse across components.

apps/website/src/app/components/Header/Header.tsx (1)

50-53: LGTM!

The updated prop name onJoinWaitlist aligns with the refactored DownloadButton API and the pattern is consistent across the codebase.

apps/website/src/app/components/CTASection/CTASection.tsx (1)

32-39: LGTM!

The DownloadButton and WaitlistModal integration is clean and follows the established pattern.

apps/website/src/app/components/HeroSection/HeroSection.tsx (1)

85-88: LGTM!

The DownloadButton integration with the waitlist modal follows the established pattern.

apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx (1)

11-23: LGTM!

The type definitions are well-structured with appropriate optional fields and clear naming.

apps/website/src/app/components/DownloadButton/DownloadButton.tsx (6)

1-5: LGTM!

Imports are well-organized and all appear to be used appropriately within the component.


7-17: LGTM!

The prop rename from onJoinWindowsWaitlist to onJoinWaitlist is a good generalization. Default parameter values are sensible.


18-27: LGTM!

Handlers are consistent in their approach using window.open with controlled URLs from constants.


29-55: LGTM!

Icons are properly defined with accessibility attributes (aria-label and <title>). The size difference (20x20 for Apple, 16x16 for GitHub) appears intentional to establish visual hierarchy between primary and secondary actions.


89-97: LGTM!

The trigger button is properly defined with type="button" to prevent unintended form submission, and includes appropriate styling with size variants.


99-99: LGTM!

Clean integration with PlatformDropdown using the data-driven sections approach. The component is well-structured and maintainable.

Comment on lines +45 to +46
{sections.map((section, sectionIndex) => (
<div key={section.title}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use sectionIndex as the key instead of section.title.

section.title is optional and could be undefined or duplicated across sections, which would cause React key collisions or warnings.

-				{sections.map((section, sectionIndex) => (
-					<div key={section.title}>
+				{sections.map((section, sectionIndex) => (
+					<div key={sectionIndex}>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{sections.map((section, sectionIndex) => (
<div key={section.title}>
{sections.map((section, sectionIndex) => (
<div key={sectionIndex}>
🤖 Prompt for AI Agents
In apps/website/src/app/components/PlatformDropdown/PlatformDropdown.tsx around
lines 45-46, the component uses section.title as the React key for mapped
sections which can be undefined or duplicated; change the key to use the stable
sectionIndex (the map's index parameter) instead of section.title to avoid key
collisions/warnings and ensure unique keys for each rendered section.

@Kitenite Kitenite merged commit 23d17ff into main Dec 1, 2025
4 of 7 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Dec 1, 2025
5 tasks
@Kitenite Kitenite mentioned this pull request Dec 1, 2025
@Kitenite Kitenite deleted the website-download branch December 1, 2025 19:26
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.

1 participant