Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

WIP - Add toggle area functionality #42

Closed
wants to merge 2 commits into from
Closed

WIP - Add toggle area functionality #42

wants to merge 2 commits into from

Conversation

timarney
Copy link
Member

@timarney timarney commented Sep 19, 2019

@dsamojlenko

This is a first attempt for adding a generic show hide functionally

See:

https://cds-node-starter-pr-42.herokuapp.com/personal

Would you like to receive notifications? 
()
()

Which should toggle

Notify by
[]
[]

@sastels is looking to have that functionality here
https://github.com/cds-snc/simplify-privacy-statements-V2

See my notes here in this file https://github.com/cds-snc/node-starter-app/pull/42/files#diff-b88a18411aa47e705f22c244ccee5d88

  • i.e. passing data attributes etc... to individual inputs being looped over.

@timarney timarney temporarily deployed to cds-node-starter-pr-42 September 19, 2019 14:56 Inactive
@sastels
Copy link
Contributor

sastels commented Sep 20, 2019

❤️

@timarney timarney temporarily deployed to cds-node-starter-pr-42 September 20, 2019 15:25 Inactive
@timarney
Copy link
Member Author

@dsamojlenko any thoughts?

@smcmurtry
Copy link
Collaborator

@timarney is it possible to make the "notify by" question default hidden?

@timarney
Copy link
Member Author

@smcmurtry you should be able to add a class

.visually-hidden

To handle that.

@timarney
Copy link
Member Author

timarney commented Sep 23, 2019

Going to work with @dsamojlenko to figure out the format a bit more

Which ties back to
#48

and

#57

We need a way to send data to individual elements for things like radios, checkboxes and selects

{{ radioButtons('group_name_for_input', { 'input_1': {classes: "yyy" , id: '"yyy", data-attr: "yyy"},'input_2':{classes: "zzz" , id: '"zzz", data-attr: "zzz"}}) }}

Where the object would contain the properties you want to apply to the individual element.

This will end up being a breaking change but simplify / make things more robust moving forward.

@timarney
Copy link
Member Author

Closing - will create a fresh PR once #57 or sorted out.

@timarney timarney closed this Sep 24, 2019
@timarney
Copy link
Member Author

Note the code is in use here https://github.com/cds-snc/simplify-privacy-statements-V2

@timarney timarney mentioned this pull request Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants