-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: survey variable for multi select #3351
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
base: develop
Are you sure you want to change the base?
Conversation
fb24124
to
0e0369d
Compare
There was a problem hiding this 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 pull request adds support for multi-select survey variables to Semaphore UI templates. The feature introduces a new "select" variable type that allows users to choose multiple values from a predefined list, building upon the existing "enum" type which only allows single selection.
Key changes:
- Added new "select" survey variable type with multi-select capabilities
- Extended frontend components to handle array-based values for select types
- Implemented custom JSON marshaling/unmarshaling to support both single and multiple default values
- Added UI components for managing multi-select variables with chips and deletion functionality
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
web/src/lang/en.js | Added localization string for "Allow multiple values" feature |
web/src/components/TeamMenu.vue | Removed extra whitespace (formatting cleanup) |
web/src/components/TaskParamsForm.vue | Enhanced form to support select type variables with multi-select UI, array normalization, and chip-based selection display |
web/src/components/TaskForm.vue | Added multi-select support to task creation form with chip display and item deletion |
web/src/components/SurveyVars.vue | Extended survey variable editor to support select type with multi-select default values and proper array/string normalization |
db/Template.go | Introduced SurveyVarSelect constant and custom SurveyVarDefaultValue type with flexible JSON marshaling for single/multiple values |
6c58c9c
to
51846ce
Compare
Let me test new code change and I will let you know. |
It looks like everything is working. I'll test it in production next week to check for any issues. |
3d86963
to
41b5824
Compare
…mplate and TaskForm components Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
…lt value normalization and selection chips Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
…ct type Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
…s component Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
…urveyVar Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
… improved default value normalization Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…m for default value normalization Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…in TaskParamsForm.vue Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
…in TaskParamsForm.vue Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…ability Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…ndling of survey variables Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…hing logic in TaskParamsForm.vue Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…ring undefined values and merging defaults into edited environment Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…veyVarType JSON handling Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…rm.vue Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…l errors Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…ion and improve default variable handling in TaskParamsForm.vue Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
…Environment in TaskParamsForm.vue Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
Signed-off-by: Prachya Saechua <psaechua@cpaxtra.co.th>
894c9b2
to
8a657a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: blackb1rd <blackb1rd.mov@gmail.com>
rebase #2754 and change naming multi_enum to select
Closes #2751