Problem/Motivation

Follow-up from #3015379: Use a single field for all four questions

The list of checkboxes is very long.

long list of checkboxes that extends passed the fold of the browser

Proposed resolution

This could be improved by using a flex display in columns or rows with wrapping so that the checkboxes are displayed more compactly on desktop and tablets, but still long on phones.

list of checkboxes that are displayed as flex items

Remaining tasks

Discuss approaches and write a patch.

User interface changes

Adds a flex container styling to the widget.

Comments

mradcliffe created an issue. See original summary.

govind.maloo’s picture

Issue summary: View changes

We could use simple CSS hack here to fix the height and use x-scroll to scroll.

alexdmccabe’s picture

To be honest, "hack" isn't the most reassuring word here. I'm not great at front end development, but I think having it behave responsively instead of fixing the height would be a better option.

alexdmccabe’s picture

Issue tags: +midcamp2019
priyankanarsule’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

I have added CSS for checkboxes. Does it need anything else?

Akanksha92’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new6.52 KB

@priyankanarsule the patch looks good. The patch applied to the module successfully. Please find the attached screenshot for the same.

helenasue’s picture

Issue tags: -midcamp2019 +Seattle2019

Checking this out at DrupalCon Seattle. :)

helenasue’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new970 bytes
new958 bytes

I've added responsive support for this to make sure it looks good and is useable at all breakpoints.

ivavictoria’s picture

I'm updating the CSS to use a more general class. If the field gets a different name (for example, "field_test_gender" instead of "field_gender"), the old class would no longer work.

alexdmccabe’s picture

Status: Needs review » Fixed

Looks good to me! Merged and pushed as 7.x-2.1!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.