Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/vr-tests/src/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ const commandProps: IButtonProps = {
{
key: 'emailMessage',
name: 'Email message',
icon: 'Mail'
iconProps: {
iconName: 'Mail'
}
},
{
key: 'calendarEvent',
name: 'Calendar event',
icon: 'Calendar'
iconProps: {
iconName: 'Calendar'
}
}
]
}
Expand Down
44 changes: 32 additions & 12 deletions apps/vr-tests/src/stories/CommandBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,55 @@ const items = [
{
key: 'newItem',
name: 'New',
icon: 'Add',
iconProps: {
iconName: 'Add'
},
subMenuProps: {
items: [
{
key: 'emailMessage',
name: 'Email message',
icon: 'Mail'
iconProps: {
iconName: 'Mail'
}
},
{
key: 'calendarEvent',
name: 'Calendar event',
icon: 'Calendar'
iconProps: {
iconName: 'Calendar'
}
}
],
},
},
{
key: 'upload',
name: 'Upload',
icon: 'Upload'
iconProps: {
iconName: 'Upload'
}
},
{
key: 'share',
name: 'Share',
icon: 'Share'
iconProps: {
iconName: 'Share'
}
},
{
key: 'download',
name: 'Download',
icon: 'Download'
iconProps: {
iconName: 'Download'
}
},
{
key: 'disabled',
name: 'Disabled...',
icon: 'Cancel',
iconProps: {
iconName: 'Cancel'
},
disabled: true
}
];
Expand All @@ -52,17 +66,23 @@ const farItems = [
{
key: 'sort',
name: 'Sort',
icon: 'SortLines'
iconProps: {
iconName: 'SortLines'
}
},
{
key: 'tile',
name: 'Grid view',
icon: 'Tiles'
iconProps: {
iconName: 'Tiles'
}
},
{
key: 'info',
name: 'Info',
icon: 'Info'
iconProps: {
iconName: 'Info'
}
}
];

Expand Down Expand Up @@ -100,8 +120,8 @@ storiesOf('CommandBar', module)
.add('Text only', () => (
<CommandBar
isSearchBoxVisible={ false }
items={ items.map(item => ({ ...item, icon: '' })) }
farItems={ farItems.map(item => ({ ...item, icon: '' })) }
items={ items.map(item => ({ ...item, iconProps: undefined })) }
farItems={ farItems.map(item => ({ ...item, iconProps: undefined })) }
/>
))
.add('Icons only', () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@uifabric/example-app-base",
"comment": "Tweaking css for example pages.",
"type": "patch"
}
],
"packageName": "@uifabric/example-app-base",
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@uifabric/merge-styles",
"comment": "Adding test coverage for media queries.",
"type": "patch"
}
],
"packageName": "@uifabric/merge-styles",
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Buttons: moving className lower in the merge list so that it has more precedence than default rules.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $dontColor: #A61E22;

.ComponentPage {
background-color: $ms-color-white;
overflow: hidden;
}

.ComponentPage-header {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
max-height: 80vh;
overflow-x: hidden;
overflow-y: auto;
padding: 20px 0;
padding: 20px 4px;
position: relative;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class Header extends React.Component<IHeaderProps, IHeaderState> {
return [{
key: 'isRTL',
name: `Render in ${this._isRTLEnabled ? 'LTR' : 'RTL'}`,
icon: 'Settings',
iconProps: { iconName: 'Settings' },
onClick: this._onRTLToggled
}];
}
Expand Down
16 changes: 16 additions & 0 deletions packages/merge-styles/src/mergeStyles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,20 @@ describe('mergeStyles', () => {
);
});

it('can register media queries', () => {
mergeStyles({
background: 'red',
selectors: {
'@media screen and (max-width: 100px)': {
background: 'green'
}
}
});

expect(_stylesheet.getRules()).toEqual(
'.css-0{background:red;}' +
'@media screen and (max-width: 100px){.css-0{background:green;}}'
);
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const getBaseButtonClassNames = memoizeFunction((
'ms-Button',
styles.root,
variantClassName,
className,
checked && [
'is-checked',
styles.rootChecked
Expand Down Expand Up @@ -72,7 +71,8 @@ export const getBaseButtonClassNames = memoizeFunction((
':hover': styles.rootCheckedHovered,
':active': styles.rootCheckedPressed
}
}
},
className
],
flexContainer: [
'ms-Button-flexContainer',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class ComponentStatus extends React.Component<IComponentStatusProps, {}>
private _colorForComponentStateStatus(testCoverageStatus: ChecklistStatus | undefined): string {
switch (testCoverageStatus) {
case ChecklistStatus.unknown:
case ChecklistStatus.notApplicable:
return 'lightgrey';
case ChecklistStatus.fail:
case ChecklistStatus.none:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ export interface IComponentStatusProps {

export enum ChecklistStatus {
unknown = 'Unknown',
notApplicable = 'Not applicable',
pass = 'Pass',
fail = 'Fail',
none = 'No Tests',
none = 'No tests',
poor = 'Poor',
fair = 'Fair',
good = 'Good'
Expand Down