Skip to content

feat(build): group components in checkbox selection#2209

Merged
lubber-de merged 2 commits intofomantic:developfrom
lubber-de:groupComponents
Jan 23, 2022
Merged

feat(build): group components in checkbox selection#2209
lubber-de merged 2 commits intofomantic:developfrom
lubber-de:groupComponents

Conversation

@lubber-de
Copy link
Copy Markdown
Member

Description

This PR adds a Grouping Header to the component selection at install time.

It's more a hack by using disabled entries, but works out good enough 😄

I, for now, decided against renaming the form.js to formvalidation.js because i fear a too big breaking change and most probably people who want form elements also want the validation anyway.
I could have just changed the checkbox selection name to "formvalidation" but effectively the script would have continued with "form" anyway which probably creates more confusion.

Testcase

  • run npx gulp install
  • select "Yes, extend my settings"
  • select "express" or "custom"
  • see the checkbox components list are now grouped by unselectable "headers"

Screenshot

image
image
image
image
image

Closes

#2180

@lubber-de lubber-de added type/feat Any feature requests or improvements lang/javascript Anything involving JavaScript type/build Anything related to the build process state/awaiting-reviews Pull requests which are waiting for reviews labels Jan 22, 2022
@lubber-de lubber-de added this to the 2.9.0 milestone Jan 22, 2022
@hugopeek
Copy link
Copy Markdown
Contributor

Hacky or not, I like it! :)

I, for now, decided against renaming the form.js to formvalidation.js because i fear a too big breaking change and most probably people who want form elements also want the validation anyway.

I understand the breaking change part. Propably not worth it.

But please don't assume that people using form elements will want validation too. One developer I know uses SUI for the HTML/CSS, but ships it with his own vanilla JS. I often rely purely on backend validation. So form elements and validation are definitely 2 separate things.

I could have just changed the checkbox selection name to "formvalidation" but effectively the script would have continued with "form" anyway which probably creates more confusion.

You're right, thanks for not doing that ;)

The double form component is an odd ambiguity from SUI. Can imagine if you want to leave it as is for now, but maybe keep it in the backlog of a possible v3?

@lubber-de
Copy link
Copy Markdown
Member Author

But please don't assume that people using form elements will want validation too. One developer I know uses SUI for the HTML/CSS, but ships it with his own vanilla JS. I often rely purely on backend validation. So form elements and validation are definitely 2 separate things.

Totally agree! Backend validation ist basically the main point to implement any data validation.
TBH, i was about to rename it, but also saw too much of needed changes (docs...)

I also thought about making it backward compatible somehow... but was too lazy to do all the needed implementation....for now.

The double form component is an odd ambiguity from SUI. Can imagine if you want to leave it as is for now, but maybe keep it in the backlog of a possible v3?

Seems legit, yes

Copy link
Copy Markdown
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

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

LGTM:+1:

@lubber-de lubber-de merged commit bfb3009 into fomantic:develop Jan 23, 2022
@lubber-de lubber-de deleted the groupComponents branch January 23, 2022 11:13
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/javascript Anything involving JavaScript type/build Anything related to the build process type/feat Any feature requests or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants