Skip to content

date picker autocomplete#233

Open
IslandRhythms wants to merge 5 commits into
mainfrom
IslandRhythms/improve-date-search
Open

date picker autocomplete#233
IslandRhythms wants to merge 5 commits into
mainfrom
IslandRhythms/improve-date-search

Conversation

@IslandRhythms
Copy link
Copy Markdown
Contributor

No description provided.

@IslandRhythms IslandRhythms requested a review from vkarpov15 April 27, 2026 19:02
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio Ready Ready Preview, Comment May 8, 2026 10:38pm

@IslandRhythms IslandRhythms linked an issue Apr 27, 2026 that may be closed by this pull request
@vkarpov15 vkarpov15 requested a review from Copilot April 29, 2026 20:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the document search input to surface a datetime-local picker when the cursor is inside a Date(...) / new Date(...) argument, enabling quick insertion of a quoted ISO timestamp into the filter expression.

Changes:

  • Add date-picker state + insertion behavior to the document-search component.
  • Update the document-search dropdown UI to include a datetime-local input above autocomplete suggestions.
  • Extend document-search-autocomplete with helpers to detect Date(...) argument ranges and perform ISO insertion.

Reviewed changes

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

File Description
frontend/src/models/document-search/document-search.js Tracks date-picker context/value during autocomplete updates and inserts ISO strings into Date(...) arguments.
frontend/src/models/document-search/document-search.html Shows a date picker in the autocomplete dropdown and triggers autocomplete updates on more events.
frontend/src/_util/document-search-autocomplete.js Adds parsing + insertion helpers for detecting date argument ranges and converting slices to/from datetime-local.

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

Comment thread frontend/src/models/document-search/document-search.html Outdated
Comment thread frontend/src/models/document-search/document-search.js Outdated
Comment thread frontend/src/_util/document-search-autocomplete.js
Comment thread frontend/src/_util/document-search-autocomplete.js
Comment thread frontend/src/models/document-search/document-search.html Outdated
Copy link
Copy Markdown
Member

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Overall this is great! I just had a couple of suggestions:

  1. Would be great if the autocomplete added the close parenthesis to new Date() as well so the query could execute immediately after selecting in date picker
Image
  1. Can there be some sort of shadow or border around the native date picker? Right now it's white on white with no border
Image
  1. Clicking outside of the filter input should close the date picker autocomplete

  2. Add some tests in document-search-autocomplete.test.js

@IslandRhythms
Copy link
Copy Markdown
Contributor Author

The browser / OS controls that date picker so I can't add anything to make that look better. We'd have to possibly build a custom datepicker or add a backdrop perhaps when they click the date picker button.

Copy link
Copy Markdown
Member

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Mobile layout is unfortunately not usable either, worth taking a pass at improving mobile. In terms of the issue with lack of border, let's look into either adding a custom date picker since the built in browser date picker is not sufficiently configurable

Image

@IslandRhythms
Copy link
Copy Markdown
Contributor Author

The mobile UI is gonna be its own PR

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.

Improve Date searching

3 participants