Skip to content

brand review layout update - #130

Closed
gamersprogrammer wants to merge 2 commits into
AOSSIE-Org:mainfrom
gamersprogrammer:main
Closed

gamersprogrammer wants to merge 2 commits into
AOSSIE-Org:mainfrom
gamersprogrammer:main

Conversation

@gamersprogrammer

@gamersprogrammer gamersprogrammer commented Oct 31, 2025 •

Copy link
Copy Markdown

Closes #

📝 Description

The UI for rendering brand review was too basic and looked nothing like an AI powered web application, so, I decided to update the UI.

🔧 Changes Made

I added a custom input-like Ui with better flex layouts
I added a hover effect on the inputs with a purple color to match AI vibes
I added a purple border to the empty logo
I changed the color of the heading texts to purple too

🤝 Collaboratiom

No. All by myself

✅ Checklist

  • [yes] I have added tests that prove my fix is effective or that my feature works.
  • [yes ] I have added necessary documentation (if applicable).
  • [yes ] Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

  • New Features

    • Redesigned Brand review summary with organized sections for details, contact information, platforms, and collaboration preferences.
    • Added status feedback messaging for brand submissions.
  • Style

    • Enhanced logo preview styling with improved sizing and placeholders.
    • Refined button states with progress feedback and visual polish throughout the Brand review experience.

@coderabbitai

coderabbitai Bot commented Oct 31, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request refactors the Brand onboarding review section with a new ReadOnlyField component for presenting structured, sectioned details (Brand Details, Contact Information, Platforms, Collaboration Preferences) in a read-only format. It adds enhanced styling, status messaging for submission states, and UI refinements to the Brand review flow.

Changes

Cohort / File(s) Summary
Formatting updates
Frontend/index.html
Minor whitespace and trailing whitespace adjustments; no functional changes.
Brand onboarding UI refactor
Frontend/src/components/Onboarding.tsx
Introduces ReadOnlyField component and type for rendering labeled read-only fields. Restructures Brand review UI with sectioned layout (Brand Details, Contact Information, Platforms, Collaboration Preferences). Updates logo rendering with enhanced styling and placeholders. Adds submission status messaging (brandSubmitError, brandSubmitSuccess). Refines button states, conditional rendering, typography, and grid layouts across the Brand review path.

Sequence Diagram

sequenceDiagram
    actor User
    participant BrandForm as Brand Form
    participant ReviewUI as Review & Submit Section
    participant ReadOnlyField as ReadOnlyField Component
    participant Submission as Submit Handler

    User->>BrandForm: Enter brand details
    BrandForm->>ReviewUI: Trigger review phase
    ReviewUI->>ReadOnlyField: Render Brand Details section
    ReadOnlyField-->>ReviewUI: Display labeled read-only fields
    ReviewUI->>ReadOnlyField: Render Contact Information section
    ReviewUI->>ReadOnlyField: Render Platforms section
    ReviewUI->>ReadOnlyField: Render Collaboration Preferences section
    User->>ReviewUI: Click Submit button
    ReviewUI->>Submission: Submit brand data
    alt Submission Success
        Submission-->>ReviewUI: brandSubmitSuccess = true
        ReviewUI-->>User: Show green success message
    else Submission Error
        Submission-->>ReviewUI: brandSubmitError set
        ReviewUI-->>User: Show red error message
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • New component logic: The introduction of the ReadOnlyField component and its type requires careful review of prop handling, styling, and reusability across multiple sections.
  • Restructured Brand review flow: Multiple sectioned layouts with conditional rendering for status messages and button states increase logic complexity.
  • UI/UX refinements: Extensive changes to typography, grid layouts, logo rendering, and placeholders throughout the Brand path warrant careful verification against design intent.

Poem

🐰 A rabbit hops through the review screen,
Where read-only fields gleam bright and clean,
Brand details sectioned, styled with care,
Status messages floating through the air,
The UI now structured, polished, and grand—
A smoother review journey, wonderfully planned! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "brand review layout update" directly and clearly aligns with the primary changes in the changeset. The PR focuses on restructuring the Brand onboarding review UI with a new ReadOnlyField component, reorganizing content into detailed sections, updating styling (purple colors, borders, improved layouts), and refining the overall visual presentation. The title accurately captures the essence of these layout and UI improvements without being vague or misleading, and it's sufficiently specific that a teammate scanning history would understand this PR updates the brand review interface's structure and appearance.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3be437 and 88e03f6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • Frontend/index.html (1 hunks)
  • Frontend/src/components/Onboarding.tsx (2 hunks)

