Group field with content only showing 4 options

Environment

Discourse Version: 2.5.0.beta2

Plugin Commit: db16c96

Other Plugins
Not relevant

Steps to Reproduce

When a user is looking at a Field of the group type made with “Content”, only 5 options appear despite there being 7 groups set (ie should be 8 options including ‘Select a group’)

In addition, the slug is displayed rather than the Full Name, which is confusing for users.

Example

Easy to reproduce

Logs

1 Like

This is what I have attempted to set:

image

This is what I get:

Screenshot 2020-04-16 at 06.47.00

A different but related problem is that when there is more than 5 options in a ‘dropdown’ field, you then have to somewhat awkardly scroll down the list.

image

It would be nice from the UX side of things if this allowed a 7 long list to be completely seen without scrolling (7 being the magic number of options we can cope with usually). This will of course also be the case with any selection field.

And another little glitch - when using Prefill with a group field, it:

  1. allows you to set multiple selections (which shouldn’t be possible) image
  2. displays a number rather than the actual selection*
    image

@Nathan Thanks, I’m taking a look at this now.

Thanks for the detailed feedback, it’s very helpful.

I’ve tweaked this so the full name is used (if present, it’s an optional field).

I’m looking at the test wizard on HealthForum.nz and seeing all 7 options (I didn’t change any settings).

When testing this on test.thepavilion.io, I’m also seeing it work as expected. e.g.

There are two main possibilities for this difference.

Firstly, wizard may not have been saved prior to your test. I would like to improve the “saving” experience of wizards. I often forget to do this myself.

Secondly, group permissions are affecting this. I think this is the most likely cause. As well as being affected by the Content setting, the group dropdown is also affected by the permissions of the user on the wizard. I should (will) explain this in the documentation.

This is intentional, i.e. the standard is to respect all existing permissions structures, unless explicitly precluded. Comparing all-dental-professionals (appears in your example) with all-doctors (doesn’t appear in your example), I think the visibility permissions may be the cause. Were you testing with a non-admin user?

all-doctors permissions

Screen Shot 2020-04-16 at 9.19.07 AM

all-dental-professionals permissions

Screen Shot 2020-04-16 at 9.19.19 AM

This is a Discourse standard, which I’m going to stick to here, however we can easily address this for your case. I can make you a “HFNZ Wizards” theme component that addresses this and other stylistic tweaks. If you could make a list of style tweaks (color, layout, text size etc), I’ll add them into a theme component.

There are use cases where multiple selections are necessary, which is why this is possible in the administration panel. Albeit, you’re right in that the “frontend” (i.e. the wizard itself) this isn’t supported yet. I’ll add support for this in the next week or so, but it’s not a priority.

This will currently happen if the prefill option is not in the content list. I will address this in the next few days, but haven’t yet as it doesn’t break anything if used properly.

Thanks for gettting straight onto this!!!

Yup - I didn’t think of this. That is the cause.

Sweet!!! - I’ll get back to you on that soon.

1 Like