Skip to content

feat(date): allow restrictions for dates and query date ranges #2646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

Chartman123
Copy link
Collaborator

@Chartman123 Chartman123 commented Mar 17, 2025

This closes #2396 by allowing to set minimum and maximum dates and to query date ranges

Set question settings for minimum/maximum dates and if the user must enter a date range:
image

Restricted dates and date range picker in submit view:
grafik

Results in summary / responses view:
grafik
grafik

Signed-off-by: Christian Hartmann [email protected]

@Chartman123 Chartman123 added enhancement New feature or request 2. developing Work in progress labels Mar 17, 2025
@Chartman123 Chartman123 self-assigned this Mar 17, 2025
@Chartman123 Chartman123 added this to the 5.1 milestone Mar 17, 2025
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.55%. Comparing base (d4ef335) to head (53835cd).
Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2646      +/-   ##
============================================
+ Coverage     43.31%   43.55%   +0.24%     
- Complexity      888      906      +18     
============================================
  Files            78       78              
  Lines          3371     3389      +18     
============================================
+ Hits           1460     1476      +16     
- Misses         1911     1913       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Chartman123 Chartman123 linked an issue Mar 17, 2025 that may be closed by this pull request
@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from c610911 to 2fb862b Compare March 17, 2025 22:42
@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch 21 times, most recently from 88a2440 to 231b87a Compare March 26, 2025 23:36
@Chartman123 Chartman123 requested review from susnux and Koc March 26, 2025 23:45
@Chartman123 Chartman123 added 3. to review Waiting for reviews feature: ❓ question types and removed 2. developing Work in progress labels Mar 26, 2025
@Chartman123 Chartman123 marked this pull request as ready for review March 26, 2025 23:46
@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from 231b87a to db7bee7 Compare March 26, 2025 23:55
@Chartman123 Chartman123 changed the title feat(date): add dateMin and dateMax fields to question settings feat(date): allow restrictions for dates and query date ranges Mar 26, 2025
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Looks nice! :) Added some wording suggestions to make it a bit more easy to understand / less technical.
And I’d say the icons can be removed as they are the same and thus mostly visual noise? It’s a sub-item of the checkbox anyway so it’s fine to not have an icon and thus look a bit indented.

@Chartman123
Copy link
Collaborator Author

Chartman123 commented Mar 27, 2025

@jancborchardt thanks for the review :)

It’s a sub-item of the checkbox anyway

No, they are separate from the checkbox and always shown. The restrictions of which date can be chosen apply also to single date questions. That's why I added the icons. Without them it felt wrong to me.

image

@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch 3 times, most recently from 7b55891 to b2310a2 Compare March 27, 2025 11:51
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

As icons, how about:

  • "Today" for Earliest date
  • "Event" for Latest date

https://fonts.google.com/icons?icon.set=Material+Symbols&icon.size=24&icon.color=%235f6368&icon.query=event

@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from b2310a2 to 69b267a Compare March 31, 2025 09:51
@Chartman123
Copy link
Collaborator Author

As icons, how about:

  • "Today" for Earliest date
  • "Event" for Latest date

https://fonts.google.com/icons?icon.set=Material+Symbols&icon.size=24&icon.color=%235f6368&icon.query=event

I've changed the icons and updated the screenshot in the OP :)

@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from 69b267a to b639d33 Compare March 31, 2025 11:01
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

@Chartman123 sorry, for some reason the icon link didn’t save the "fill" attribute. :\ The icons should use the filled versions, as we always do.

Verified

This commit was signed with the committer’s verified signature.
Chartman123 Christian Hartmann
This adds the possibility to add restrictions to the selectable date and to ask for a date range

Signed-off-by: Christian Hartmann <[email protected]>
@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from b639d33 to 53835cd Compare March 31, 2025 15:18
@Chartman123
Copy link
Collaborator Author

sorry, for some reason the icon link didn’t save the "fill" attribute. :\ The icons should use the filled versions, as we always do.

@jancborchardt fixed :)

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Really nice! :)

@Chartman123 Chartman123 requested a review from susnux April 1, 2025 13:45
Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

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

I think this is simpler than 4 date types.

@Chartman123 Chartman123 merged commit 4d7e594 into main Apr 1, 2025
54 checks passed
@Chartman123 Chartman123 deleted the enh/add-date-and-time-limits branch April 1, 2025 22:35
@Bibo-Joshi
Copy link

This is awesome, thanks a ton! 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feature: ❓ question types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date field: Range restriction and range responses
4 participants