Skip to content

PictoPy Landing Page improvements #724#769

Closed
ritigya03 wants to merge 4 commits intoAOSSIE-Org:mainfrom
ritigya03:fix-landing-page
Closed

PictoPy Landing Page improvements #724#769
ritigya03 wants to merge 4 commits intoAOSSIE-Org:mainfrom
ritigya03:fix-landing-page

Conversation

@ritigya03
Copy link
Contributor

@ritigya03 ritigya03 commented Dec 13, 2025

This PR addresses the requirements mentioned in Issue #724 by implementing only the requested changes.

  • Added smooth scrolling from the Download button to the download section
  • Updated the View Docs button to point to the official PictoPy documentation
  • Updated the landing page title and branding as requested
  • Fixed the desktop download buttons to point to the correct assets from the latest GitHub release

The changes are intentionally kept minimal and focused, preserving the existing landing page design and behavior without introducing additional logic or features.

Team - EtherX

  • Sirjan Singh
  • Ritigya Gupta
  • Heeral Mandolia

PR LINK - #769

@github-actions github-actions bot added UI documentation Improvements or additions to documentation easy good first issue Good for newcomers labels Dec 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Walkthrough

This pull request updates OpenAPI schema definitions, modifies onboarding step components to remove auto-completion logic and adjust progress indexing from one-based to zero-based, and enhances the landing page with navigation features and updated metadata.

Changes

Cohort / File(s) Summary
OpenAPI Schema Updates
docs/backend/backend_python/openapi.json
Wrapped input_type parameter schema in allOf with added title and retained default; removed additionalProperties from ImageInCluster.metadata to enforce strict object schema
Onboarding Step Components
frontend/src/components/OnboardingSteps/AvatarSelectionStep.tsx, FolderSetupStep.tsx, ThemeSelectionStep.tsx, OnboardingStep.tsx
Removed useEffect-based auto-completion logic and early-return guards across steps; updated progress indexing from stepIndex + 1 to stepIndex (zero-based); added safety-derived step name in OnboardingStep; added client-side navigation to HOME in ThemeSelectionStep
Landing Page Assets & Metadata
landing-page/index.html
Updated favicon href and page title to reflect PictoPy branding
Landing Page Components
landing-page/src/Pages/Landing page/Home1.tsx, pictopy-landing.tsx
Replaced anchor with clickable button for docs link; added onClick handlers for smooth scroll and external opens; replaced Button components with anchor tags for download actions; introduced downloadStarted state and GitHub releases URL constant

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Progress indexing change: Verify zero-based indexing (stepIndex instead of stepIndex + 1) is correct across all onboarding steps and doesn't break expected step count/ordering
  • Removal of auto-completion logic: Confirm intentional removal of useEffect hooks that previously auto-dispatched completion doesn't cause unexpected behavior or break dependent flows
  • Navigation additions: Ensure new navigation in ThemeSelectionStep (useNavigate to ROUTES.HOME) and landing page handlers integrate correctly with existing routing
  • OpenAPI schema compatibility: Validate that wrapping input_type in allOf and removing additionalProperties from ImageInCluster.metadata don't break client-side schema validation or API contracts

Possibly related PRs

Suggested labels

frontend, enhancement, UI, documentation

Suggested reviewers

  • rahulharpal1603

Poem

🐰 Hoppy changes, less auto-complete,
Zero-based steps, a cleaner beat,
Landing page glow with a PictoPy name,
Buttons and links in navigation's game,
Schema refined, the docs now neat! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
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 partially captures the main changes (landing page improvements) but is vague and doesn't clearly specify the primary change from the changeset, which spans multiple components and includes backend OpenAPI schema changes alongside frontend improvements. Clarify the title to reflect the specific main change, such as 'Fix landing page navigation and onboarding flow updates' or be more specific about which improvements are most critical.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
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: 3

