Skip to content

fix(docs): preserve dashboard dialog validation - #6875

Open
rohit-jsfreaky wants to merge 1 commit into
reflex-dev:mainfrom
rohit-jsfreaky:fix/dashboard-dialog-validation
Open

fix(docs): preserve dashboard dialog validation#6875
rohit-jsfreaky wants to merge 1 commit into
reflex-dev:mainfrom
rohit-jsfreaky:fix/dashboard-dialog-validation

Conversation

@rohit-jsfreaky

@rohit-jsfreaky rohit-jsfreaky commented Aug 12, 2026

Copy link
Copy Markdown

Fixes #6816

Summary

The dashboard tutorial wraps its Submit button in rx.dialog.close, so clicking it closes the dialog before the browser can keep an invalid required form open.

This makes each executable dashboard example use controlled dialog state. The form's submit handler closes the dialog only after a valid submission has reached add_user. The Cancel control remains a normal rx.dialog.close action.

Behavior

  • Empty required fields keep the dialog open and use native browser validation.
  • A valid submission adds the user, then closes the dialog.
  • Cancel, Escape, and outside-dismiss changes stay synchronized through on_open_change.

Validation

  • Reproduced the reported behavior in the live dashboard tutorial before changing the documentation.
  • uv run reflex compile from docs/app passed.
  • uv run pytest "docs/app/tests/test_docgen_double_eval.py::test_double_eval_all_docs[docs/getting_started/dashboard_tutorial.md]" passed.
  • uv run pre-commit run --files docs/getting_started/dashboard_tutorial.md passed.
  • uv run ruff check . passed.
  • uv run pyright reflex tests passed with 0 errors.

Full suite note

uv run pytest tests/units --cov --no-cov-on-fail --cov-report= completed with 7,030 passing tests and 140 unrelated failures in cloud/CLI and telemetry tests on this Windows/Python 3.14 environment. The changed dashboard tutorial docgen case passes.

Submission checklist

Review in cubic

@rohit-jsfreaky
rohit-jsfreaky requested review from a team and Alek99 as code owners August 12, 2026 08:05
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The documentation examples now control dashboard dialog visibility through Reflex state so invalid required forms remain open and successful submissions close the dialog.

  • Adds dialog-open state and change handlers throughout the executable dashboard examples.
  • Moves successful closure into each form submission handler.
  • Leaves Cancel as a standard dialog-close action and updates the accompanying tutorial text.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/getting_started/dashboard_tutorial.md Updates all dashboard tutorial variants to use controlled dialog state and close only after successful form submission.

Reviews (2): Last reviewed commit: "fix(docs): preserve dialog validation in..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/getting_started/dashboard_tutorial.md
@rohit-jsfreaky
rohit-jsfreaky force-pushed the fix/dashboard-dialog-validation branch from 0b8a1ff to 321ed07 Compare August 12, 2026 08:51
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.

Submit button doesn't wait for required fields

1 participant