Skip to content
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

Migration to module css! #1211

Merged
merged 62 commits into from
Mar 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b58e9bf
CSS modules: Buttons and Links (#1033)
dzearing Feb 21, 2017
1024bcd
CSS modules: Breadcrumb (#1035)
dzearing Feb 22, 2017
7589b20
Merge branch 'master' into module-css-updates
micahgodbolt Feb 23, 2017
291014e
CSS modules: Calendar, DatePicker (#1053)
dzearing Feb 24, 2017
e20edf9
CSS modules: Callout, ContextualMenu, Tooltip, TeachingBubble, Dialog…
dzearing Feb 24, 2017
ef66289
CSS modules: DetailsList, GroupedList (#1052)
dzearing Feb 24, 2017
440ac0f
MessageBar: Convert to CSS modules (#1086)
bomoldov Feb 24, 2017
03d3c03
Dzearing component css form (#1102)
micahgodbolt Feb 24, 2017
5da5647
CSS modules for dropdown, added base button flexContainer to be able …
micahgodbolt Feb 24, 2017
e732592
Refactoring module css for PeoplePicker. (#1069)
luhu Feb 27, 2017
e75d124
Pivot css module. (#1066)
YusongLiu Feb 27, 2017
edfc7fd
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
dzearing Feb 27, 2017
96ede42
Adding Searchbox css modules (#1068)
gokunymbus Feb 27, 2017
ddd12bf
Pickers: css modularize to keep it consistent (#1065)
joschect Feb 27, 2017
5fe1632
CSS Module Persona (#1109)
micahgodbolt Feb 27, 2017
15f1b57
Converts Nav component into modular css (#1089)
aleksandrjPersonal Feb 27, 2017
c3119f0
Module css: commandbar (#1125)
dzearing Feb 27, 2017
8aa9ec2
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
dzearing Feb 27, 2017
b262bfa
CSS Modules: Facepile (#1128)
micahgodbolt Feb 27, 2017
1e0df72
Fixing some typos in checkbox.
dzearing Feb 28, 2017
aa10e2a
Fixing padding rule in groupedlist.
dzearing Feb 28, 2017
c7acc07
Fixing ui nits in picker.
dzearing Feb 28, 2017
32b8e25
Polish on css. Making command buttons correctly left aligned.
dzearing Feb 28, 2017
bebc4d5
Updates to Panel for module css. (#1137)
dzearing Feb 28, 2017
d7e8998
Fixing Dropdown styling and focus issues.
dzearing Feb 28, 2017
39f5a64
CSS Modules: Document Card (#1149)
micahgodbolt Feb 28, 2017
4ae346a
Resolve merge conflicts pulling in master
micahgodbolt Feb 28, 2017
80c722f
Merge branch 'module-css-updates' of https://github.com/OfficeDev/off…
micahgodbolt Feb 28, 2017
c15cde4
Fixing test failure.
dzearing Mar 1, 2017
2f97bb9
More polish.
dzearing Mar 1, 2017
daf0715
Fixing ImageFit.cover
dzearing Mar 1, 2017
4bda64e
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
micahgodbolt Mar 1, 2017
ecdfb43
Setting version to beta1.
dzearing Mar 1, 2017
3ba9fb0
Merge branch 'module-css-updates' of https://github.com/OfficeDev/off…
micahgodbolt Mar 1, 2017
908140c
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
dzearing Mar 1, 2017
e191a5c
Merge branch 'module-css-updates' of https://github.com/OfficeDev/off…
dzearing Mar 1, 2017
76ec5a9
Fixed breadcrumb overflow bg on hover (#1159)
micahgodbolt Mar 1, 2017
bd867cf
Changed button label to button text, added prop and fixed examples (#…
micahgodbolt Mar 2, 2017
acffa26
Addressing tslint problems.
dzearing Mar 2, 2017
b645209
Bumping version.
dzearing Mar 2, 2017
41f3ce5
Remove width from icon in buttons (#1167)
micahgodbolt Mar 2, 2017
8b614cb
allow icon button to render children
micahgodbolt Mar 2, 2017
28bb746
Merge branch 'module-css-updates' of https://github.com/OfficeDev/off…
micahgodbolt Mar 2, 2017
9afa8a2
#791 Fixes command bar button layout shifting on hover in HighContras…
aleksandrjPersonal Mar 2, 2017
5f054d2
Updates to the Panel to position absolutely. Should unbreak Outlook.
dzearing Mar 3, 2017
6a3c302
Merge branch 'module-css-updates' of https://github.com/OfficeDev/off…
dzearing Mar 3, 2017
6831a4e
Updating package.
dzearing Mar 3, 2017
298a3ec
Add style property to IContextualMenuItem
MLoughry Mar 3, 2017
11e9fb5
Add change file
MLoughry Mar 3, 2017
c3817c9
Merge pull request #1172 from OfficeDev/contextual-menu/item-styles
MLoughry Mar 3, 2017
53fab45
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
dzearing Mar 6, 2017
0a5ab7d
Fixing lint.
dzearing Mar 6, 2017
29e7c2c
Merge branch 'master' of https://github.com/OfficeDev/office-ui-fabri…
dzearing Mar 6, 2017
f7a3fdc
Fixing conflicts.
dzearing Mar 6, 2017
2a75005
Fixes
dzearing Mar 7, 2017
febe575
bump.
dzearing Mar 7, 2017
7c35e52
Resolved conflicts, fixed facepile button outline
micahgodbolt Mar 8, 2017
39abc0e
Merge branch 'master' into module-css-updates
micahgodbolt Mar 8, 2017
0762b51
Updated changes file
micahgodbolt Mar 8, 2017
fb86f2d
Merge branch 'master' into module-css-updates
micahgodbolt Mar 8, 2017
31b10fa
#1128 -- Fixes missing truncation in IE 11 for Persona text (#1219)
aleksandrjPersonal Mar 8, 2017
254f7ba
Merge branch 'master' into module-css-updates
dzearing Mar 9, 2017
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ButtonDefaultExample extends React.Component<IButtonProps, {}> {
disabled={ disabled }
icon='Add'
description='I am a description'
label='Create account'
text='Create account'
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export class ButtonPrimaryExample extends React.Component<IButtonProps, {}> {
<PrimaryButton
data-automation-id='test'
disabled={ disabled }
>Create account</PrimaryButton>
text='Create account'
/>
</div>
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class DropdownBasicExample extends React.Component<any, any> {
label='Basic uncontrolled example:'
id='Basicdrop1'
ariaLabel='Basic dropdown example'
onChanged={ (item) => this.setState({ selectedItem: item }) }
options={
[
{ key: 'A', text: 'Option a' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ImageFit } from 'office-ui-fabric-react/lib/Image';
import { Persona, PersonaSize } from 'office-ui-fabric-react/lib/Persona';
import {
IBasePickerProps,
BasePicker,
BasePickerListBelow,
BaseAutoFill,
IPickerItemProps
} from 'office-ui-fabric-react/lib/Pickers';
Expand Down Expand Up @@ -338,42 +338,5 @@ export class PickerCustomResultExample extends React.Component<any, IPeoplePicke
}
}

export class DocumentPicker extends BasePicker<IFullDocumentCardProps, IDocumentPickerProps> {
public render() {
let { suggestedDisplayValue } = this.state;

return (
<div>
<div ref={ this._resolveRef('root') } className='ms-BasePicker' onKeyDown={ this.onKeyDown }>
<SelectionZone selection={ this.selection }>
<div className='ms-BasePicker-text'>
<BaseAutoFill
{ ...this.props.inputProps }
className='ms-BasePicker-input'
ref={ this._resolveRef('input') }
onFocus={ this.onInputFocus }
onInputValueChange={ this.onInputChange }
suggestedDisplayValue={ suggestedDisplayValue }
aria-activedescendant={ 'sug-' + this.suggestionStore.currentIndex }
aria-owns='suggestion-list'
aria-expanded='true'
aria-haspopup='true'
autoCapitalize='off'
autoComplete='off'
role='combobox'
/>
</div>
</SelectionZone>
</div>
<FocusZone ref={ this._resolveRef('focusZone') }>
{ this.renderItems() }
</FocusZone>
{ this.renderSuggestions() }
</div>
);
}

protected _onBackspace(ev: React.KeyboardEvent<HTMLElement>) {
// override the existing backspace method to not do anything because the list items appear below.
}
export class DocumentPicker extends BasePickerListBelow<IFullDocumentCardProps, IDocumentPickerProps> {
}
1 change: 1 addition & 0 deletions apps/fabric-website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<script type="text/javascript">
var isProduction = false;
var today = new Date();
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
switch (true) {
case location.hostname === 'dev.office.com':
Expand Down
20 changes: 20 additions & 0 deletions common/changes/791_CommandBarHCShift_2017-03-01-22-42.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "adds pseudo:after class to highContrastBorder mixin, renders border on hover",
"type": "patch"
},
{
"comment": "",
"packageName": "@uifabric/utilities",
"type": "none"
},
{
"comment": "",
"packageName": "@uifabric/example-app-base",
"type": "none"
}
],
"email": "v-algemb@microsoft.com"
}
20 changes: 20 additions & 0 deletions common/changes/791_CommandBarHCShift_2017-03-02-18-40.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "CommandBar: Improves accessibility by making borders visible in high contrast mode",
"type": "patch"
},
{
"comment": "",
"packageName": "@uifabric/utilities",
"type": "none"
},
{
"comment": "",
"packageName": "@uifabric/example-app-base",
"type": "none"
}
],
"email": "v-algemb@microsoft.com"
}
10 changes: 10 additions & 0 deletions common/changes/component-css-breadcrumb_2017-02-18-23-01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Breadcrumb: styles moved to css modules to allow Breadcrumbs to live side by side other versions without classname conflicts. This should change no styling rules (no rules were modified) or impact existing customizations (no class names were removed.)",
"type": "patch"
}
],
"email": "dzearing@microsoft.com"
}
15 changes: 15 additions & 0 deletions common/changes/component-css-button_2017-02-18-02-10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Button variants: the styles are now scoped within css modules. All class names that were previously on buttons still remain unchanged, but the styles have moved into a type safe hashed class name. This allows 2 different versions of any Button variant to live on the same page without having rules collide. The style rules for the variants were also tweaked. Content is now aligned using flexbox, which means more consistent centering when injecting inline, inline-block, or block elements. Second, all line-heights were removed and content now correctly centers within buttons, so if you change the height of the container (e.g. you make CommandButtons render in 36px instead of 40px) things will center correctly.",
"type": "minor"
},
{
"packageName": "office-ui-fabric-react",
"comment": "Link: the styles are now scoped within css modules. All class names that were previously on buttons still remain unchanged, but the styles have moved into a type safe hashed class name.",
"type": "minor"
}
],
"email": "dzearing@microsoft.com"
}
20 changes: 20 additions & 0 deletions common/changes/component-css-calendar_2017-02-19-00-36.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Calendar and PeoplePicker: styles moved to css modules to allow instances of Calendar and PeoplePicker to live on the same page containing newer/older versions without classname conflicts. This should change no styling rules (no rules were modified) or impact existing customizations (no class names were removed.",
"type": "patch"
},
{
"comment": "",
"packageName": "@uifabric/utilities",
"type": "none"
},
{
"comment": "",
"packageName": "@uifabric/example-app-base",
"type": "none"
}
],
"email": "dzearing@microsoft.com"
}
15 changes: 15 additions & 0 deletions common/changes/component-details-list_2017-02-20-18-22.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "DetailsList and GroupedList: styles moved to css modules to allow components to live side by side other versions without class name conflicts. This should change no styling rules (no rules were modified) or impact existing customizations (no existing class names were removed.)",
"type": "patch"
},
{
"packageName": "office-ui-fabric-react",
"comment": "DetailsList: header sizing now works correctly in Safari. Resizing also now correctly captures mouse movement and soaks events during the resize.)",
"type": "patch"
}
],
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Contextual Menu: allow developers to specify inline styles for menu items",
"type": "minor"
}
],
"email": "miclo@microsoft.com"
}
10 changes: 10 additions & 0 deletions common/changes/css-modules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "IMPORTANT: \n\nThis pull request converts ALL components over to use module css. What does this mean?\n\n* All classnames, such as ms-Button, will now be obfuscated to be unique.\n* Pages that host multiple versions of the same component will not stomp on each other and will be safe.\n* All existing class names are left intact, so current customizations should not break.\n\nGoing forward, we will adhere to using local scoped module rules specifically to avoid breaking ourselves when multiple versions. Additionally we are evaluating a much more robust and contractual way of defining our styles.\n\nProblems that still exist:\n\n1. You must rely on class names to customize, and if those class names change, your customizations are broken.\n2. Specificity of our rules is an implicit contract that is easy to break. It is often unclear and partners usually give up early fighting the specificity war and use `!important` to stomp on it, which is not ideal. If a partner does use \"more specific\" rules today, tomorrow they many not be specific enough.\n3. RTL rules in particular are very specific. When something that was once not RTL specific is changed to RTL, it becomes implicitly more specific, and thus breaks specificity contract.\n4. The bundles themselves have a lot of duplicate css. Because we generate rtl rules and theme tokens at build time rather than at runtime, we must download extra code, which bulks up the download size.\n5. Fabric core rules, which we implicitly rely on, are a hard thing to chase. If your page depends on core 6, and you're also using react components, you will find bugs. We'd like to eliminate this dependency so that it is reliable and contractual to use components. If you use a `ContextualMenu`, it should animate without depending on fabric-core css to be loaded.\n\nWe are planning to address these and evaluating library options. Issue being tracked here: #983 \n",
"type": "major"
}
],
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changes": [{
"packageName": "office-ui-fabric-react",
"comment": "Update People Picker with module css.",
"type": "patch"
}],
"email": "luh@microsoft.com"
}
10 changes: 10 additions & 0 deletions common/changes/master_2017-02-22-02-05.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "pivot css module",
"type": "minor"
}
],
"email": "xingwa@microsoft.com"
}
20 changes: 20 additions & 0 deletions common/changes/pickers-css-modularize_2017-02-22-01-33.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Pickers: css modularized all the components",
"type": "minor"
},
{
"comment": "",
"packageName": "@uifabric/utilities",
"type": "none"
},
{
"comment": "",
"packageName": "@uifabric/example-app-base",
"type": "none"
}
],
"email": "joschect@microsoft.com"
}
2 changes: 1 addition & 1 deletion common/temp_modules/rush-example-app-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
"rushDependencies": {
"office-ui-fabric-react": ">=1.14.1 <2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion common/temp_modules/rush-fabric-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"office-ui-fabric-react": ">=1.14.1 <2.0.0",
"@uifabric/utilities": ">=1.1.0 <2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion common/temp_modules/rush-fabric-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"office-ui-fabric-react": "^1.14.1",
"@uifabric/utilities": ">=1.1.0 <2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion common/temp_modules/rush-ssr-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"fabric-examples": ">=1.0.0 <2.0.0",
"office-ui-fabric-react": ">=1.14.1 <2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion common/temp_modules/rush-todo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"rushDependencies": {
"office-ui-fabric-react": ">=1.14.1 <2.0.0"
}
}
}
5 changes: 4 additions & 1 deletion packages/office-ui-fabric-react/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ build.typescript.setConfig({ typescript: require('typescript') });
// Use css modules.
build.sass.setConfig({ useCSSModules: true });

// Use Karma Tests - Disable during develoment if prefered
build.karma.isEnabled = () => true;

// Disable unnecessary subtasks.
build.preCopy.isEnabled = () => false;
build.postCopy.isEnabled = () => isProduction;
Expand Down Expand Up @@ -62,4 +65,4 @@ build.task('tslint', build.tslint);
build.task('ts', build.typescript);

// initialize tasks.
build.initialize(gulp);
build.initialize(gulp);
2 changes: 1 addition & 1 deletion packages/office-ui-fabric-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "office-ui-fabric-react",
"version": "1.14.3",
"version": "2.0.0",
"description": "Reusable React components for building experiences for Office 365.",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
position: relative;
}

:global .ms-Fabric.is-focusVisible &:focus:after {
:global(.ms-Fabric.is-focusVisible) &:focus:after {
// Wrap the parent element with $padding pixels.
content: '';
position: absolute;
Expand All @@ -33,7 +33,7 @@

// When focus is set using the keyboard, apply an outline.
@mixin focus-outline {
:global .ms-Fabric.is-focusVisible &:focus {
:global(.ms-Fabric.is-focusVisible) &:focus {
outline: 1px solid $focusedBorderColor;
}
}
Loading