-
Notifications
You must be signed in to change notification settings - Fork 463
Error Banner Component #212
Conversation
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.
I'm wondering if we can just add a class to the chevronButton container to make it visible and have it display none by default instead of relying on js setting inline styles. Something like:
.ms-ErrorBanner-expand {
display: none;
&.is-visible {
display: inline-block;
}
}
and
var _onResize = function(event) {
_clientWidth = _errorBanner.offsetWidth;
if ((_clientWidth - _bufferSize) > _initTextWidth && _initTextWidth < _textContainerMaxWidth) {
_textWidth = "auto";
_chevronButton.className = "ms-ErrorBanner-expand";
_collapse();
} else {
_textWidth = Math.min((_clientWidth - _bufferSize), _textContainerMaxWidth) + "px";
_chevronButton.className += " is-visible";
}
_clipper.style.width = _textWidth;
};
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.
Resolved.
Really nice work and clean code. Just had a few comments on things. Looking good though. |
…bility. Added a CSS class to toggle the chevron button's display property as opposed to using js. Added a class to toggle the display property of the component. Added the public method 'showBanner' to show the banner if it is in a hidden state. Fixed misspelling. Removed unnecessary padding. Moved font mixin to top of main component class.
Thanks for the suggestions! I made the changes you noted as well as made some additional changes based on your feedback. |
Go home William On Fri, Nov 20, 2015 at 7:10 PM, William Do [email protected]
ADF |
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.
Remove space between class selector and nested selector here.
This is looking great, I just called out a few small spacing things that are related to our conventions. After that you can just merge this in. Nice updates! |
Adding error banner component to Fabric.