Skip to content

Add responsive breakpoint tests and fix type validation errors#8079

Merged
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
TanCodeX:test/description-section-responsive-breakpoints
Jul 17, 2026
Merged

Add responsive breakpoint tests and fix type validation errors#8079
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
TanCodeX:test/description-section-responsive-breakpoints

Conversation

@TanCodeX

Copy link
Copy Markdown
Contributor

Description

Adds isolated responsive layout tests for DescriptionSection covering mobile viewport behavior and responsive breakpoint handling.

Changes

  • Created app/generator/components/sections/DescriptionSection.responsive-breakpoints.test.tsx

  • Added 5 test cases covering:

    • Mobile-width viewport mocking (375px)
    • Column reflow into vertical flex layouts
    • Prevention of fixed-width styles that could cause horizontal scrolling
    • Responsive scaling of navigation components
    • Mobile-specific toggle state behavior

Fixes #6937

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (test-only changes)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • I have run the relevant Vitest test suite locally.
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

Copilot AI review requested due to automatic review settings July 15, 2026 10:13

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

Pull request overview

Adds a new responsive-breakpoint-focused test suite for DescriptionSection to validate mobile viewport expectations, and updates existing type-compiler tests to reflect current component/type shapes.

Changes:

  • Added DescriptionSection.responsive-breakpoints.test.tsx with 5 responsive/mobile-oriented test cases.
  • Updated PreviewPanel type-compiler test expectations to include optional hasContent.
  • Updated GeneratorState type-compiler test expectations (via EditorPanel.type-compiler.test.tsx) to include optional articles-related fields.

Reviewed changes

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

File Description
app/generator/components/sections/DescriptionSection.responsive-breakpoints.test.tsx Adds responsive/mobile-oriented assertions for DescriptionSection.
app/generator/components/PreviewPanel.type-compiler.test.tsx Aligns prop-type expectations with PreviewPanelProps (adds hasContent?).
app/generator/components/EditorPanel.type-compiler.test.tsx Aligns GeneratorState type expectations with optional articles fields.

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

Comment on lines +40 to +42
const { container } = render(<DescriptionSection value="Test" onChange={vi.fn()} />);
expect(container).toBeDefined();
});
Comment on lines +47 to +50
const sectionContainer = container.querySelector('#description-section');
expect(sectionContainer).toBeDefined();

expect(sectionContainer?.tagName).toBe('DIV');
Comment on lines +60 to +64
expect(textArea.className).not.toMatch(/w-\[[4-9]\d{2}px\]/);
expect(textArea.className).not.toMatch(/w-\d{2,}(px|rem)/);

expect(textArea.className).toContain('w-full');
});
expect(textArea.className).toContain('w-full');
});

it('checks that navigation components scale down gracefully', () => {
@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jul 15, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3958.91 KB 3958.91 KB 0 B
Total CSS 327.67 KB 327.67 KB 0 B

@Aamod007 Aamod007 added level:intermediate Moderate complexity tasks quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests mentor:Aamod007 labels Jul 17, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Excellent work adding responsive breakpoint tests for DescriptionSection and fixing the type validation errors across the EditorPanel and PreviewPanel. However, the Vercel deployment check is failing. Please resolve the issues and rerun the CI pipeline.

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Upon re-evaluation, I realized I previously misinterpreted the Vercel deployment failure as an issue with this PR. The Vercel build failure seems unrelated to the changes introduced here, so I will ignore it moving forward. The rest of the PR looks good, so I'm approving it!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jul 17, 2026
@JhaSourav07
JhaSourav07 merged commit 83fa0fe into JhaSourav07:main Jul 17, 2026
9 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @TanCodeX! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

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

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points level:intermediate Moderate complexity tasks mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(DescriptionSection-responsive-breakpoints): verify Responsive Multi-device Columns & Mobile Viewport Layouts (Variation 7)

4 participants