♻️ Duplicate comments (2)
frontend/src/components/OnboardingSteps/FolderSetupStep.tsx (1)

58-58: Critical: Zero-based step indexing creates confusing UX.

Same issue as ThemeSelectionStep.tsx - the zero-based indexing displays "Step 0 of 3" with 0% progress on the first step, which is not user-friendly.

Apply the same fix as ThemeSelectionStep.tsx:

-  const progressPercent = Math.round((stepIndex / totalSteps) * 100);
+  const progressPercent = Math.round(((stepIndex + 1) / totalSteps) * 100);
             <span>
-              Step {stepIndex} of {totalSteps}
+              Step {stepIndex + 1} of {totalSteps}
             </span>

Also applies to: 66-66

frontend/src/components/OnboardingSteps/AvatarSelectionStep.tsx (1)

58-58: Critical: Zero-based step indexing creates confusing UX.

Same issue affects this file - zero-based indexing results in "Step 0 of 3" with 0% progress for the first step. This violates standard UX conventions.

Apply this diff to restore 1-based display:

             <span>
-              Step {stepIndex} of {totalSteps}
+              Step {stepIndex + 1} of {totalSteps}
             </span>
-            <span>{Math.round((stepIndex / totalSteps) * 100)}%</span>
+            <span>{Math.round(((stepIndex + 1) / totalSteps) * 100)}%</span>
             <div
               className="bg-primary h-full rounded-full transition-all duration-300"
-              style={{ width: `${(stepIndex / totalSteps) * 100}%` }}
+              style={{ width: `${((stepIndex + 1) / totalSteps) * 100}%` }}
             />

Also applies to: 60-60, 65-65

🧹 Nitpick comments (3)
landing-page/src/Pages/pictopy-landing.tsx (2)

77-87: Consider the onClick notification timing.

The download anchors use both href (for the download) and onClick (for the notification). When a user clicks, the browser may immediately initiate the download via the href, potentially preventing the notification from being visible for the full 3 seconds. This is a minor UX consideration.

The implementation should work as-is, but if the notification doesn't appear reliably, consider using e.preventDefault() in the onClick handler and programmatically triggering the download after showing the notification, or simply remove the notification if the download starts immediately.

Also applies to: 90-100, 103-113


2-2: Remove the unused Button import.

The Button component is imported but no longer used after changing the download elements to anchor tags.

Apply this diff:

-import { Button } from "@/components/ui/button";
frontend/src/components/OnboardingSteps/OnboardingStep.tsx (1)

13-13: Refactor: Remove unused stepName prop or clarify its purpose.

The stepName prop is accepted but completely ignored in favor of the derived currentStepName. This creates confusion about which prop controls rendering.

Consider either:

  1. Removing the stepName prop entirely if it's not needed
  2. Using it for validation while still deriving the current step from stepIndex

