Problem/Motivation

Related issue on the OD project on GitHub: https://github.com/drnikki/open-demographics/issues/53

Proposed resolution

After much discussion in the #ddi-contrib-team channel on the Drupal Slack, we've decided to move forward with a single field for now.

We won't look into any performance or user experience improvements in this issue per comment #4.

Remaining tasks

  • Create a follow-up issue for user experience improvement for checkboxes (applies to Drupal 8 as well?) using the issue template with details from #3 and #4.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexdmccabe created an issue. See original summary.

alexdmccabe’s picture

Status: Active » Needs review
FileSize
8.55 KB
mradcliffe’s picture

FileSize
128.26 KB
125.77 KB

I tried out the patch on simplytest.me. Everything seems to be fairly functional.

  • When I select "self-identify" and select an option further up, select or other brings me back down to the self identify text field. I find this a bit distracting because of the height of the checkboxes element. Would it be in scope to provide default CSS such as making the checkboxes element flex and wrap and give its child elements a fixed width? I don't know if this would conflict with drupal.org theming.
  • Premature optimization: it might help with views and SQL queries of lots of data to index the 32-length columns (not the text column). However this would be at the cost of increasing the field data and revision table sizes.
  • I noted that all selected options appear in the self-identify field when editing the content. To me, that's a bit confusing, but that's how select_or_other module works in Drupal 7. I found a bug that if I selected an option again then it would appear in the text field twice. I didn't find an open or closed issue regarding this in the queue so it's probably expected behavior?

Attached a sample screenshot of flexing the checkboxes element:

Long list of checkboxes
Checkboxes displayed in a flexbox

alexdmccabe’s picture

    1. I think being scrolled back down is an issue with select_or_other - might be worth opening an issue over there if they don't have one yet.
    2. Flexing the boxes would make a good novice issue, I think, and should therefore be opened after this issue is done.
  1. I imagine the primary use case will be on users, which aren't revisioned, are they? So this might be worth doing. On the other hand, some sites have a lot of users.
  2. This was actually a bug. I wasn't handling the default value properly. I broke that this morning while fixing notices related to the first three questions.
mradcliffe’s picture

Issue summary: View changes
Issue tags: +Novice, +Needs manual testing

I've updated the issue summary based on discussions in Drupal Slack today listing the remaining tasks for the issue.

volkswagenchick’s picture

Issue tags: +sfdug, +fldc19
volkswagenchick’s picture

Issue tags: +dcnj19
alexdmccabe’s picture

I just noticed that we don't actually have a field formatter anymore. I'm going to work on that today.

alexdmccabe’s picture

alexdmccabe’s picture

Issue summary: View changes
alexdmccabe’s picture

Issue summary: View changes
Darren Oh’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
37.08 KB

Patch 11 works.
Screen shot showing that only the self identification is shown in the self identification field even after selecting and saving other options.

Darren Oh’s picture

Darren Oh’s picture

Issue summary: View changes
Darren Oh’s picture

  • alexdmccabe committed 6ed7239 on 7.x-2.x
    Issue #3015379 by alexdmccabe, mradcliffe, Darren Oh, volkswagenchick:...
alexdmccabe’s picture

Fixed! Thanks everyone!

alexdmccabe’s picture

Status: Reviewed & tested by the community » Fixed
alexdmccabe’s picture

Assigned: alexdmccabe » Unassigned
alexdmccabe’s picture

alexdmccabe’s picture

Status: Fixed » Closed (fixed)

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