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) O3-3481 Adds option to display multi-checkbox inline #331

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

pirupius
Copy link
Member

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Switches from constraining inline display of multi-select from number of answers to using config. Previously the limit was less than 5 answers but with this users have the choice to dictate their preference. This requirement also matches behavior from other engines.

Sample Usage
Add inlineMultiCheckbox key to your already existing multi-checkbox fields

{
  "label": "Sample Section",
  "isExpanded": "true",
  "questions": [
     {
       "label": "Inline multi-checkbox",
       "type": "obs",
       "required": false,
       "id": "anotherSampleQuestion",
       "questionOptions": {
         "rendering": "multiCheckbox",
         "concept": "xxxx",
         "answers": [...]
       },
       "inlineMultiCheckbox": true
     }
   ]
}

Screenshots

inline.multi-checkbox.mov

Related Issue

https://openmrs.atlassian.net/browse/O3-3481

Other

Copy link

Size Change: -14 B (0%)

Total Size: 1.01 MB

ℹ️ View Unchanged
Filename Size Change
dist/184.js 11.2 kB 0 B
dist/195.js 76.6 kB 0 B
dist/225.js 2.57 kB 0 B
dist/29.js 163 kB 0 B
dist/300.js 709 B 0 B
dist/327.js 1.84 kB 0 B
dist/335.js 967 B 0 B
dist/353.js 3.02 kB 0 B
dist/41.js 3.36 kB 0 B
dist/422.js 6.79 kB 0 B
dist/474.js 116 kB 0 B
dist/491.js 9.18 kB 0 B
dist/540.js 2.63 kB 0 B
dist/55.js 756 B 0 B
dist/635.js 14.3 kB 0 B
dist/70.js 482 B 0 B
dist/776.js 3.2 kB 0 B
dist/800.js 245 kB -3 B (0%)
dist/99.js 690 B 0 B
dist/993.js 3.09 kB 0 B
dist/main.js 343 kB -11 B (0%)
dist/openmrs-form-engine-lib.js 3.72 kB 0 B

compressed-size-action

@@ -134,6 +134,7 @@ export interface FormField {
questionInfo?: string;
historicalExpression?: string;
constrainMaxWidth?: boolean;
inlineMultiCheckbox?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Minor comment: useCheckboxGroup reads better

Copy link
Member Author

Choose a reason for hiding this comment

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

Good alternative but I went with this naming because it was more intuitive to it's purpose which was displaying them in a line.

@pirupius pirupius merged commit e8c67c4 into main Jun 27, 2024
4 checks passed
@pirupius pirupius deleted the O3-3481/adds-config-for-inline-multicheckbox branch June 27, 2024 10:21
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