Skip to content

Updating documentation#4490

Merged
manishgarg1 merged 10 commits intomicrosoft:masterfrom
manishgarg1:manishga/docUpdates3
Apr 10, 2018
Merged

Updating documentation#4490
manishgarg1 merged 10 commits intomicrosoft:masterfrom
manishgarg1:manishga/docUpdates3

Conversation

@manishgarg1
Copy link
Copy Markdown
Collaborator

Description of changes

Some document restructuring to set it up for future improvements.

@manishgarg1 manishgarg1 requested review from aditima and dzearing April 9, 2018 04:33
@dzearing dzearing changed the title Manishga/doc updates3 Updating documentation Apr 9, 2018
Copy link
Copy Markdown
Member

@dzearing dzearing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The organization looks fine to me. I assume you haven't changed a lot of the content. I can't really tell from the diff.

Copy link
Copy Markdown
Member

@Jahnp Jahnp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me! Thanks for the improvements, @manishgarg1 --looking forward to future additions. I left a few small comments for spelling/grammar, but otherwise this looks good to go.

FAQ.md Outdated

## *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 Online, ...
Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits for spelling/grammar: SharePoint, Visual Studio team Services #Resolved

FAQ.md Outdated

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 Online, ...

These components are also used by third party developers buiding extensiblity components using the SharePoint Framework.
Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling nit: buiding -> building #Resolved


## *Q. Where is the official website located?*

http://dev.office.com/fabric
Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://developer.microsoft.com/fabric (could also use uifabric.io) #Resolved

FAQ.md Outdated

## *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 best practices used in the industry. Learning those can help you in your career.
Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍 #Resolved

Copy link
Copy Markdown
Collaborator Author

@manishgarg1 manishgarg1 Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big thanx for reviewing @Jahnp. #Resolved

Our tests are built using [Jest](https://facebook.github.io/jest/). This allows us to run tests in a node environment, and simulates the browser using jsdom.

For snapshot testing, we use `react-test-renderer` and Jest apis.
For snapshot testing, we use `react-test-renderer` and `Jest apis`.
Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny tiny nit: Should this be Jest APIs? #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jahnp, for some of these docs, I am just moving them at this point. Will then work on them individually once this PR is merged.


In reply to: 180287991 [](ancestors = 180287991)

Copy link
Copy Markdown
Member

@Jahnp Jahnp Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, makes sense, rock on. Was seeing other changes in here as a part of that (adding the quotes) so I assumed you were doing small content changes too. #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very little here and there where the meaning of the content won't change.


In reply to: 180502872 [](ancestors = 180502872)


- Addition or removal of functionality in a non backward compatible way.

- A new component should qualify as a **major** change. No newline at end of file
Copy link
Copy Markdown
Contributor

@aditima aditima Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should a new component be a major change? I would intuitively think it would be a minor as long as it's not affecting any existing one.,.. #Resolved

#### Fundamental components
Fundamental components are the official React representation of our [Adobe XD Toolkit](https://static2.sharepointonline.com/files/fabric/fabric-website/files/officeuifabric_v4.0.0.zip) and receive higher priority in respect to stabilization, bug fixes, accessibility and general design resourcing. Components __cannot__ be immediately added as a Fundamental type component as it will need a period of stabilization and API review. All components should always start off as Experimental. A good portion of the Fundamental components are currently integrated within some of our major products such as OneDrive, SharePoint and Outlook. Fundamental components are developed in the office-ui-fabric-react project in the `<root of project>/packages/office-ui-fabric-react` folder.

### Start coding your component
Copy link
Copy Markdown
Contributor

@aditima aditima Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David and I were talking about this once earlier, and at least for internal submissions, we thought having a design review before the dev begins coding is useful. We should encourage people to try to break their component into reusable building blocks, and try to reuse existing building blocks (or variants) whenever possible to keep the overall code volume small. The design review can help achieve this before going too far ahead into coding.

Now, doing this for public github submissions is likely not feasible. Also, we do not want to be the bottle-neck here. But I clearly see the point where the Fabric Core team can be in a better position to do this composition than any random developer. #Resolved

export * from './ExcitingNewComponent.types';
```

### Unit tests and screener tests
Copy link
Copy Markdown
Contributor

@aditima aditima Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David had a nice list of horizontals to satisfy before we promote a component from Experimental to Fundamental. We should capture this somewhere...

  1. Work with a designer (Angela or Ben) to get their buyoff and make sure it fits our branding.
  2. Documentation (a documentation page with examples, that are consistent and readable)
  3. Tests (Visual Regression tests, Snapshot tests, and functional unit tests)
  4. Accessible correct aria labeling, keyboardable, renders in RTL correctly, and supports high contrast)
  5. Theme-able (no hard coded colors, uses semantic color slots)
  6. Consistent API interface (has componentRef, className, supports injecting data- attributes etc.)
    #Resolved

@@ -1,153 +0,0 @@
## Overview
Copy link
Copy Markdown
Contributor

@aditima aditima Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we moving this elsewhere? #Resolved

* In this example the component will be called `ExcitingNewComponent`.
3. Create a `ExcitingNewComponent.types.ts` file that will contain an interface for your component props

* @todo: review
Copy link
Copy Markdown
Collaborator Author

@manishgarg1 manishgarg1 Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo [](start = 5, length = 4)

Resolve before merging #Resolved

* Import ExcitingNewComponent
* `import { ExcitingNewComponent } from './ExcitingNewComponent'`;
* Note: This class and file don't exist yet but they will during step 4 of this small tutorial.
* Create an empty interface `IExcitingNewComponent`
Copy link
Copy Markdown
Member

@dzearing dzearing Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an empty interface (which may contain the public imperative API surface, such as focus().) #Resolved

export interface IExcitingNewComponent {
}

export interface IExcitingNewComponentProps extends React.Props<ExcitingNewComponent> {
Copy link
Copy Markdown
Member

@dzearing dzearing Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ts file should import the types from the file. #Resolved

/**
* All props for your component are to be defined here.
*/
componentRef?: (component: IExcitingNewComponent) => void;
Copy link
Copy Markdown
Member

@dzearing dzearing Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be moved up into the .types description, explaining this is how customers should access the imperative API surface (through componentRef) #Resolved

@manishgarg1 manishgarg1 merged commit 565e903 into microsoft:master Apr 10, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants