Skip to content

Comments

fix: sponsor and company validation on sponsor user request form#801

Open
santipalenque wants to merge 1 commit intomasterfrom
fix/sponsor-user-access-request-validation
Open

fix: sponsor and company validation on sponsor user request form#801
santipalenque wants to merge 1 commit intomasterfrom
fix/sponsor-user-access-request-validation

Conversation

@santipalenque
Copy link

@santipalenque santipalenque commented Feb 20, 2026

https://app.clickup.com/t/86b8jnrqb

Summary by CodeRabbit

  • Bug Fixes
    • Improved error scrolling behavior to center form validation errors in the viewport for better visibility
    • Refined validation logic for sponsor and company field selections to properly enforce required field requirements

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Modified useScrollToError hook to accept an optional relative parameter for conditional scrolling behavior. Updated process-request-form.js to use the new relative scrolling mode and refactored validation logic from shape-based to custom test-based validation for sponsor and company fields.

Changes

Cohort / File(s) Summary
useScrollToError Hook Enhancement
src/hooks/useScrollToError.js
Added optional relative parameter (default false) to enable element-based smooth scrolling via scrollIntoView when true, while preserving window-based scrolling behavior when false.
Sponsor Form Validation & Scrolling
src/pages/sponsors/sponsor-users-list-page/components/process-request-form.js
Replaced shape-based validation with custom test-based validation for sponsor and company fields. Updated useScrollToError invocation to use new relative scrolling parameter for improved error navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • smarcet

Poem

🐰 A scroll so smooth, with relative grace,
Tests now validate with custom embrace,
Sponsor forms dance to a new refrain,
Errors scroll gently, no jumps in vain!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating sponsor and company validation logic on the sponsor user request form, which aligns with the primary modifications in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sponsor-user-access-request-validation

Comment @coderabbitai help to get the list of available commands and usage tips.

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