-
Notifications
You must be signed in to change notification settings - Fork 6
Added OfficeOverlay #22
Conversation
Update Overview
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 added some comments to the source code, please resolve them!
the function does the following 1. check if overflow-y is handled. (if it is dont care) else 2. calculate the need of a scrollbar. if(size+1) greater than our popup size 3. if calculated need is different then prop then override
needsVerticalScrollBar is non-null and non-undefined and by default set.
} vergessen und default's vertauscht
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.
added short hand undefined null check 41ab27f
src/components/Popup/OfficePopup.vue
Outdated
this.needsVerticalScrollBarCalc && { | ||
overflowY: "scroll" | ||
}, | ||
!this.needsVerticalScrollBarCalc && { |
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 think it would be enough to just have
this.needsVerticalScrollBarCalc && {
overflowY: "scroll"
},
I think you don't need the negation to set overflowY
to undefined
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.
from my pov we have to, what if the oberflowY is set on the style of the component.
this would be applied to the root element and would end up having overflow something, instead of nothing.
may be tri state would not be so wrong or?
true false handling styling intern.
undefined take whatever
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.
Yep, but if "overflowY" is set by the user, then it is set directly on the div
, so you cannot overwrite it by using the css class
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.
Also the styles set by the user shall always have a higher priority and overwrite the component styles
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.
ah is the mergestyles only appling on top of provided styles
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.
or is it inserting it over user set styles
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.
mergeStyles
only creates CSS classes based on the styles you put in. It returns these css class names which you bind to in the template.
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.
So it has the normal specificity of a CSS class, which will get overwritten by inline styles
I searched https://developer.microsoft.com/en-us/fabric#/components for Popup, isn't there.
So i decided to not include into overview