Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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:
grafik

Restricted dates and date range picker in submit view:
grafik

Results in summary / responses view:
grafik
grafik

Signed-off-by: Christian Hartmann chris-hartmann@gmx.de

@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.59%. Comparing base (f48d88b) to head (b2310a2).
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2646      +/-   ##
============================================
+ Coverage     43.34%   43.59%   +0.24%     
- Complexity      887      905      +18     
============================================
  Files            78       78              
  Lines          3368     3386      +18     
============================================
+ Hits           1460     1476      +16     
- Misses         1908     1910       +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.

<template #icon>
<Pencil :size="20" />
</template>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<template #icon>
<Pencil :size="20" />
</template>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See comment below

<template #icon>
<Pencil :size="20" />
</template>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<template #icon>
<Pencil :size="20" />
</template>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See comment below

@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 2 times, most recently from 6eabe13 to 7b55891 Compare March 27, 2025 09:27

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 <chris-hartmann@gmx.de>
@Chartman123 Chartman123 force-pushed the enh/add-date-and-time-limits branch from 7b55891 to b2310a2 Compare March 27, 2025 11:51
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
2 participants