Skip to content

fix(preflight): give the one-page date field the whole row - #1726

Merged
chhoumann merged 1 commit into
masterfrom
cursor/one-page-date-field-layout-7ecf
Sep 2, 2026
Merged

fix(preflight): give the one-page date field the whole row#1726
chhoumann merged 1 commit into
masterfrom
cursor/one-page-date-field-layout-7ecf

Conversation

@chhoumann

@chhoumann chhoumann commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

The date field on the one-page form (used by Which day → Ask each time, the (pick a day) commands, and {{VDATE}} fields on the form) rendered inside the Setting row's control column, beside its label. That left the text box too narrow for its own placeholder (Enter a date (e.g., 'today', 'next cut off), squeezed the calendar against the right edge, and pushed the parsed preview to the bottom-right under the calendar while the left half of the row sat empty.

The row now stacks: label on top, full-width input, the parsed date directly under the input, then the calendar at the same width the standalone VDATE prompt already uses.

Before After
Date field squeezed into the right column Date field stacked full width with the parsed date under the input

Changes

  • src/preflight/OnePageInputModal.ts: the date case adds qa-onepage-date-setting to its settingEl and creates the preview element right after the input (before the picker) so the parsed date reads next to what you typed.
  • src/styles.css: .qa-onepage-date-setting stacks the Setting row (flex-direction: column), gives info/control full width, stretches the text input, and left-aligns the preview.
  • Tests: OnePageInputModal.test.ts gains a DOM-order regression test (row class present; input → preview → picker). The Setting stub in OnePageInputModal.audit-preflight-suggesters.test.ts now exposes settingEl, as the real Obsidian API does.

Testing / validation

  • pnpm run build-with-lint passes; pnpm run test: 421 files, 5201 tests passing (the new test fails without the fix).
  • Verified live in Obsidian 1.13.7 (isolated e2e vault): opened Daily note (pick a day), typed last friday; placeholder fully visible, preview 2026-09-04 sits under the input, calendar highlights the day, File name row updates. Screenshots above are from that run.

Checklist

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes
    • Improved date fields in the one-page input modal so the date input, parsed preview, and calendar picker are arranged vertically for clearer viewing.
    • Updated date field spacing, alignment, and sizing to improve readability and ensure controls use the available width.
  • Tests
    • Added coverage confirming the date field elements appear in the correct order.

The date field sat in the Setting row's control column next to its label,
so the text box was too narrow for its own placeholder, the calendar was
squeezed against the right edge, and the parsed preview ended up
right-aligned under the calendar with the left half of the row empty.

Stack the row instead: label on top, full-width input, the parsed date
directly under it, then the calendar at the same width as the standalone
VDATE prompt.

Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T06:19:59.820255Z 27e8932 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 944925d1-3aba-4156-8e29-1e2acd3cac4a

📥 Commits

Reviewing files that changed from the base of the PR and between 0adb080 and 27e8932.

📒 Files selected for processing (4)
  • src/preflight/OnePageInputModal.audit-preflight-suggesters.test.ts
  • src/preflight/OnePageInputModal.test.ts
  • src/preflight/OnePageInputModal.ts
  • src/styles.css

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The date field now stacks its input, preview, and picker vertically. The preview renders before the picker. CSS rules enforce full-width controls, and tests verify the DOM order.

Changes

Date field layout

Layer / File(s) Summary
Date rendering, styling, and validation
src/preflight/OnePageInputModal.ts, src/styles.css, src/preflight/OnePageInputModal.test.ts, src/preflight/OnePageInputModal.audit-preflight-suggesters.test.ts
The date setting receives the qa-onepage-date-setting class. The preview is created before the picker. CSS stacks the controls vertically and makes them full width. Tests verify the rendered element order. The mocked Setting stores its root element on settingEl.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 27e89

The change makes the one-page date field full width and places its parsed preview beneath the input without changing date handling or stored data. No actionable merge-blocking risk remains beyond normal checks and review.

Poem

A rabbit sees the date row stand,
With input, preview close at hand.
The picker waits below the text,
While tidy styles align the rest.
Tests hop through the ordered view.

🚥 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 clearly and concisely describes the main change: giving the one-page date field the full row for its layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files. (1 skipped: 1 unsupported.)

✨ 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 cursor/one-page-date-field-layout-7ecf

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27e8932
Status: ✅  Deploy successful!
Preview URL: https://af21a350.quickadd.pages.dev
Branch Preview URL: https://cursor-one-page-date-field-l.quickadd.pages.dev

View logs

@chhoumann
chhoumann merged commit d49afdd into master Sep 2, 2026
14 checks passed
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.

2 participants