-
Notifications
You must be signed in to change notification settings - Fork 105
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
feat: implement bhHiddenField #2278
feat: implement bhHiddenField #2278
Conversation
6c44827
to
850f64e
Compare
8c265a6
to
ae2d165
Compare
@DedrickEnc, can I get a review? |
@jniles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is very important, it avoids information pollution in the system which very crucial for novices in computer system using (Vanga and Lukonga users).
Information pollution can easily unoriente users.
However, it will be good to see a test for this component. It should expose a method to toggle the view for viewing/hiding components which are inside.
Great idea!
*/ | ||
|
||
var template = | ||
'<p>' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so small but since we are not using ECMA 6 syntax to make string templating at the client side, you can create a separate file to make it easy to read.
@DedrickEnc, good idea. Tests are always a good thing 👍 I'll work on this in the next couple days - my internet connection is giving me a hard time at the moment! |
54e644c
to
b4b3631
Compare
This commit implements the `bhHiddenField` component which hides any transcluded HTML behind a toggle and lets the user decide when to show it and to hide it after. The use case is for option fields in forms that do not need to be considered by default. For example, many reports have complex options that should not be presented on the outset, but can instead by added in later. Closes Third-Culture-Software#933.
This commit adds unit tests for the `bhHiddenField` component. The component is relatively simple - is only shows and hides transcluded data. These tests assert that the data is hidden by default and visible when toggled on.
b4b3631
to
caa8e1c
Compare
@DedrickEnc, thank you for your review. You will need to run I've implemented unit tests in Karma for the bhHiddenField component. We should do this for all directives and components in the future. I've also moved the template into Let me know what you think! |
Thanks for the feedback, I am working on the stock at Pax. Will review it this evening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
2278: feat: implement bhHiddenField r=DedrickEnc a=jniles This commit implements the `bhHiddenField` component which hides any transcluded HTML behind a toggle and lets the user decide when to show it and to hide it after. The use case is for option fields in forms that do not need to be considered by default. For example, many reports have complex options that should not be presented on the outset, but can instead by added in later. Closes #933. ![clientsreportclosed](https://user-images.githubusercontent.com/896472/32426507-81521b88-c2c3-11e7-957f-bc9240fafa0d.PNG) _Fig 1: Closed Hidden Field_ ![clientsreportopen](https://user-images.githubusercontent.com/896472/32426508-82157466-c2c3-11e7-877f-009598a09204.PNG) _Fig 2: Open Hidden Field_
Build succeeded |
This commit implements the
bhHiddenField
component which hides any transcluded HTML behind a toggle and lets the user decide when to show it and to hide it after. The use case is for option fields in forms that do not need to be considered by default. For example, many reports have complex options that should not be presented on the outset, but can instead by added in later.Closes #933.
Fig 1: Closed Hidden Field
Fig 2: Open Hidden Field