Skip to content

fix: make start and expire dates fields non required at ui on customi…#979

Open
tomrndom wants to merge 1 commit into
masterfrom
fix/customized-form-date-fields-required
Open

fix: make start and expire dates fields non required at ui on customi…#979
tomrndom wants to merge 1 commit into
masterfrom
fix/customized-form-date-fields-required

Conversation

@tomrndom

@tomrndom tomrndom commented Jun 12, 2026

Copy link
Copy Markdown

…zed form

ref: https://app.clickup.com/t/9014802374/86badfw5a

image

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Refactor
    • Updated date field configuration in sponsor forms while maintaining current validation behavior.

…zed form

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc2b3cfb-a51b-4d64-b594-a40441c094d7

📥 Commits

Reviewing files that changed from the base of the PR and between 2f1f3b3 and 672cb34.

📒 Files selected for processing (1)
  • src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/customized-form/customized-form.js
💤 Files with no reviewable changes (1)
  • src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/customized-form/customized-form.js

📝 Walkthrough

Walkthrough

This PR removes the required prop from two date picker fields (opens_at and expires_at) in the sponsor customized form component. The underlying Formik and Yup validation logic that controls whether these fields are actually required remains unchanged; the prop removal only affects the UI indicator.

Changes

Optional Date Fields UI

Layer / File(s) Summary
Remove required prop from date pickers
src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/customized-form/customized-form.js
The opens_at and expires_at MuiFormikDatepicker fields no longer pass the required prop; Yup validation rules control whether these dates are actually required based on form context.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • fntechgit/summit-admin#976: Both PRs modify opens_at/expires_at handling—this PR removes the UI required prop while the related PR makes the Yup validation conditional.
  • fntechgit/summit-admin#954: Both PRs remove required enforcement for sponsor date fields to support partial date updates.
  • fntechgit/summit-admin#813: Directly related—this PR removes what that PR added by removing the required prop from the same date fields.

Suggested reviewers

  • smarcet
  • caseylocker

Poem

🐰 Two date fields shed their rigid chains,
Required props removed like spring's old reins,
Yup still watches, validation true,
But UI breathes, now optional too! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: removing the required attribute from date fields in the customized form UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/customized-form-date-fields-required

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