diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 22846bfd41b74..853c516dad689 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,91 +4,105 @@ # These owners will be the default owners for everything in the repo. # Unless a later match takes precedence, @global-owner1 and @global-owner2 # will be requested for review when someone opens a pull request. -# * @global-owner1 @global-owner2 +# * @global-owner1 @global-owner2 # Order is important; the last matching pattern takes the most precedence. # When someone opens a pull request that only modifies JS files, only @js-owner # and not the global owner(s) will be requested for a review. -# *.js @js-owner +# *.js@js-owner # You can also use email addresses if you prefer. They'll be used to look up # users just like we do for commit author emails. -# docs/* docs@example.com +# docs/ docs@example.com + +#### Core build stuff +scripts/ @dzearing #### Apps -# component-demo/* -# fabric-website/* -# ssr-tests/* -# test-bundle-button/* -# todo-app/* +# component-demo/ +# fabric-website/ +# ssr-tests/ +# test-bundle-button/ @dzearing +# todo-app/ #### Packages -# packages/example-app-base/* -# packages/example-component/* +# packages/example-app-base/ +packages/file-type-icons/ @KatherineThayerMicrosoft @jahnp @bigbadcapers +# packages/icons/ +# packages/jest-serializer-merge-styles/ +# packages/merge-styles/ +# packages/office-ui-fabric-react-tslint/ +packages/styling/ @dzearing +packages/styling/src/interfaces/ @phkuo +packages/styling/src/styles/ @phkuo +# packages/utilities/ +packages/utilities/positioning/ @joschect - ### Fabric - # packages/office-ui-fabric-react/src/common/* +### Fabric +# common/ +common/_semanticSlots.scss @phkuo +common/_themeOverrides.scss @phkuo +common/_common.scss @phkuo - ## Components - # packages/office-ui-fabric-react/src/components/ActivityItem/* - # packages/office-ui-fabric-react/src/components/Breadcrumb/* - # packages/office-ui-fabric-react/src/components/Button/* - packages/office-ui-fabric-react/src/components/Calendar/* @johannao76 @lorejoh12 - # packages/office-ui-fabric-react/src/components/Callout/* - # packages/office-ui-fabric-react/src/components/Check/* - # packages/office-ui-fabric-react/src/components/Checkbox/* - # packages/office-ui-fabric-react/src/components/ChoiceGroup/* - # packages/office-ui-fabric-react/src/components/ColorPicker/* - # packages/office-ui-fabric-react/src/components/ComboBox/* - packages/office-ui-fabric-react/src/components/CommandBar/* @micahgodbolt - # packages/office-ui-fabric-react/src/components/ContextualMenu/* - packages/office-ui-fabric-react/src/components/DatePicker/* @johannao76 @lorejoh12 - # packages/office-ui-fabric-react/src/components/DetailsList/* - # packages/office-ui-fabric-react/src/components/Dialog/* - # packages/office-ui-fabric-react/src/components/DocumentCard/* - # packages/office-ui-fabric-react/src/components/Dropdown/* - # packages/office-ui-fabric-react/src/components/Fabric/* - # packages/office-ui-fabric-react/src/components/FacePile/* - # packages/office-ui-fabric-react/src/components/FocusTrapZone/* - # packages/office-ui-fabric-react/src/components/FocusZone/* - # packages/office-ui-fabric-react/src/components/GroupedList/* - packages/office-ui-fabric-react/src/components/HoverCard/* @atneik @Jahnp - # packages/office-ui-fabric-react/src/components/Icon/* - # packages/office-ui-fabric-react/src/components/Image/* - # packages/office-ui-fabric-react/src/components/Label/* - # packages/office-ui-fabric-react/src/components/Layer/* - # packages/office-ui-fabric-react/src/components/Link/* - packages/office-ui-fabric-react/src/components/List/* @cschleiden - # packages/office-ui-fabric-react/src/components/MarqueeSelection/* - # packages/office-ui-fabric-react/src/components/MessageBar/* - # packages/office-ui-fabric-react/src/components/Modal/* - # packages/office-ui-fabric-react/src/components/Nav/* - packages/office-ui-fabric-react/src/components/OverflowSet/* @micahgodbolt - # packages/office-ui-fabric-react/src/components/Overlay/* - # packages/office-ui-fabric-react/src/components/Panel/* - # packages/office-ui-fabric-react/src/components/Persona/* - # packages/office-ui-fabric-react/src/components/pickers/* - # packages/office-ui-fabric-react/src/components/Pivot/* - # packages/office-ui-fabric-react/src/components/Popup/* - # packages/office-ui-fabric-react/src/components/ProgressIndicator/* - packages/office-ui-fabric-react/src/components/Rating/* @cschleiden - packages/office-ui-fabric-react/src/components/ResizeGroup/* @micahgodbolt - # packages/office-ui-fabric-react/src/components/SearchBox/* - # packages/office-ui-fabric-react/src/components/Slider/* - # packages/office-ui-fabric-react/src/components/SpinButton/* - # packages/office-ui-fabric-react/src/components/Spinner/* - # packages/office-ui-fabric-react/src/components/SwatchColorPicker/* - packages/office-ui-fabric-react/src/components/TeachingBubble/* @micahgodbolt - # packages/office-ui-fabric-react/src/components/TextField/* - # packages/office-ui-fabric-react/src/components/Theme/* - packages/office-ui-fabric-react/src/components/Toggle/* @phkuo - packages/office-ui-fabric-react/src/components/Tooltip/* @micahgodbolt +### Utilities +dateMath/ @lorejoh12 @sathi23 +dateValues/ @lorejoh12 @sathi23 - # packages/office-ui-fabric-react/src/demo/* - # packages/office-ui-fabric-react/src/utilities/* - # packages/office-ui-fabric-react/src/visualtest/* +## Components +# ActivityItem/ +# Breadcrumb/ +# Button/ +Calendar/ @lorejoh12 @sathi23 +Callout/ @joschect +# Check/ +# Checkbox/ +ChoiceGroup/ @srideshpande +# ColorPicker/ +# ComboBox/ +CommandBar/ @micahgodbolt +ContextualMenu/ @joschect +DatePicker/ @lorejoh12 @sathi23 +# DetailsList/ +# Dialog/ +DocumentCard/ @yiminwu @mikewheaton +# Dropdown/ +# Fabric/ +# FacePile/ +# FocusTrapZone/ +# FocusZone/ +GroupedList/ @aditima +HoverCard/ @atneik @Jahnp +# Icon/ +# Image/ +# Label/ +Layer/ @ThomasMichon +# Link/ +List/ @cschleiden +# MarqueeSelection/ +# MessageBar/ +# Modal/ +# Nav/ +OverflowSet/ @micahgodbolt +# Overlay/ +# Panel/ +# Persona/ +Persona/PersonaCoin.tsx @mtennoe @jakob101 +Persona/PersonaConsts.tsx @mtennoe @jakob101 +pickers/ @joschect +# Pivot/ +# Popup/ +# ProgressIndicator/ +Rating/ @cschleiden +ResizeGroup/ @micahgodbolt +# SearchBox/ +# Slider/ +# SpinButton/ +# Spinner/ +# SwatchColorPicker/ +TeachingBubble/ @micahgodbolt +# TextField/ +# Theme/ +Toggle/ @phkuo +Tooltip/ @micahgodbolt -# packages/office-ui-fabric-react-tslint/* -packages/styling/* @dzearing @phkuo -# packages/utilities/* diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000000..fb1495cce0952 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,58 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 180 + +# Number of days of inactivity before a stale Issue or Pull Request is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 60 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - "Priority 0" + - "Priority 1" + - "Needs: discussion" + - "Needs: revisit" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Label to use when marking as stale +staleLabel: no-recent-activity + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React! + + [Why am I receiving this notification?](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/FAQ.md#q-why-do-i-get-the-stalebot-messages-why-is-my-issue-marked-as-stale) + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +closeComment: > + This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! + + [Why am I receiving this notification?](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/FAQ.md#q-why-do-i-get-the-stalebot-messages-why-is-my-issue-marked-as-stale) + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed diff --git a/.gitignore b/.gitignore index 5e4728c515245..037b95769bc43 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ node_modules temp lib lib-amd -lib-es6 +lib-es2015 coverage dist npm-debug.log diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000000..9aa55866cf42d --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +8.x \ No newline at end of file diff --git a/.npm-version b/.npm-version new file mode 100644 index 0000000000000..ad98597185fb2 --- /dev/null +++ b/.npm-version @@ -0,0 +1 @@ +2.x \ No newline at end of file diff --git a/.npmrc b/.npmrc index 825c83e09df4d..1df2a6d8579b7 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ registry=https://registry.npmjs.org/ - +package-lock=false diff --git a/.travis.yml b/.travis.yml index 28ef2764c908b..03a88d5329b50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ language: node_js node_js: - - '7' + - '8' script: - - npm run buildfast \ No newline at end of file + - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "true" ]; then + npm run checkchange; + fi + - npm run buildfast + - npm run bundlesize + - npm run vrtest diff --git a/.vscode/launch.json b/.vscode/launch.json index ea7d8e1ca1891..d11601527a252 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,7 +22,27 @@ "sourceMaps": true }, { - "name": "Debug build", + "name": "Build fabric", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/scripts/build.js", + "cwd": "${workspaceRoot}/packages/office-ui-fabric-react", + "stopOnEntry": false, + "args": [ + "ts" + ], + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy", + "--debug" + ], + "env": { + "NODE_ENV": "development" + }, + "sourceMaps": true + }, + { + "name": "Debug build Production", "type": "node", "request": "launch", "program": "${workspaceRoot}/scripts/build.js", @@ -42,6 +62,28 @@ "NODE_ENV": "development" } }, + { + "name": "Debug build Dogfood", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/scripts/build.js", + "stopOnEntry": false, + "args": [ + "webpack", + "--", + "--production", + "--dogfood" + ], + "cwd": "${workspaceRoot}/apps/fabric-website", + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy", + "--debug" + ], + "env": { + "NODE_ENV": "development" + } + }, { "name": "Run ssr tests", "type": "node", @@ -62,6 +104,27 @@ "NODE_ENV": "development" }, "sourceMaps": false + }, + { + "name": "Debug add new component", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/scripts/create-component.js", + "cwd": "${workspaceRoot}", + "stopOnEntry": false, + "args": [ + "--name", + "TestComponentName" + ], + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy", + "--debug" + ], + "env": { + "NODE_ENV": "development" + }, + "sourceMaps": true } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8807589f04b73..43eceaa00ef3a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,17 +12,19 @@ "files.exclude": { "**/.git": true, "**/.DS_Store": true, - "**/bower_components": true, "**/coverage": true, "**/*.scss.ts": true }, "files.watcherExclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/node_modules/**": true, - "**/tmp/**": true, - "**/bower_components/**": true, - "**/dist/**": true + "**/.git": true, + "**/node_modules": true, + "**/lib": true, + "**/lib-amd": true, + "/**lib-es2015": true, + "**/temp": true, + "**/dist": true, + "**/*.scss.ts": true, + "**/coverage": true }, // Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the file.exclude setting. "search.exclude": { @@ -30,11 +32,11 @@ "**/node_modules": true, "**/lib": true, "**/lib-amd": true, + "**/lib-es2015": true, "**/dist": true, "**/*.scss.ts": true }, // Controls after how many characters the editor will wrap to the next line. Setting this to 0 turns on viewport width wrapping - "editor.wordWrap": "wordWrapColumn", "editor.wordWrapColumn": 140, "tslint.enable": true, "tslint.rulesDirectory": "./common/temp/node_modules/tslint-microsoft-contrib", diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000000000..836b9124852e7 --- /dev/null +++ b/FAQ.md @@ -0,0 +1,147 @@ +# [Office UI Fabric React FAQ](http://dev.office.com/fabric) + +## *Q. What is Office UI Fabric React?* + +Fabric React is a responsive, mobile-first, open-source collection of robust components designed to make it quick and simple for you to create web experiences using the `Office Design Language`. + +## *Q. Who uses Office UI Fabric React?* + +React components from Office UI Fabric React are used by many teams accross O365 and Microsoft for building their experiences. Some examples are SharePoint, OneDrive, Outlook, VisualStudio team services, ... + +These components are also used by third party developers building extensiblity components using the SharePoint Framework. + +## *Q. How do I get started with Office UI Fabric React?* + +Start with our [README](./README.md) document. + +To create your first app using Office UI Fabric React read the [Sample App](./ghdocs/OnBoarding/SampleApp.md) document. + +## *Q. Where is the official website located?* + +https://developer.microsoft.com/fabric + +http://dev.office.com/fabric + +## *Q. I am seeing a bug. Where can I open an issue?* + +Please open all issues at our [GitHub issues](https://github.com/OfficeDev/office-ui-fabric-react/issues) location. + +Things to remember while opening an issue + +* Please fill out as many details as you can. +* We **highly encourage** you to submit PRs for issues. + + + +``` + ---------------------------------------------------------------------------------------------- + + ### Bug Report + + - __Package version(s)__: (fill this out) + - __Browser and OS versions__: (fill this out if relevant) + + #### Priorities and help requested (not applicable if asking question): + + Are you willing to submit a PR to fix? (Yes, No) + + Requested priority: (Blocking, High, Normal, Low) + + Products/sites affected: (if applicable) + + #### Describe the issue: + + + + #### Actual behavior: + + + + #### Expected behavior: + + + + ### If applicable, please provide a codepen repro: + + + + ---------------------------------------------------------------------------------------------- +``` + + +## *Q. Can I contribute to Office UI Fabric React?* + +Office UI Fabric React is an open-source distributed project. Lots of developers from inside and outside Microsoft contribute to this project. We highly encourage contributions. There is a core team that works hard to stay on top of the issues and pull requests. + +## *Q. Why should I contribute?* + +Office UI Fabric React is an open-source distributed project. If you are building a new app inside O365 or Microsoft, this project will potentially save you lots of time, resources and headaches. We encourage all developers who use Fabric React to return a small amount to the community. If you notice bugs, we encourage you to not only open an issue on it but also help fix it. If you have a component that you believe others should use, feel motivated and encouraged to contribute that component back to the community. Sharing is caring. Many developers contribute outside their primary job responsibilities. Additionally, there is plenty to learn. We use a lot of cutting edge best practices used in the industry. Learning those can help you in your career. + +## *Q. How do I communicate with a Fabric React core team member?* + +We have a very active community both outside and inside Microsoft. Please use the Microsoft [Teams channel](https://teams.microsoft.com/l/channel/19%3a73a5dbc26c9a4d8d91264611995bbdbb%40thread.skype/Fabric%2520Design?groupId=ffe264f2-14d0-48b5-9384-64f808b81294&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47) for communication from within Microsoft. And a [GitHub issue](https://github.com/OfficeDev/office-ui-fabric-react/issues) from outside Microsoft. We triage these issues at least once a week. + +## *Q. How do I contribute to Office UI Fabric React?* + +Start by reading our [Contributing](./ghdocs/Contributing/Contributing.md) document. Please point out any missing or incorrect details. + +## *Q. Can I become a part of the Fabric core team?* + +Yes, you totally can. You will need to help out with reviewing pull requests and triaging and fixing issues. For now, only Microsoft employees can be a part of the core team. We are looking into changing that policy to allow non-Microsoft folks to be a part of the core team. + +## *Q. My pull request has been hanging for a long time. What do I do?* + +We are very proactive and work hard to keep the outstanding pull request count low. But if your pull request is non-trivial and stuck for a long time, please feel free to tag the pull request that it has been hanging for long and you need help. + +## *Q. Where do I read about specific best practices?* + +Please refer to the following documents. + +[**Contributing fixes and new components**](./ghdocs/Contributing/Contributing.md) + +[**Accessibility**](./ghdocs/BestPractices/Accessibility.md) + +[**Component Design**](./ghdocs/BestPractices/ComponentDesign.md) + +[**Styling**](./ghdocs/BestPractices/Styling.md) + +[**Theming**](./ghdocs/BestPractices/Theming.md) + +[**Testing**](./ghdocs/BestPractices/Testing.md) + +[**Advanced**](./ghdocs/BestPractices/Advanced.md) + +[**Browse Support**](./ghdocs/Testing/BrowserSupport.md) + +## *Q. When and how does the issue Triage work?* + +The Fabric React core team works hard to stay on top of the open issues. We triage issues at least once a week. Due to an increased volume in the number of issues, we have been triaging more often. Once the issue count is under control, we may go back to the once a week rythm. + +### Following issues will qualify as high priority + +We try to fix high priority bugs ASAP. + +* Is this issue blocking the consumer? +* Is this a regression? If yes, how and when did it get in?* Is this a very serious bug? + +Other bugs will qualify as Normal or lower priority and will get fixed as a part of the normal release cadence. + +From time to time we do plan to close issues that are very old and have no activity. + +## *Q. Why do I get the `stale[bot]` messages? Why is my issue marked as stale?* + +We have recently configured the [GitHub stale BOT](https://github.com/probot/stale) as a scaling mechanism for us because there have been many issues that simply don't repro anymore or have been fixed without the triaging group seeing them/making the connection between fix->issue. The bot encourages issue openers to follow-up if it's still an active issue, and if it’s not, let’s close them. + +### What issues will be automatically resolved? + +We plan to resolve all issues before `October 1, 2017` automatically. For issues after that date, we are aggressively triaging them and creating a plan to get them fixed ASAP. + +### How does Stale-bot work? + +The bot sniffs out 'stale' issues in the repository based on date and activity. If an issue has not had any activity (comments, labels, title change, assignment, etc.) in certain number of (configurable) days, the Stale-bot will add the label 'no-recent-activity', and comment on the issue that it will be closed in 14-days if no further activity occurs. If no activity happens on this issue in the next two weeks, Stale-bot will automatically close the issue. This is intended to provide a reasonable level of cleanup so that valid issues don't get lost in the ocean of no longer relevant issues. + +### But my issue is relevant, it’s just a long discussion! What can I do? + +Stale-bot is versatile and has exemption labels, projects, and milestones. As of right now any issues marked 'Priority 0', 'Priority 1', 'Needs: discussion', and 'Needs: revisit' will never be marked stale. + +We ask everyone to not abuse these. This cleanup is for better organization of the Fabric React project with the goal to increase visibility and response time on bugs and feature requests and organizing the issues is key to this endeavor. If there is a more semantic label to express, why your issue needs to stick around for multiple months tag the issue as such and we will triage it appropriately. \ No newline at end of file diff --git a/README.md b/README.md index e0fb8e5bcf491..756d6f9893cc3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Fabric React is a responsive, mobile-first collection of robust components desig ### Using Fabric React -[Here is a step by step tutorial](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/README.md) on how to build a simple React app with an Office UI Fabric React component. +[Here is a step by step tutorial](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/OnBoarding/SampleApp.md) on how to build a simple React app with an Office UI Fabric React component. Integrating components into your project depends heavily on your setup. The recommended setup is to use a bundler such as Webpack which can resolve NPM package imports in your code and can bundle the specific things you import. @@ -39,16 +39,19 @@ The library includes commonjs entry points under the lib folder. To use a contro ```js import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import { Button } from 'office-ui-fabric-react/lib/Button'; - -const MyPage = () => (
); - -ReactDOM.render(, document.body.firstChild); +import { PrimaryButton } from 'office-ui-fabric-react/lib/Button'; + +ReactDOM.render( + + I am a button. + , + document.body.firstChild +); ``` ## Browser support -Fabric React supports many commonly used browsers. See the [browser support doc](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/BROWSERSUPPORT.md) for more information. +Fabric React supports many commonly used browsers. See the [browser support doc](./ghdocs/Testing/BrowserSupport.md) for more information. ## Server-side rendering @@ -86,17 +89,51 @@ console.log( Note: we are evaluating a more robust theming and style loading approach, which will allow a much more flexible server rendering approach, so this syntax may be simplified in the future. +### Browserless Testing + +In unit or end-to-end tests that run in an SSR-like (non-browser) environment such as Node, you'll need to disable style loading. + +```typescript +import { initializeIcons } from 'office-ui-fabric-react/lib/Icons'; +initializeIcons('dist/'); + +// Configure load-themed-styles to avoid registering styles. +let themeLoader = require('@microsoft/load-themed-styles'); +themeLoader.configureLoadStyles((styles) => { + // noop +}); + +// Set ssr mode to true, and rtl to false. +let library = require('office-ui-fabric-react/lib/Utilities'); +library.setSSR(true); +library.setRTL(false); + +// Assume a large screen. +let responsiveLib = require('office-ui-fabric-react/lib/utilities/decorators/withResponsiveMode'); +responsiveLib.setResponsiveMode(responsiveLib.ResponsiveMode.large); +``` + +You'll also want to mock out requiring `.scss` files. +In Jest: + +```js + moduleNameMapper: { + // jest-style-mock.js should just contain module.exports = {}; + '\\.(scss)$': path.resolve(__dirname, 'jest-style-mock.js'), + } +``` + ## Advanced usage -For advanced usage including info about module vs. path-based imports, using an AMD bundler like Require, and deployment features, see our [advanced documentation](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/ADVANCED.md). +For advanced usage including info about module vs. path-based imports, using an AMD bundler like Require, and deployment features, see our [advanced documentation](./ghdocs/BestPractices/Advanced.md). -## Contribute to Fabric React +## Contribute to Office UI Fabric React -Please take a look at our [contribution guidelines](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/CONTRIBUTING.md) for more info. +Please take a look at our [contribution guidelines](./ghdocs/Contributing/Contributing.md) for more info. Also read [Contribute Bug fixes](./ghdocs/Contributing/BugFixes.md) and [Contribute New component](./ghdocs/Contributing/NewComponent.md). ## Building the repo -Before you get started, **make sure you have [node.js](https://nodejs.org/) and [git](https://git-scm.com/) installed.** +Before you get started, **make sure you have read the [Git branch setup instrucions](./ghdocs/Contributing/Setup.md)** To view the documentation including examples, contracts, component status, and to add functionality or fix issues locally, you can: @@ -112,7 +149,7 @@ To build individual packages within the `packages/*/` folders, you can use `npm ## Testing -For testing see our [testing documentation](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/ghdocs/TESTING.md). +For testing see our [testing documentation](./ghdocs/BestPractices/Testing.md). ## Advanced building tips @@ -136,7 +173,6 @@ All files on the Office UI Fabric React GitHub repository are subject to the MIT Usage of the fonts and icons referenced in Office UI Fabric is subject to the terms of the [assets license agreement](http://aka.ms/fabric-assets-license). - ## Changelog We use [GitHub Releases](https://github.com/blog/1547-release-your-software) to manage our releases, including the changelog between every release. View a complete list of additions, fixes, and changes on the [releases](https://github.com/OfficeDev/office-ui-fabric-react/releases) page. @@ -144,3 +180,8 @@ We use [GitHub Releases](https://github.com/blog/1547-release-your-software) to - - - This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Issue management and `Stale-bot` + +If you are getting `stale[bot]` messages and/or want to understand how we manage issues, please search for 'issue Triage' and/or 'stale[bot]' in the [FAQ](./FAQ.md). + diff --git a/apps/fabric-website/CHANGELOG.json b/apps/fabric-website/CHANGELOG.json index 2f760ffe7223a..ec6015e7ba8ae 100644 --- a/apps/fabric-website/CHANGELOG.json +++ b/apps/fabric-website/CHANGELOG.json @@ -1,6 +1,714 @@ { "name": "@uifabric/fabric-website", "entries": [ + { + "version": "5.6.0", + "tag": "@uifabric/fabric-website_v5.6.0", + "date": "Thu, 05 Apr 2018 10:15:39 GMT", + "comments": { + "minor": [ + { + "author": "Jordan Janzen ", + "commit": "d81862b0f09f206cfb7e7661c7699ddffe7acccd", + "comment": "Add Office Add-ins Toolkit" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.78.0 <6.0.0` to `>=5.79.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.5.2", + "tag": "@uifabric/fabric-website_v5.5.2", + "date": "Tue, 27 Mar 2018 10:14:02 GMT", + "comments": { + "patch": [ + { + "author": "Kevin Coughlin ", + "commit": "ccf2163bda809f6033fff3892b494c004fe0ff13", + "comment": "Adds missing neutralQuaternary and neutralQuaternaryAlt to document colors page" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.70.0 <6.0.0` to `>=5.71.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.5.1", + "tag": "@uifabric/fabric-website_v5.5.1", + "date": "Wed, 21 Mar 2018 10:18:29 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "5fbbac6c535b5db98eaf8167f4ecd8fe2b882990", + "comment": "Updated OfficeUIFabric Toolkit link to v4.0.0." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.66.0 <6.0.0` to `>=5.67.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.5.0", + "tag": "@uifabric/fabric-website_v5.5.0", + "date": "Mon, 19 Mar 2018 10:27:55 GMT", + "comments": { + "patch": [ + { + "author": "Mark Polak ", + "commit": "882c389076125182e5703ad5eb64ae178546f6c4", + "comment": "Use arrow function properties instead of @autobind" + } + ], + "minor": [ + { + "author": "lynamemi ", + "commit": "e3a40d52e73af6e5a0062452e550f1b066c851c2", + "comment": "ThemePrimary: Updating this color along with an Office branding update." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.64.4 <6.0.0` to `>=5.65.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.4.0", + "tag": "@uifabric/fabric-website_v5.4.0", + "date": "Wed, 14 Mar 2018 10:28:26 GMT", + "comments": { + "minor": [ + { + "author": "lynamemi ", + "commit": "8b1625290f6a775f6c64b30617a2593576aacb34", + "comment": "Theme generator: exposing to the website." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.64.0 <6.0.0` to `>=5.64.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.3.4", + "tag": "@uifabric/fabric-website_v5.3.4", + "date": "Tue, 13 Mar 2018 20:00:06 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "0904a98019ac935ed975f6188624cc68df477a25", + "comment": "Hide left nav on mobile." + } + ] + } + }, + { + "version": "5.3.3", + "tag": "@uifabric/fabric-website_v5.3.3", + "date": "Fri, 09 Mar 2018 11:13:58 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "e67bcbe68c55f057a10c3c51d923554bae81524d", + "comment": "Fixed in page nav so that the left nav links will display properly." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.61.0 <6.0.0` to `>=5.62.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.3.2", + "tag": "@uifabric/fabric-website_v5.3.2", + "date": "Thu, 01 Mar 2018 00:05:10 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "8370f6f5c822189fbd84e13fb285df83b102a308", + "comment": "Improved left nav scroll behavior and added fix to webpack so that we can load component pages from our local machines with the UHF." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.56.0 <6.0.0` to `>=5.56.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.3.1", + "tag": "@uifabric/fabric-website_v5.3.1", + "date": "Fri, 16 Feb 2018 11:23:29 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "97593b0e0ff8c69cafbaefe40a3ba6834572eddf", + "comment": "Left nav: Less jittery and component pages load in full height." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.50.0 <6.0.0` to `>=5.51.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.3.0", + "tag": "@uifabric/fabric-website_v5.3.0", + "date": "Mon, 22 Jan 2018 11:14:27 GMT", + "comments": { + "minor": [ + { + "author": "lynamemi ", + "commit": "a9d0f70495f315998a5dad78699ffd2349436420", + "comment": "Adding left nav scroll functionality, including fixing the left nav with the header. Other layout refactoring to accommodate." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.40.1 <6.0.0` to `>=5.41.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.2.1", + "tag": "@uifabric/fabric-website_v5.2.1", + "date": "Fri, 22 Dec 2017 11:10:56 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "1cbf872fe8f2feac82a8c2566dfd19b20be7d191", + "comment": "Added more descriptive comments to account for the specificity needed to style with the UHF." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.35.0 <6.0.0` to `>=5.35.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.2.0", + "tag": "@uifabric/fabric-website_v5.2.0", + "date": "Sat, 16 Dec 2017 05:07:22 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "e329c53575a45272da4d28dbc725804f7fac4062", + "comment": "GetStarted Page: More specific selectors for button with link to deal with UHF styles." + } + ], + "minor": [ + { + "author": "David Zearing ", + "commit": "08e59c871894c8ff443d48dbe5b0dd3316eb4331", + "comment": "Updated build to newest React version and typings. Updated tests and made various tweaks to the code to remove React warnings and keep Enzyme" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.33.1 <6.0.0` to `>=5.34.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.1.0", + "tag": "@uifabric/fabric-website_v5.1.0", + "date": "Thu, 14 Dec 2017 11:23:17 GMT", + "comments": { + "minor": [ + { + "author": "lynamemi ", + "commit": "6ed5a98773bb43468eb402b074e7a37847d22a0e", + "comment": "GetStarted page: updated to better reflect the current Fabric workflows." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.32.0 <6.0.0` to `>=5.33.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.19", + "tag": "@uifabric/fabric-website_v5.0.19", + "date": "Wed, 06 Dec 2017 11:24:52 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "871a5a441f6c38c7c82abbe8f7b6081ce0c551f7", + "comment": "Updated referenced FabricCore versions." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.29.2 <6.0.0` to `>=5.29.3 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.18", + "tag": "@uifabric/fabric-website_v5.0.18", + "date": "Tue, 05 Dec 2017 02:04:27 GMT", + "comments": { + "patch": [ + { + "author": "Eddie Liu ", + "commit": "1e7bfd33d32ee6f5367a1152377c203e2ab68888", + "comment": "Fix ScrollablePane page title" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.29.1 <6.0.0` to `>=5.29.2 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.17", + "tag": "@uifabric/fabric-website_v5.0.17", + "date": "Mon, 20 Nov 2017 11:12:47 GMT", + "comments": { + "patch": [ + { + "author": "Eddie Liu ", + "commit": "67466325ed0ff6b89f82fa152860f968d8d740a0", + "comment": "Add ActivityItem, Calendar, HoverCard, OverflowSet, ScrollablePane, TeachingBubble to fabric-website" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.23.0 <6.0.0` to `>=5.24.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.16", + "tag": "@uifabric/fabric-website_v5.0.16", + "date": "Fri, 17 Nov 2017 17:36:36 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "ad02795232194a76a6fc1468366d6ff1b030639b", + "comment": "Updated asset license to newest version." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.22.0 <6.0.0` to `>=5.23.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.15", + "tag": "@uifabric/fabric-website_v5.0.15", + "date": "Tue, 31 Oct 2017 10:22:25 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "e637a59d2e79a7d390b03cc574c95a4473ab19d2", + "comment": "Added support to IconGrid for icons wider than the grid." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.16.0 <6.0.0` to `>=5.17.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.14", + "tag": "@uifabric/fabric-website_v5.0.14", + "date": "Fri, 27 Oct 2017 10:25:09 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "64214cc2b97c1ed45968e44e9361ec06fe33af26", + "comment": "Fixed initializeIcons call to pull from cdn instead of dist." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.15.0 <6.0.0` to `>=5.16.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.13", + "tag": "@uifabric/fabric-website_v5.0.13", + "date": "Tue, 24 Oct 2017 10:21:08 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "6431ff07746eee3c7a919fd7b701ba88c55a2928", + "comment": "Removed Header component - it was replaced with UHF" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.12.0 <6.0.0` to `>=5.13.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.12", + "tag": "@uifabric/fabric-website_v5.0.12", + "date": "Wed, 18 Oct 2017 10:21:25 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "5c408b0984d9d83323a2b3b22aa50b3768c2d711", + "comment": "TextField documentation style updates" + }, + { + "author": "lynamemi ", + "commit": "745cec67c600088d6d0423ed4daed8e1c8ed2909", + "comment": "Removed branding guidance pdf, updated fabric asset license pdf, and fixed link colors" + }, + { + "author": "lynamemi ", + "commit": "ffd057952717cffcf356f308699f2ed88139a00b", + "comment": "Fixed in page navigation for Chrome and Firefox." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.9.2 <6.0.0` to `>=5.10.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.11", + "tag": "@uifabric/fabric-website_v5.0.11", + "date": "Mon, 16 Oct 2017 20:00:51 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "bbccb7d7ef5562bc6ed7a7c8c9e68bd7c4786496", + "comment": "Updating to Fabric Core 9.0" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.9.0 <6.0.0` to `>=5.9.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.10", + "tag": "@uifabric/fabric-website_v5.0.10", + "date": "Thu, 12 Oct 2017 10:20:49 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "95f1a37bad9be2a5ab0d56ec6ea5e23dc7192230", + "comment": "Added Implementation Examples section to ComponentPage" + }, + { + "author": "erichdev ", + "commit": "952448bde2b85671c84c1c074a18eedfeb90c615", + "comment": "Add promise polyfill" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.7.0 <6.0.0` to `>=5.8.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.9", + "tag": "@uifabric/fabric-website_v5.0.9", + "date": "Mon, 09 Oct 2017 10:08:09 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "9a399cc9187ec81611acec92655e3393878e28e1", + "comment": "Added/removed Best Practices links for component pages that had/didn't have a Best Practices section." + }, + { + "author": "lynamemi ", + "commit": "de4c2b13ef50e485209deff44890cc23d8a3db86", + "comment": "Updated themeLight color - typo" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.5.0 <6.0.0` to `>=5.5.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.8", + "tag": "@uifabric/fabric-website_v5.0.8", + "date": "Fri, 06 Oct 2017 10:18:41 GMT", + "comments": { + "patch": [ + { + "author": "Jon Schectman ", + "commit": "8e1dcc66cda8334653a8b5ccbde02bf6275e0b23", + "comment": "TSConfig: update to use preserveConstEnums so that certain builds s ystems don't break when importing const enums" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/icons\" from `>=5.1.0 <6.0.0` to `>=5.1.1 <6.0.0`" + }, + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.3.0 <6.0.0` to `>=5.5.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.7", + "tag": "@uifabric/fabric-website_v5.0.7", + "date": "Wed, 04 Oct 2017 22:40:22 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "ca3473a1d65c8124901173ee0aeb7c7af5b220ef", + "comment": "Updated ResourcePage text and made padding more rtl friendly." + }, + { + "author": "lynamemi ", + "commit": "f9ff40b02ab05a1a3542b90a9f4e2fe51a6d42ed", + "comment": "Added section in Get Started page to document how to use icons in components." + }, + { + "author": "lynamemi ", + "commit": "289ee6ee52372491ac35cebb577554be9ac39c9a", + "comment": "Added Icon component to website" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.3.0 <6.0.0` to `>=6.0.0 <7.0.0`" + } + ] + } + }, + { + "version": "5.0.6", + "tag": "@uifabric/fabric-website_v5.0.6", + "date": "Fri, 29 Sep 2017 10:20:24 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "47af278daa76bc638871139ce6b0294edb8c9edb", + "comment": "Added initializeIcons() call to make all icons in examples on the website available." + }, + { + "author": "lynamemi ", + "commit": "af886149a115cc6ac2dc697caa3b2f535c8d6147", + "comment": "Added SharePoint Toolkit link and text to ResourcesPage." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.1.0 <6.0.0` to `>=5.2.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.5", + "tag": "@uifabric/fabric-website_v5.0.5", + "date": "Thu, 28 Sep 2017 10:19:12 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "edc17d6c0d626a21fb995e6cd15db97405449863", + "comment": "Updated links in the SharePoint section of the ResourcesPage." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.0.1 <6.0.0` to `>=5.1.0 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.4", + "tag": "@uifabric/fabric-website_v5.0.4", + "date": "Wed, 27 Sep 2017 00:20:58 GMT", + "comments": { + "patch": [ + { + "author": "David Zearing ", + "commit": "8a8c240b39c3ba12effab2c6c8e7021c3bc9cea9", + "comment": "Updated for Fabric 5.0." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/icons\" from `>=5.0.0 <6.0.0` to `>=5.0.1 <6.0.0`" + }, + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=5.0.0 <6.0.0` to `>=5.0.1 <6.0.0`" + } + ] + } + }, + { + "version": "5.0.3", + "tag": "@uifabric/fabric-website_v5.0.3", + "date": "Fri, 22 Sep 2017 19:08:51 GMT", + "comments": { + "patch": [ + { + "author": "lynamemi ", + "commit": "6812dbed7f05c698eb687bf7cf3d3481b4fe642b", + "comment": "Reinforced header tag styles across website pages to manage UHF counter-styles." + }, + { + "author": "lynamemi ", + "commit": "8f3882c08165627ec4b0ddea1116ab00fd2e1f2f", + "comment": "Visual bug fixes." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=4.49.1 <5.0.0` to `>=4.50.0 <5.0.0`" + } + ] + } + }, + { + "version": "5.0.2", + "tag": "@uifabric/fabric-website_v5.0.2", + "date": "Thu, 21 Sep 2017 06:23:58 GMT", + "comments": { + "patch": [ + { + "author": "John Miller ", + "commit": "40e1ef1d6ac5ee498888e7200fd15af754d7b665", + "comment": "Brand icons page clean up." + }, + { + "author": "lynamemi ", + "commit": "4482809c3554c0147d37cffe8e4fa1e696be0f23", + "comment": "Updated reference to Fabric Core to the newly released 7.3.0 version." + }, + { + "author": "John Miller ", + "commit": "40e1ef1d6ac5ee498888e7200fd15af754d7b665", + "comment": "Added a test case for dogfood check" + }, + { + "author": "John Miller ", + "commit": "40e1ef1d6ac5ee498888e7200fd15af754d7b665", + "comment": "Initial loading spinner gif changed to mimic our spinner component." + }, + { + "author": "John Miller ", + "commit": "40e1ef1d6ac5ee498888e7200fd15af754d7b665", + "comment": "Switched some font colors on theme and neutral color swatches from white to black to achieve minimum contrast requirement of 4.5:1 for accessibility." + }, + { + "author": "lynamemi ", + "commit": "726494444365d178707d5605e9f6b63e099a0ff2", + "comment": "Removed trello reference from the Get Stated page." + }, + { + "author": "lynamemi ", + "commit": "98ac26378c4aa6493d419a720cc759590f5ea37d", + "comment": "Styling to fix UHF header overriding our styles." + }, + { + "author": "John Miller ", + "commit": "40e1ef1d6ac5ee498888e7200fd15af754d7b665", + "comment": "Changed where Fabric Core and Fabric React versions were drawing from so that they would appear as a number instead of a range." + }, + { + "author": "lynamemi ", + "commit": "df65d1d5a44b0058256079c99cb7783233cdfedc", + "comment": "Visual bug fixes to accommodate UHF" + }, + { + "author": "lynamemi ", + "commit": "faef37358c373a6848b8eab6ef4e3df05b5e9697", + "comment": "Added section in ResourcePage for XD Toolkits and other assets, includes references on other pages, too." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=4.49.0 <5.0.0` to `>=4.49.1 <5.0.0`" + } + ] + } + }, + { + "version": "5.0.1", + "tag": "@uifabric/fabric-website_v5.0.1", + "date": "Wed, 20 Sep 2017 10:19:01 GMT", + "comments": { + "patch": [ + { + "author": "Kris Brown ", + "commit": "7fadf0b0aa27ce0a245280e7867881cef1add967", + "comment": "Changing high-contrast colors to system colors" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=4.48.1 <5.0.0` to `>=4.49.0 <5.0.0`" + } + ] + } + }, { "version": "5.0.0", "tag": "@uifabric/fabric-website_v5.0.0", diff --git a/apps/fabric-website/CHANGELOG.md b/apps/fabric-website/CHANGELOG.md index 171fa99daed6f..d9d87e339be9d 100644 --- a/apps/fabric-website/CHANGELOG.md +++ b/apps/fabric-website/CHANGELOG.md @@ -1,6 +1,255 @@ # Change Log - @uifabric/fabric-website -This log was last generated on Tue, 19 Sep 2017 10:08:55 GMT and should not be manually modified. +This log was last generated on Thu, 05 Apr 2018 10:15:39 GMT and should not be manually modified. + +## 5.6.0 +Thu, 05 Apr 2018 10:15:39 GMT + +### Minor changes + +- Add Office Add-ins Toolkit + +## 5.5.2 +Tue, 27 Mar 2018 10:14:02 GMT + +### Patches + +- Adds missing neutralQuaternary and neutralQuaternaryAlt to document colors page + +## 5.5.1 +Wed, 21 Mar 2018 10:18:29 GMT + +### Patches + +- Updated OfficeUIFabric Toolkit link to v4.0.0. + +## 5.5.0 +Mon, 19 Mar 2018 10:27:55 GMT + +### Minor changes + +- ThemePrimary: Updating this color along with an Office branding update. + +### Patches + +- Use arrow function properties instead of @autobind + +## 5.4.0 +Wed, 14 Mar 2018 10:28:26 GMT + +### Minor changes + +- Theme generator: exposing to the website. + +## 5.3.4 +Tue, 13 Mar 2018 20:00:06 GMT + +### Patches + +- Hide left nav on mobile. + +## 5.3.3 +Fri, 09 Mar 2018 11:13:58 GMT + +### Patches + +- Fixed in page nav so that the left nav links will display properly. + +## 5.3.2 +Thu, 01 Mar 2018 00:05:10 GMT + +### Patches + +- Improved left nav scroll behavior and added fix to webpack so that we can load component pages from our local machines with the UHF. + +## 5.3.1 +Fri, 16 Feb 2018 11:23:29 GMT + +### Patches + +- Left nav: Less jittery and component pages load in full height. + +## 5.3.0 +Mon, 22 Jan 2018 11:14:27 GMT + +### Minor changes + +- Adding left nav scroll functionality, including fixing the left nav with the header. Other layout refactoring to accommodate. + +## 5.2.1 +Fri, 22 Dec 2017 11:10:56 GMT + +### Patches + +- Added more descriptive comments to account for the specificity needed to style with the UHF. + +## 5.2.0 +Sat, 16 Dec 2017 05:07:22 GMT + +### Minor changes + +- Updated build to newest React version and typings. Updated tests and made various tweaks to the code to remove React warnings and keep Enzyme + +### Patches + +- GetStarted Page: More specific selectors for button with link to deal with UHF styles. + +## 5.1.0 +Thu, 14 Dec 2017 11:23:17 GMT + +### Minor changes + +- GetStarted page: updated to better reflect the current Fabric workflows. + +## 5.0.19 +Wed, 06 Dec 2017 11:24:52 GMT + +### Patches + +- Updated referenced FabricCore versions. + +## 5.0.18 +Tue, 05 Dec 2017 02:04:27 GMT + +### Patches + +- Fix ScrollablePane page title + +## 5.0.17 +Mon, 20 Nov 2017 11:12:47 GMT + +### Patches + +- Add ActivityItem, Calendar, HoverCard, OverflowSet, ScrollablePane, TeachingBubble to fabric-website + +## 5.0.16 +Fri, 17 Nov 2017 17:36:36 GMT + +### Patches + +- Updated asset license to newest version. + +## 5.0.15 +Tue, 31 Oct 2017 10:22:25 GMT + +### Patches + +- Added support to IconGrid for icons wider than the grid. + +## 5.0.14 +Fri, 27 Oct 2017 10:25:09 GMT + +### Patches + +- Fixed initializeIcons call to pull from cdn instead of dist. + +## 5.0.13 +Tue, 24 Oct 2017 10:21:08 GMT + +### Patches + +- Removed Header component - it was replaced with UHF + +## 5.0.12 +Wed, 18 Oct 2017 10:21:25 GMT + +### Patches + +- TextField documentation style updates +- Removed branding guidance pdf, updated fabric asset license pdf, and fixed link colors +- Fixed in page navigation for Chrome and Firefox. + +## 5.0.11 +Mon, 16 Oct 2017 20:00:51 GMT + +### Patches + +- Updating to Fabric Core 9.0 + +## 5.0.10 +Thu, 12 Oct 2017 10:20:49 GMT + +### Patches + +- Added Implementation Examples section to ComponentPage +- Add promise polyfill + +## 5.0.9 +Mon, 09 Oct 2017 10:08:09 GMT + +### Patches + +- Added/removed Best Practices links for component pages that had/didn't have a Best Practices section. +- Updated themeLight color - typo + +## 5.0.8 +Fri, 06 Oct 2017 10:18:41 GMT + +### Patches + +- TSConfig: update to use preserveConstEnums so that certain builds s ystems don't break when importing const enums + +## 5.0.7 +Wed, 04 Oct 2017 22:40:22 GMT + +### Patches + +- Updated ResourcePage text and made padding more rtl friendly. +- Added section in Get Started page to document how to use icons in components. +- Added Icon component to website + +## 5.0.6 +Fri, 29 Sep 2017 10:20:24 GMT + +### Patches + +- Added initializeIcons() call to make all icons in examples on the website available. +- Added SharePoint Toolkit link and text to ResourcesPage. + +## 5.0.5 +Thu, 28 Sep 2017 10:19:12 GMT + +### Patches + +- Updated links in the SharePoint section of the ResourcesPage. + +## 5.0.4 +Wed, 27 Sep 2017 00:20:58 GMT + +### Patches + +- Updated for Fabric 5.0. + +## 5.0.3 +Fri, 22 Sep 2017 19:08:51 GMT + +### Patches + +- Reinforced header tag styles across website pages to manage UHF counter-styles. +- Visual bug fixes. + +## 5.0.2 +Thu, 21 Sep 2017 06:23:58 GMT + +### Patches + +- Brand icons page clean up. +- Updated reference to Fabric Core to the newly released 7.3.0 version. +- Added a test case for dogfood check +- Initial loading spinner gif changed to mimic our spinner component. +- Switched some font colors on theme and neutral color swatches from white to black to achieve minimum contrast requirement of 4.5:1 for accessibility. +- Removed trello reference from the Get Stated page. +- Styling to fix UHF header overriding our styles. +- Changed where Fabric Core and Fabric React versions were drawing from so that they would appear as a number instead of a range. +- Visual bug fixes to accommodate UHF +- Added section in ResourcePage for XD Toolkits and other assets, includes references on other pages, too. + +## 5.0.1 +Wed, 20 Sep 2017 10:19:01 GMT + +### Patches + +- Changing high-contrast colors to system colors ## 5.0.0 Tue, 19 Sep 2017 10:08:55 GMT @@ -101,7 +350,7 @@ Tue, 27 Jun 2017 01:26:31 GMT ## 4.5.39 Wed, 21 Jun 2017 00:45:41 GMT -*Changes not tracked* +*Version update only* ## 4.5.38 Wed, 14 Jun 2017 06:02:15 GMT @@ -127,62 +376,62 @@ Mon, 12 Jun 2017 01:47:18 GMT ## 4.5.35 Thu, 08 Jun 2017 00:18:05 GMT -*Changes not tracked* +*Version update only* ## 4.5.34 Tue, 06 Jun 2017 07:41:47 GMT -*Changes not tracked* +*Version update only* ## 4.5.33 Tue, 06 Jun 2017 06:06:46 GMT -*Changes not tracked* +*Version update only* ## 4.5.32 Tue, 06 Jun 2017 00:50:06 GMT -*Changes not tracked* +*Version update only* ## 4.5.31 Fri, 02 Jun 2017 01:19:36 GMT -*Changes not tracked* +*Version update only* ## 4.5.30 Thu, 01 Jun 2017 16:34:03 GMT -*Changes not tracked* +*Version update only* ## 4.5.29 Wed, 31 May 2017 01:58:23 GMT -*Changes not tracked* +*Version update only* ## 4.5.28 Tue, 30 May 2017 20:23:45 GMT -*Changes not tracked* +*Version update only* ## 4.5.27 Tue, 30 May 2017 03:27:20 GMT -*Changes not tracked* +*Version update only* ## 4.5.26 Fri, 26 May 2017 10:21:03 GMT -*Changes not tracked* +*Version update only* ## 4.5.25 Tue, 23 May 2017 10:16:04 GMT -*Changes not tracked* +*Version update only* ## 4.5.24 Thu, 18 May 2017 10:09:58 GMT -*Changes not tracked* +*Version update only* ## 4.5.23 Tue, 16 May 2017 21:47:38 GMT diff --git a/apps/fabric-website/README.md b/apps/fabric-website/README.md index fec997e67b9d3..07dc1eb7fadc0 100644 --- a/apps/fabric-website/README.md +++ b/apps/fabric-website/README.md @@ -19,7 +19,7 @@ Before you get started, make sure you have [node.js](https://nodejs.org/), [gulp All files on the Office UI Fabric React GitHub repository are subject to the MIT license. Please read the License file at the root of the project. -Usage of the fonts referenced in Office UI Fabric files is subject to the [license](https://spoprod-a.akamaihd.net/files/fabric/assets/license.txt). +Usage of the fonts referenced in Office UI Fabric files is subject to the [license](https://spoprod-a.akamaihd.net/files/fabric/assets/microsoft_fabric_assets_license_agreement_10262017.pdf). - - - diff --git a/apps/fabric-website/gulpfile.js b/apps/fabric-website/gulpfile.js deleted file mode 100644 index f192c8e1a73eb..0000000000000 --- a/apps/fabric-website/gulpfile.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -let build = require('@microsoft/web-library-build'); -let gulp = require('gulp'); -let buildConfig = build.getConfig(); -let distFolder = buildConfig.distFolder; -let path = require('path'); -let packageFolder = buildConfig.packageFolder || ''; -let isProduction = process.argv.indexOf('--production') >= 0; -let isNuke = process.argv.indexOf('nuke') >= 0; - -// Use css modules and use export = -build.sass.setConfig({ - useCSSModules: true, - moduleExportName: '' -}); - -// Configure custom lint overrides. -let rules = Object.assign( - {}, - require('./node_modules/@microsoft/gulp-core-build-typescript/lib/defaultTslint.json').rules, - require('./node_modules/office-ui-fabric-react-tslint/tslint.json').rules, - require('./tslint.json').rules -); - -// Configure TypeScript. -build.TypeScriptConfiguration.setTypescriptCompiler(require('typescript')); -// Use css modules. -build.sass.setConfig({ - useCSSModules: true, - moduleExportName: '' -}); - -// Use Karma Tests - Disable during develoment if prefered -build.karma.isEnabled = () => false; - -// Disable unnecessary subtasks. -build.preCopy.isEnabled = () => false; - -// Disable tslint -build.tslint.isEnabled = () => false; - -// Only run bundling in production builds; this speeds up normal ci builds. -build.webpack.isEnabled = () => isProduction; - -// Copy fabric-core to dist to be published with fabric-react. -build.postCopy.setConfig({ - shouldFlatten: false, - copyTo: { - [path.join(distFolder, 'sass')]: [ - 'node_modules/office-ui-fabric-core/dist/sass/**/*.*' - ], - [path.join(distFolder, 'css')]: [ - 'node_modules/office-ui-fabric-core/dist/css/**/*.*' - ] - } -}); - -// Produce AMD bits in lib-amd on production builds. -if (isProduction || isNuke) { - build.setConfig({ - libAMDFolder: path.join(packageFolder, 'lib-amd') - }); -} - -// Short aliases for subtasks. -build.task('webpack', build.webpack); -build.task('tslint', build.tslint); -build.task('ts', build.typescript); -build.task('sass', build.sass); - -// initialize tasks. -build.initialize(gulp); \ No newline at end of file diff --git a/apps/fabric-website/homepage.htm b/apps/fabric-website/homepage.htm index 11a61b2de1d47..1699835101d08 100644 --- a/apps/fabric-website/homepage.htm +++ b/apps/fabric-website/homepage.htm @@ -8,14 +8,16 @@ .loading { align-items: center; background-color: #212121; + border-top: 50px solid #000; display: flex; height: 100vh; justify-content: center; } +
- Loading
@@ -23,30 +25,37 @@ \ No newline at end of file diff --git a/apps/fabric-website/index.html b/apps/fabric-website/index.html index e4300b4a62ebb..4a0ec3a93ccfa 100644 --- a/apps/fabric-website/index.html +++ b/apps/fabric-website/index.html @@ -29,7 +29,7 @@
- Loading
@@ -45,63 +45,13 @@ } var scripts = [ - '//cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js', - '//cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js', + '//cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.production.min.js', + '//cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.production.min.js', '/fabric-sitev5.js' ]; loadScript(scripts); - - - - - - \ No newline at end of file diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index 57dd3d18a72c7..9cf173dfe5965 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/fabric-website", - "version": "5.0.0", + "version": "5.6.0", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -12,39 +12,34 @@ "build": "node ../../scripts/build.js", "clean": "node ../../scripts/clean.js", "start": "node ../../scripts/start.js", - "production": "node --max_old_space_size=8192 ../../scripts/build.js --production" + "production": "node --max_old_space_size=8192 ../../scripts/build.js --production", + "dogfood": "node --max_old_space_size=8192 ../../scripts/build.js --dogfood", + "startuhf": "node ../../scripts/start.js --webpackConfig webpack.uhf.serve.config.js" }, "license": "MIT", "devDependencies": { - "@types/chai": "3.4.35", - "@types/enzyme": "2.8.0", - "@types/es6-promise": "^0.0.32", - "@types/mocha": "2.2.39", + "@types/es6-promise": "0.0.32", "@types/node": "8.0.26", - "@types/prop-types": "15.5.1", + "@types/prop-types": "15.5.2", "@types/resemblejs": "~1.3.28", - "@types/sinon": "2.2.2", - "@types/react": "15.0.38", - "@types/react-addons-test-utils": "0.14.19", - "@types/react-dom": "15.5.1", + "@types/react": "16.0.25", + "@types/react-dom": "16.0.3", "@types/webpack-env": "1.13.0", - "enzyme": "^2.7.0", "es6-promise": "^4.1.0", "es6-weak-map": "^2.0.2", - "highlight.js": "^9.6.0", - "office-ui-fabric-core": ">=7.1.2 <8.0.0", - "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", - "react": "^15.4.2", - "react-addons-test-utils": "^15.4.2", - "react-dom": "^15.4.2", - "react-highlight": "0.9.0" + "highlight.js": "^9.12.0", + "office-ui-fabric-core": ">=9.0.0 <10.0.0", + "office-ui-fabric-react-tslint": ">=5.0.0 <6.0.0", + "react": "^16.2.0", + "react-dom": "^16.2.0", + "react-highlight": "^0.10.0", + "write-file-webpack-plugin": "^4.1.0" }, "dependencies": { - "@microsoft/load-themed-styles": "^1.7.2", - "@uifabric/example-app-base": ">=4.2.7 <5.0.0", + "@microsoft/load-themed-styles": "^1.7.13", "color-functions": "1.1.0", - "json-loader": "^0.5.4", - "office-ui-fabric-react": ">=4.48.1 <5.0.0", + "json-loader": "^0.5.7", + "office-ui-fabric-react": ">=5.81.1 <6.0.0", "tslib": "^1.7.1" } } \ No newline at end of file diff --git a/apps/fabric-website/src/components/App/App.scss b/apps/fabric-website/src/components/App/App.scss index b9981ffb9b061..247d3048affa8 100644 --- a/apps/fabric-website/src/components/App/App.scss +++ b/apps/fabric-website/src/components/App/App.scss @@ -2,43 +2,32 @@ @import '../../styles/mixins'; :global { - .App { - background-color: $ms-color-neutralDark; - justify-content: center; - padding-left: 5%; // % matches UHF breakpoint sizes - padding-right: 5%; // % matches UHF breakpoint sizes - } - // Element that wraps everything except for the header .App-wrapper { - display: flex; - flex-direction: column; margin: 0 auto; max-width: $App-maximumWidth; - padding-top: $Header-height; // Keep content from being covered by the header + position: relative; } // Nav is hidden off screen by default .App-nav { -webkit-overflow-scrolling: touch; // Improves scrolling performance - bottom: 0; - @include ms-left(-$Nav-width); overflow-y: auto; - position: fixed; - top: $Header-height; - transition: $ms-animation-duration-2 $ms-animation-ease-1; - @include ms-transition-property(left); + max-height: 100vh; + height: 100vh; // fallback height if not set in JS style attribute width: $Nav-width; + @include ms-float(left); + z-index: 999; // This z-index needs to be high to prevent jittery scrolling in Edge. } .App-content { @include contentPadding(); background-color: $ms-color-neutralLighter; - flex-grow: 1; left: 0; overflow: hidden; position: relative; transition: all $ms-animation-duration-2 $ms-animation-ease-1; + min-height: calc(100vh - #{$Header-height-full-uhf}); @include high-contrast { border-right: 1px solid WindowText; @@ -47,71 +36,43 @@ } } - // When the nav is open (smaller screens only) push the content over and prevent app from scrolling - @media screen and (max-width: $uhf-screen-min-mobile) { - .App { - padding: 0; - } - - .App.is-navOpen { - bottom: 0; - left: 0; - overflow: hidden; - position: fixed; - right: 0; - top: 0; - - .App-nav { - @include ms-left(0); - } - - .App-content { - @include ms-left($Nav-width); - opacity: 0.5; // Dim the content - } - } - } - // Show the nav at all times, to the left of the content @media screen and (min-width: $uhf-screen-min-mobile) { - .App-wrapper { - flex-direction: row; + .App { + background-color: $ms-color-neutralDark; + justify-content: center; + @include ms-padding-right($App-padding-right-lg); + @include ms-padding-left($App-padding-left-lg); } .App-nav { - @include ms-left(auto); - top: auto; // Mobile nav bar is no longer there - position: relative; - overflow-y: visible + top: 0; + bottom: 0; + overflow-y: auto; + overflow-x: hidden; } .App-content { - margin-top: 0; - flex-grow: unset; + max-width: calc(100% - #{$Nav-width}); // IE needs max-width, it was ignoring width width: calc(100% - #{$Nav-width}); - } - - // Reset values for the nav and content if opened on larger screens - .App.is-navOpen { - .App-nav { - @include ms-left(auto); - } - - .App-content { - @include ms-left(auto); - } + @include ms-left($Nav-width); } } @media only screen and (max-width: $uhf-screen-max-lg) and (min-width: $uhf-screen-min-mobile) { .App { - @include ms-padding-right(24px); - @include ms-padding-left(6px); + @include ms-padding-right($App-padding-right-sm); + @include ms-padding-left($App-padding-left-sm); } .App-nav { @include ms-margin-left(18px); } + + .App-content { + width: calc(100% - #{$Nav-width}); + @include ms-left($Nav-width + 18px); + } } } diff --git a/apps/fabric-website/src/components/App/App.tsx b/apps/fabric-website/src/components/App/App.tsx index 3ac9e058f9880..38b5c98c5e03a 100644 --- a/apps/fabric-website/src/components/App/App.tsx +++ b/apps/fabric-website/src/components/App/App.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import './App.scss'; import { AppState } from './AppState'; -import { css } from 'office-ui-fabric-react/lib/Utilities'; +import AttachedScrollUtility from '../../utilities/AttachedScrollUtility'; import { Fabric } from 'office-ui-fabric-react/lib/Fabric'; import { Nav } from '../Nav/Nav'; @@ -9,44 +9,64 @@ export interface IAppProps extends React.Props { } export interface IAppState { - isNavOpen: boolean; + isAttached: boolean; + navHeight: number; } export class App extends React.Component { + private _attachedScrollThreshold: number; + private _appContent: HTMLDivElement; + private _appContentRect: ClientRect; + constructor(props: IAppProps) { super(props); this.state = { - isNavOpen: false + isAttached: false }; } - public render() { - let { isNavOpen } = this.state; + public componentDidMount() { + window.addEventListener('scroll', this._handleNavPositioning); + window.addEventListener('resize', this._handleNavPositioning); - let toggleIcon; - if (isNavOpen) { - toggleIcon = ; - } else { - toggleIcon = ; - } + this._attachedScrollThreshold = AttachedScrollUtility.calculateAttachedScrollThreshold(); + this._handleNavPositioning(); + } + + public componentWillUnmount() { + window.removeEventListener('scroll', this._handleNavPositioning); + window.removeEventListener('resize', this._handleNavPositioning); + } + + public render() { + let { navHeight } = this.state; + let navPosition: 'fixed' | 'absolute' = this.state.isAttached ? 'fixed' : 'absolute'; + let navStyle = { + height: navHeight, + position: navPosition + }; return (
-
+
-
+
this._appContent = el } + data-app-content-div='true' + > { this.props.children }
@@ -54,9 +74,40 @@ export class App extends React.Component { ); } - private _onNavItemClicked(ev: MouseEvent) { + private _handleNavPositioning = () => { + let { isAttached, navHeight } = this.state; + this._appContentRect = this._appContent && this._appContent.getBoundingClientRect(); + const viewPortHeight = window.innerHeight; + isAttached = AttachedScrollUtility.shouldComponentAttach(isAttached, this._attachedScrollThreshold); + navHeight = this._calculateNavHeight(viewPortHeight, this._appContentRect, navHeight); this.setState({ - isNavOpen: false + isAttached: isAttached, + navHeight: navHeight }); } + + private _calculateNavHeight(viewPortHeight: number, appContentRect: ClientRect, height: number): number { + if (!appContentRect) { + return height; + } + if (appContentRect.top >= 0) { + // This case accounts for space taken up by the UHF header in the viewport. + height = viewPortHeight - appContentRect.top; + if (appContentRect.height < appContentRect.bottom && viewPortHeight > appContentRect.bottom) { + // This case might only exist in the UHF testing environment, when content isn't rendering properly and its height is weird. + height = appContentRect.height; + } + } else if (viewPortHeight < appContentRect.bottom && appContentRect.top < 0) { + // For pages with content that's longer than the viewport, the viewport is the height. + // Takes effect when you scroll past the header. + height = viewPortHeight; + } else if (appContentRect.bottom < 0) { + // In smaller screens when you scroll till the footer takes the whole page, collapse the nav. + height = 0; + } else { + // Once the footer is in view, match nav bottom to content bottom. + height = appContentRect.bottom; + } + return height; + } } \ No newline at end of file diff --git a/apps/fabric-website/src/components/App/AppState.tsx b/apps/fabric-website/src/components/App/AppState.tsx index 547f3ea1dfb24..e27d0c9e6c9bc 100644 --- a/apps/fabric-website/src/components/App/AppState.tsx +++ b/apps/fabric-website/src/components/App/AppState.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; // Props -import { INavPage } from '../Nav/Nav.Props'; +import { INavPage } from '../Nav/Nav.types'; import { ComponentPage } from '../ComponentPage/ComponentPage'; import { PageHeader } from '../PageHeader/PageHeader'; @@ -10,11 +10,22 @@ export interface IAppState { pages: INavPage[]; } +// Giving the loading component a height so that the left nav loads in full screen and there is less flashing as the component page loads. +const loadingPageHeight: string = 'calc(100vh - 100px)'; const LoadingComponent = (props: any): JSX.Element => { return ( - - - +
+ + + +
+ ); +}; +const StylesLoadingComponent = (props: any): JSX.Element => { + return ( +
+ +
); }; @@ -25,70 +36,93 @@ export const AppState: IAppState = { title: 'Fabric', url: '#/', className: 'fabricPage', + isHomePage: true, + isUhfLink: true, component: require('../../pages/HomePage/HomePage').HomePage, - isHomePage: true }, { title: 'Get started', url: '#/get-started', className: 'getStartedPage', + isUhfLink: true, component: require('../../pages/GetStarted/GetStartedPage').GetStartedPage, }, { title: 'Styles', url: '#/styles', className: 'stylesPage', + isUhfLink: true, getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Overviews/StylesPage').StylesPage)), pages: [ { title: 'Animations', url: '#/styles/animations', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/AnimationsPage/AnimationsPage').AnimationsPage)) }, { title: 'Brand icons', url: '#/styles/brand-icons', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/BrandIconsPage/BrandIconsPage').BrandIconsPage)) }, { title: 'Colors', url: '#/styles/colors', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/ColorsPage/ColorsPage').ColorsPage)) }, { title: 'Icons', url: '#/styles/icons', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/IconsPage/IconsPage').IconsPage)) }, { title: 'Layout', url: '#/styles/layout', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/LayoutPage/LayoutPage').LayoutPage)) }, { title: 'Localization', url: '#/styles/localization', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/LocalizationPage/LocalizationPage').LocalizationPage)) }, + { + title: 'Theme generator', + url: '#/styles/themegenerator', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/ThemeGeneratorToolPage/ThemeGeneratorToolPage').ThemeGeneratorToolPage)) + }, { title: 'Typography', url: '#/styles/typography', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/TypographyPage/TypographyPage').TypographyPage)) }, { title: 'Utilities', url: '#/styles/utilities', + component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Styles/UtilitiesPage/UtilitiesPage').UtilitiesPage)) } - ] }, { title: 'Components', url: '#/components', className: 'componentsPage', + isUhfLink: true, component: require('../../pages/Overviews/ComponentsPage').ComponentsPage, pages: [ + { + title: 'ActivityItem', + url: '#/components/activityitem', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ActivityItemComponentPage').ActivityItemComponentPage)) + }, { title: 'Breadcrumb', url: '#/components/breadcrumb', @@ -100,14 +134,18 @@ export const AppState: IAppState = { url: '#/components/button', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ButtonComponentPage').ButtonComponentPage)), - + }, + { + title: 'Calendar', + url: '#/components/Calendar', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/CalendarComponentPage').CalendarComponentPage)) }, { title: 'Callout', url: '#/components/callout', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/CalloutComponentPage').CalloutComponentPage)) - }, { title: 'Checkbox', @@ -115,12 +153,17 @@ export const AppState: IAppState = { component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/CheckboxComponentPage').CheckboxComponentPage)) }, + { + title: 'Coachmark', + url: '#/components/coachmark', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/CoachmarkComponentPage').CoachmarkComponentPage)) + }, { title: 'ChoiceGroup', url: '#/components/choicegroup', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ChoiceGroupComponentPage').ChoiceGroupComponentPage)) - }, { title: 'ColorPicker', @@ -133,7 +176,6 @@ export const AppState: IAppState = { url: '#/components/ComboBox', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ComboBoxComponentPage').ComboBoxComponentPage)) - }, { title: 'CommandBar', @@ -146,7 +188,6 @@ export const AppState: IAppState = { url: '#/components/contextualmenu', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ContextualMenuComponentPage').ContextualMenuComponentPage)) - }, { title: 'DatePicker', @@ -177,7 +218,6 @@ export const AppState: IAppState = { url: '#/components/dropdown', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/DropdownComponentPage').DropdownComponentPage)) - }, { title: 'Facepile', @@ -191,7 +231,18 @@ export const AppState: IAppState = { url: '#/components/groupedlist', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/GroupedListComponentPage').GroupedListComponentPage)) - + }, + { + title: 'HoverCard', + url: '#/components/hovercard', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/HoverCardComponentPage').HoverCardComponentPage)) + }, + { + title: 'Icon', + url: '#/components/icon', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/IconComponentPage').IconComponentPage)) }, { title: 'Image', @@ -210,7 +261,6 @@ export const AppState: IAppState = { url: '#/components/layer', component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/LayerComponentPage').LayerComponentPage)) - }, { title: 'Link', @@ -242,6 +292,12 @@ export const AppState: IAppState = { component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/NavComponentPage').NavComponentPage)) }, + { + title: 'OverflowSet', + url: '#/components/overflowset', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/OverflowSetComponentPage').OverflowSetComponentPage)) + }, { title: 'Overlay', url: '#/components/overlay', @@ -296,6 +352,12 @@ export const AppState: IAppState = { component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ResizeGroupComponentPage').ResizeGroupComponentPage)) }, + { + title: 'ScrollablePane', + url: '#/components/scrollablepane', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/ScrollablePaneComponentPage').ScrollablePaneComponentPage)) + }, { title: 'SearchBox', url: '#/components/searchbox', @@ -326,6 +388,12 @@ export const AppState: IAppState = { component: () => , getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/SwatchColorPickerComponentPage').SwatchColorPickerComponentPage)) }, + { + title: 'TeachingBubble', + url: '#/components/teachingbubble', + component: () => , + getComponent: cb => require.ensure([], (require) => cb(require('../../pages/Components/TeachingBubbleComponentPage').TeachingBubbleComponentPage)) + }, { title: 'TextField', url: '#/components/textfield', @@ -388,12 +456,14 @@ export const AppState: IAppState = { title: 'Resources', url: '#/resources', className: 'resourcesPage', + isUhfLink: true, getComponent: cb => require.ensure([], (require) => cb(require('../../pages/ResourcesPage/ResourcesPage').ResourcesPage)) }, { title: 'Blog', url: '#/blog', className: 'blogPage', + isUhfLink: true, getComponent: cb => require.ensure([], (require) => cb(require('../../pages/BlogPage/BlogPage').BlogPage)) }, { diff --git a/apps/fabric-website/src/components/CodeBlock/CodeBlock.tsx b/apps/fabric-website/src/components/CodeBlock/CodeBlock.tsx index 869df7be29064..e5d8ce6a6f775 100644 --- a/apps/fabric-website/src/components/CodeBlock/CodeBlock.tsx +++ b/apps/fabric-website/src/components/CodeBlock/CodeBlock.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { css } from 'office-ui-fabric-react/lib/Utilities'; import * as stylesImport from './CodeBlock.module.scss'; -const styles: any = stylesImport; +import * as Highlight from 'react-highlight'; -const Highlight = require('react-highlight'); +const styles: any = stylesImport; export interface ICodeBlockProps extends React.HTMLAttributes { /** diff --git a/apps/fabric-website/src/components/ComponentPage/ComponentPage.scss b/apps/fabric-website/src/components/ComponentPage/ComponentPage.scss index bfca111ccb98c..9487b879b3a2d 100644 --- a/apps/fabric-website/src/components/ComponentPage/ComponentPage.scss +++ b/apps/fabric-website/src/components/ComponentPage/ComponentPage.scss @@ -16,4 +16,8 @@ @include contentPadding(50px, 50px); // Override padding to match this website } + #BestPractices, #Variants, #ImplementationExamples, #Implementation { + margin-top: 0; + } + } \ No newline at end of file diff --git a/apps/fabric-website/src/components/DONavigation/DONavigation.tsx b/apps/fabric-website/src/components/DONavigation/DONavigation.tsx index 6a06c7c8cb769..509c060ff1885 100644 --- a/apps/fabric-website/src/components/DONavigation/DONavigation.tsx +++ b/apps/fabric-website/src/components/DONavigation/DONavigation.tsx @@ -11,7 +11,6 @@ export interface IDONavigationState { } export class DONavigation extends React.Component { - private _links = []; private _containers = []; private HEADER_CLASS = '.od-Header'; private LINKS_CLASS = '.od-Navigation-link'; @@ -39,7 +38,6 @@ export class DONavigation extends React.Component { - - public render() { - return ( -
-
-
- - Office dev center logo image - -
-
- -
-
-
- -
-