Comment on lines +1013 to +1083
{(brandLogoPreview || brandData.logo) ? (
<img
src={brandLogoPreview || (brandData.logo ? URL.createObjectURL(brandData.logo) : undefined)}
alt="Logo Preview"
className="h-20 w-20 rounded-full object-cover border"
/>
) : (
<div className="h-20 w-20 rounded-full bg-gray-100 flex items-center justify-center text-gray-400 border border-purple-600">
No Logo
</div>
)}
</div>

{/* Brand Details */}
<section>
<h3 className="text-lg font-semibold text-purple-500 mb-3">Brand Details</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<ReadOnlyField label="Name" value={brandData.brand_name} />
<ReadOnlyField label="Website" value={brandData.website_url} />
<ReadOnlyField label="Industry" value={brandData.industry} />
<ReadOnlyField label="Company Size" value={brandData.company_size} />
<ReadOnlyField label="Location" value={brandData.location} />
<ReadOnlyField label="Description" value={brandData.description} />
</div>
<div className="mb-4">
<h3 className="font-semibold">Brand Details</h3>
<ul className="text-sm">
<li><b>Name:</b> {brandData.brand_name}</li>
<li><b>Website:</b> {brandData.website_url}</li>
<li><b>Industry:</b> {brandData.industry}</li>
<li><b>Company Size:</b> {brandData.company_size}</li>
<li><b>Location:</b> {brandData.location}</li>
<li><b>Description:</b> {brandData.description}</li>
</ul>
</section>

{/* Contact Info */}
<section>
<h3 className="text-lg font-semibold text-purple-500 mb-3">Contact Information</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<ReadOnlyField label="Contact Person" value={brandData.contact_person} />
<ReadOnlyField label="Email" value={brandData.contact_email} />
<ReadOnlyField label="Phone" value={brandData.contact_phone} />
<ReadOnlyField label="Role" value={brandData.role} />
</div>
<div className="mb-4">
<h3 className="font-semibold">Contact Information</h3>
<ul className="text-sm">
<li><b>Contact Person:</b> {brandData.contact_person}</li>
<li><b>Email:</b> {brandData.contact_email}</li>
<li><b>Phone:</b> {brandData.contact_phone}</li>
<li><b>Role:</b> {brandData.role}</li>
</ul>
</section>

{/* Platforms */}
<section>
<h3 className="text-lg font-semibold text-purple-500 mb-3">Platforms & Social Links</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
{brandData.platforms.map(platform => {
const key = allBrandPlatforms.find(p => p.name === platform)?.key;
return (
<ReadOnlyField
key={platform}
label={platform}
value={key ? brandData.social_links[key] : ""}
/>
);
})}
</div>
<div className="mb-4">
<h3 className="font-semibold">Platforms & Social Links</h3>
<ul className="text-sm">
{brandData.platforms.map(platform => {
const key = allBrandPlatforms.find(p => p.name === platform)?.key;
return (
<li key={platform}><b>{platform}:</b> {key ? brandData.social_links[key] : ""}</li>
);
})}
</ul>
</section>

{/* Collaboration Preferences */}
<section>
<h3 className="text-lg font-semibold text-purple-500 mb-3">Collaboration Preferences</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<ReadOnlyField
label="Collaboration Types"
value={brandData.collaboration_types.join(", ")}
/>
<ReadOnlyField
label="Preferred Creator Categories"
value={brandData.preferred_creator_categories.join(", ")}
/>
<ReadOnlyField label="Brand Values" value={brandData.brand_values.join(", ")} />
<ReadOnlyField label="Preferred Tone" value={brandData.preferred_tone.join(", ")} />
</div>
<div className="mb-4">
<h3 className="font-semibold">Collaboration Preferences</h3>
<ul className="text-sm">
<li><b>Collaboration Types:</b> {brandData.collaboration_types.join(", ")}</li>
<li><b>Preferred Creator Categories:</b> {brandData.preferred_creator_categories.join(", ")}</li>
<li><b>Brand Values:</b> {brandData.brand_values.join(", ")}</li>
<li><b>Preferred Tone:</b> {brandData.preferred_tone.join(", ")}</li>
</ul>
</section>

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 | 🔴 Critical

Fix logo preview crash when onboarding resumes

Restoring brandData from localStorage gives you a plain object for logo (Files aren’t JSON‑serializable). After this change the review step now does URL.createObjectURL(brandData.logo) and later brandData.logo.name.split(...), so if the user reloads mid-onboarding the first render throws a TypeError and handleBrandSubmit will also explode when it hits .name. Please guard every File-specific operation with instanceof File, and don’t persist the raw File in brandData (omit it or store a serializable preview URL before calling localStorage.setItem). Without those changes brand onboarding becomes unrecoverable after a page refresh.

