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

[FormBuilderCheckboxList] Display FormBuilderFieldOption as Row instead of Column #272

Closed
awhitford opened this issue May 11, 2020 · 4 comments
Labels
duplicate This issue or pull request already exists
Milestone

Comments

@awhitford
Copy link
Collaborator

When presenting something like a Checkbox List of Weekdays (Sun, Mon, Tue, Wed, Thu, Fri, Sat), displaying them vertically is taking a lot of space, where I would prefer to see them horizontally.

I think this is controlled by this line, but there presently is no control over it.

Could a configuration be added to FormBuilderCheckboxList to control whether the FormBuilderFieldOption are displayed as a Column or a Row?

(I haven't really tried this, so it may sound easier than it actually is.)

@danvick
Copy link
Collaborator

danvick commented May 16, 2020

Hi @awhitford,
I've been considering the use of grouped_checkbox package for this purpose but I think it may introduce one or more breaking changes for current users.

I'm therefore planning to introduce it in v4.0.0 which is in the works.
What are your thoughts?

@awhitford
Copy link
Collaborator Author

I've never used the grouped_checkbox package, but the flexibility that it seems to offer looks attractive.

If you introduced this as a new class like FormBuilderCheckboxGroup, and it behaved like FormBuilderCheckboxList, it could be (more or less) a drop-in replacement. (Like how transitioning from FormBuilderStepper to FormBuilderTouchSpin was trivial.)

(For my particular scenario that triggered this issue, I ended up using a row of CheckboxListTile widgets.)

Another thing that caught my eye looking at grouped_checkbox is those group borders. I remember I used to use <fieldset> back with HTML. Having a field-group widget might be nice. (I know, separate issue.)

@danvick
Copy link
Collaborator

danvick commented May 16, 2020

Yeah. This seems like a great idea, which should be considered.

What I'm worried about is that since it's not really a bug, and it'll end up taking my already limited available time to work on v4 which aims to fix lots of bugs.

@awhitford
Copy link
Collaborator Author

Honestly, better checkbox fields are a relatively low priority for me. When I initiated this issue, I was thinking that this could be a trivial tweak by adding a layout setting.

(I'm actually much more interested in #177 and #54.)

@danvick danvick added this to the v4.0.0 milestone Jul 18, 2020
@danvick danvick added the duplicate This issue or pull request already exists label Jul 18, 2020
@danvick danvick closed this as completed Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants