bump office-ui-fabric-react to 5.85.0#300
Conversation
https://github.com/OfficeDev/office-ui-fabric-react/pull/4382/files changed line-height from 70px to 72px
6f5843c to
791c7b2
Compare
c3e602c to
6c35c6a
Compare
|
Ok, this is ready for review. @swese44 @unindented @richardtagger |
| opacity: 0.7, | ||
| width: `${this.props.iconSize}px`, | ||
| height: `${this.props.iconSize}px`, | ||
| color: '#495361', |
There was a problem hiding this comment.
It may be time to create a TS file with all these colors, and have it live side-by-side with the CSS one. Having these colors sprinkled in TS code doesn't look great.
There was a problem hiding this comment.
i agree, i don't know what color that is just looking at the PR :(
| opacity: 1, | ||
| }, | ||
| }; | ||
| }; |
There was a problem hiding this comment.
You will be generating a new object every time this function gets called, which means you'll need to re-render this component every time.
There was a problem hiding this comment.
Looks like getMenuProps had the same problem, so this isn't making it worse.
There was a problem hiding this comment.
the styles can change if certain props change, so i guess we could cache the styles object and update it when props change. seems gross. another option could be to make the entire styles object static, specifying variable values like root width and height on specific root classes and passing the correct root className in at each size?
src/css/variables/borders.css
Outdated
| box-shadow: 0 0 12px rgba(0, 0, 0, 0.2) !important; | ||
| border: none; | ||
| border-radius: 1px; | ||
| border-width: 0px !important; |
There was a problem hiding this comment.
No need for units when 0, just border-width: 0 !important.
swese44
left a comment
There was a problem hiding this comment.
i'd like to see us address colors in TS. if you want to ship it now then please add an issue so we can track it.
it would be nice to replace getStyles with a static object, but as @unindented pointed out we still have getMenuProps so it won't help with perf at this point
965388e to
0e451df
Compare
| lineHeight: '2.8rem', | ||
| }, | ||
| superLarge: fontStyles, | ||
| mega: fontStyles, |
There was a problem hiding this comment.
Weird thing is that it looks like these fontStyle colors had no effect.
There was a problem hiding this comment.
these did override the default typography element colors. are visual diffs still passing?
There was a problem hiding this comment.
Yes, the visual diffs still passed. I manually inspected some elements, but had trouble finding the rule being applied anywhere.
Looking closer now at Block, I see the color is being overridden by a merge style, so instead of #343A41 it is rgb(51, 51, 51).
I'll look a little closer at this, and see if our visual diff picks up the difference.
There was a problem hiding this comment.
Also just to clarify, it's our current version of of yamui (https://microsoft.github.io/YamUI) that is using the wrong color.
There was a problem hiding this comment.
I confirmed that #343A41 is not surfaced anywhere AND that our visual diff would detect the change. If we want #343A41 to be the default text color, it looks like we can add neutralPrimary: blackMetal, to our theme overrides.
9f0697b to
0e451df
Compare
src/util/colors.ts
Outdated
| button: deathMetal, | ||
| buttonHovered: river, | ||
| buttonPressed: river, | ||
| buttonExpanded: river, |
There was a problem hiding this comment.
in CSS we abstracted all these colors into pseudo "theme" variables which components would map to their own rules. i think we're getting too specific here, i think we should be mapping our un-understandable blue/stream/pond/deathmetal color names to contextual theme names like Fabric does.
There was a problem hiding this comment.
otherwise this colors object will turn into an enormous object with lots of duplication
There was a problem hiding this comment.
@swese44 Makes sense. So maybe textColorSecondary and linkColor?
There was a problem hiding this comment.
i think it would be ideal to just use the same color variables we had in CSS, it'll be easier for us to refactor CSS into mergeStyles in the future
There was a problem hiding this comment.
(or just the subset of the existing color variables you need for button)
There was a problem hiding this comment.
Cool. I got the names textColorSecondary and linkColor from the colors.css file, but just converted the name to camel case.
Is this what you had in mind?
const colors = {
textColorSecondary: deathMetal,
linkColor: river,
};
There was a problem hiding this comment.
the word color is probably a bit redundant. How about this?
const colors = {
textSecondary: deathMetal,
link: river,
};
In preparation to allow custom description's on TextField.
microsoft/fluentui#4588
Changes
Avatar - Persona initials changed line-height from 70px to 72px. Added overrided to fix.
https://github.com/OfficeDev/office-ui-fabric-react/pull/4382/files
MenuButton - Fabric IconButton refactor caused a change in css order. If you look at the commit history, my first fix was to use more specific selectors. Then instead I passed the overrides in through the
stylesprop on IconButton. I think this will generally be more maintainable, but don't feel great about the hard-coded color strings. Feedback?Hovercard - .ms-Callout now has a 1px border, when we expected 0. I've added an !important overrride here.
Various snapshot changes.