@Saahi30

Saahi30 commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

@gamersprogrammer Great work...but as communicated, kindly create an issue first.

@gamersprogrammer

Copy link
Copy Markdown
Author

@gamersprogrammer Great work...but as communicated, kindly create an issue first.

I will next time

Copilot AI review requested due to automatic review settings April 1, 2026 11:50

Copilot AI 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.

Pull request overview

This PR refreshes the Brand onboarding “Review & Submit” UI in the Onboarding flow to present brand details in a more structured, app-like layout with improved styling and status feedback.

Changes:

  • Replaced the plain brand review list with sectioned, grid-based “read-only field” blocks and updated logo/submit button styling.
  • Enhanced submit success/error messages with bordered, colored containers.
  • Added a new root-level package-lock.json and introduced minor whitespace-only changes in Frontend/index.html.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.

File Description
package-lock.json Introduces a new root lockfile (currently empty/minimal) which may impact repo-level tooling.
Frontend/src/components/Onboarding.tsx Updates Brand review step UI and adds a reusable ReadOnlyField renderer.
Frontend/index.html Whitespace-only formatting changes around the root mount point.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +996 to +1001
// custom inputs for the displayed details
const ReadOnlyField: React.FC<Readonlyfield> = ({ label, value }) => (
<div className="flex flex-col">
<label className="text-sm font-medium text-gray-600 mb-1">{label}</label>
<div className="bg-gray-50 border border-gray-200 rounded-lg px-4 py-2 text-gray-800 text-sm hover:border-purple-600">
{value && value.length > 0 ? value : <span className="text-gray-400">—</span>}

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

ReadOnlyField is typed as React.FC<...> but this file doesn't import React, so TypeScript will error with Cannot find name 'React' (new JSX transform doesn't provide the React namespace). Import the FC type from react (or import React) and update the annotation accordingly.

Copilot uses AI. Check for mistakes.
{ name: "TikTok", icon: "/tiktok.png" },
];

type Readonlyfield = {

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

The props type name Readonlyfield is inconsistently cased and doesn't follow typical TS/React naming conventions, which makes it harder to scan (especially next to the ReadOnlyField component). Consider renaming it to something like ReadOnlyFieldProps (PascalCase) for clarity.

Suggested change
type Readonlyfield = {
type ReadOnlyFieldProps = {

Copilot uses AI. Check for mistakes.
Comment on lines +998 to +1002
<div className="flex flex-col">
<label className="text-sm font-medium text-gray-600 mb-1">{label}</label>
<div className="bg-gray-50 border border-gray-200 rounded-lg px-4 py-2 text-gray-800 text-sm hover:border-purple-600">
{value && value.length > 0 ? value : <span className="text-gray-400">—</span>}
</div>

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

<label> is being used to title a non-form-control element (the value is rendered in a <div>). This is semantically incorrect and can confuse screen readers. Use a non-label element (e.g., <div>/<span>) for the text, or render an actual form control with a matching htmlFor/id pairing.

Copilot uses AI. Check for mistakes.
<label className="block text-sm font-semibold text-gray-600 mb-2">Logo</label>
{(brandLogoPreview || brandData.logo) ? (
<img
src={brandLogoPreview || (brandData.logo ? URL.createObjectURL(brandData.logo) : undefined)}

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

URL.createObjectURL(brandData.logo) is called during render, which can create a new object URL on every re-render and leak memory if not revoked. Prefer deriving the preview URL once when brandData.logo changes (and revoke it in cleanup), or rely solely on brandLogoPreview for the image src.

Suggested change
src={brandLogoPreview || (brandData.logo ? URL.createObjectURL(brandData.logo) : undefined)}
src={brandLogoPreview || undefined}

Copilot uses AI. Check for mistakes.
Comment thread Frontend/index.html
Comment on lines 9 to +15
<body>

<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

</html> No newline at end of file

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

This change introduces whitespace-only lines in the HTML (e.g., inside <body> and before </html>), which tends to create noisy diffs and can violate format/lint rules if enforced. Consider removing the extra blank/space-only lines.

Copilot uses AI. Check for mistakes.
@Saahi30

Saahi30 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the brand review layout update. I am closing this. Layout polish is not in this pass. The brand onboarding bug stays tracked on its own. See #315.

@Saahi30 Saahi30 closed this Oct 13, 2026
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.

3 participants