If removing:

 interface OnboardingStepProps {
   stepIndex: number;
-  stepName: string; 
 }
 export const OnboardingStep: React.FC<OnboardingStepProps> = ({
   stepIndex,
-  stepName, // still accepted, but not trusted
 }) => {

Also applies to: 24-24

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d07d817 and adb2a36.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • docs/backend/backend_python/openapi.json (1 hunks)
  • frontend/src/components/OnboardingSteps/AvatarSelectionStep.tsx (2 hunks)
  • frontend/src/components/OnboardingSteps/FolderSetupStep.tsx (3 hunks)
  • frontend/src/components/OnboardingSteps/OnboardingStep.tsx (2 hunks)
  • frontend/src/components/OnboardingSteps/ThemeSelectionStep.tsx (5 hunks)
  • landing-page/index.html (1 hunks)
  • landing-page/src/Pages/Landing page/Home1.tsx (1 hunks)
  • landing-page/src/Pages/pictopy-landing.tsx (4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/OnboardingSteps/ThemeSelectionStep.tsx (2)
frontend/src/features/onboardingSlice.ts (2)
  • markCompleted (31-42)
  • previousStep (43-50)
frontend/src/constants/routes.ts (1)
  • ROUTES (1-12)
🔇 Additional comments (10)
docs/backend/backend_python/openapi.json (3)

1-2927: Clarify PR scope: API schema changes not mentioned in PR objectives.

The PR description focuses exclusively on landing page improvements (smooth scrolling, documentation links, title/branding updates, download buttons). However, this OpenAPI schema file contains backend API changes to the Face Search endpoint and ImageInCluster metadata structure.

Please clarify:

  • Is this file change intentional and related to the landing page PR?
  • Should this be split into a separate PR?
  • Are there other unrelated changes bundled in this PR?

1114-1130: Input type parameter schema change: Valid but verbose.

The change wraps the InputType reference in allOf and adds description, default, and title metadata. This is a valid OpenAPI 3.1.0 pattern and improves API documentation by providing better defaults and descriptions for the parameter.

However, note that allOf with a single reference is somewhat verbose—adding the metadata properties directly at the parameter level (without the wrapper) would be more concise and equally valid. The current approach works but is not idiomatic OpenAPI.

Backwards compatibility: This change is fully backwards compatible. Existing API clients will continue to work without modification.


2204-2214: Metadata field cleanup: Removal of redundant property constraint.

The change removes "additionalProperties": true from the metadata field in ImageInCluster. This is a cosmetic cleanup since additionalProperties: true is the default in JSON Schema—removing it has no functional impact on the API contract.

Backwards compatibility: No impact. The schema behavior remains identical.

landing-page/index.html (1)

7-7: LGTM!

The title update appropriately reflects the application branding and provides clear information to users.

landing-page/src/Pages/Landing page/Home1.tsx (2)

36-54: LGTM!

The smooth scroll implementation is clean and user-friendly. The change from anchor to button is semantically correct since this triggers an action rather than navigating to a different page.


58-74: Documentation URL is accessible and implementation is correct.

The URL https://aossie-org.github.io/PictoPy/ returns a valid 200 status code and is properly accessible. The code correctly opens the documentation in a new tab using window.open with the "_blank" target, which is appropriate for external resources. No changes needed.

landing-page/src/Pages/pictopy-landing.tsx (2)

20-26: LGTM!

The constant extraction and id addition support the smooth scroll functionality implemented in Home1.tsx. Good practice to centralize the base URL.


77-113: Asset filenames are correctly matched to the current release.

The download URLs have been verified against the latest GitHub release (v1.0.0). All three asset names match exactly:

  • Mac: PictoPy_aarch64.app.tar.gz
  • Windows: PictoPy_1.0.0_x64-setup.exe
  • Linux: PictoPy_1.0.0_amd64.deb

The apparent version inconsistency (Mac lacks version in filename while Windows/Linux include it) reflects the actual release artifact naming convention, not a code issue. No changes needed.

frontend/src/components/OnboardingSteps/ThemeSelectionStep.tsx (2)

1-7: Navigation setup looks good.

The React Router integration is correctly implemented for navigating to the home page after theme selection.

Also applies to: 36-36


42-46: No action needed. ThemeSelectionStep is intentionally the final visible step in the onboarding flow (step 3 of 3 in VISIBLE_STEPS), making navigation to HOME the correct behavior. The UPDATE_STEP exists in the codebase but is not included in the user-facing onboarding sequence.


{/* Windows */}
<a
href={`${GITHUB_LATEST_RELEASE}/PictoPy_1.0.0_x64-setup.exe`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hardcoding a link in this way creates a problem. Let us say that when we release version 1.1.0, the file name will change, and the link will no longer work.

@rahulharpal1603
Copy link
Contributor

Sorry, I have to close this PR because of the problem I mentioned above.

@ritigya03 ritigya03 deleted the fix-landing-page branch December 28, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation easy good first issue Good for newcomers UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants