-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updated Git documentation. #983
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -16,6 +16,29 @@ actions using reducers. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are a number of sub-frameworks, each which has a set of components, actions, and reducers, and contributes to the overall State. Each such | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sub-framework is contained in a separate folder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See the [iTwin.js](https://www.itwinjs.org/learning/ui/appui-react/) documentation for more information. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To get started with React components from the `@itwin/appui-react` package, simply import the necessary components and utilities: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
```tsx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MessageCenterField, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StatusBarItemUtilities, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StatusBarSection, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} from "@itwin/appui-react"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function createItem() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const custom = StatusBarItemUtilities.createCustomItem( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"item1", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StatusBarSection.Left, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<MessageCenterField /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
custom1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+24
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure these are the best snippets for the "get started" section, I think it should be the bare minimum to get something meaningful on the screen instead. You can take a look here for some more ideas: https://github.com/iTwin/iTwinUI/blob/main/packages/itwinui-react/README.md |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For more details, check out the [@itwin/appui-react documentation](https://www.itwinjs.org/reference/appui-react/). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,40 @@ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md | |||||
|
||||||
The **@itwin/components-react** package contains React components that are data-oriented, such as PropertyGrid and Tree. | ||||||
|
||||||
## Documentation | ||||||
## Usage | ||||||
|
||||||
See the [iTwin.js](https://www.itwinjs.org/learning/ui/components/) documentation for more information. | ||||||
To get started with React components from the `@itwin/components-react` package, simply import the necessary components and utilities: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```tsx | ||||||
import { | ||||||
PropertyDescription, | ||||||
StandardTypeNames, | ||||||
} from "@itwin/appui-abstract"; | ||||||
import { | ||||||
PropertyFilterRuleGroupOperator, | ||||||
PropertyFilter, | ||||||
} from "@itwin/components-react"; | ||||||
|
||||||
function createProperties(): PropertyDescription { | ||||||
return new PropertyDescription({ | ||||||
name: "string-prop", | ||||||
displayLabel: "String Property", | ||||||
typename: StandardTypeNames.String, | ||||||
}); | ||||||
} | ||||||
|
||||||
function createInitialFilter(): PropertyFilter { | ||||||
const property = createProperty(); | ||||||
return { | ||||||
operator: PropertyFilterRuleGroupOperator.Or, | ||||||
rules: [ | ||||||
{ | ||||||
property: property, | ||||||
operator: "like", | ||||||
}, | ||||||
], | ||||||
}; | ||||||
} | ||||||
Comment on lines
+14
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update this snippet to pass in some minimal data/props to |
||||||
``` | ||||||
|
||||||
For more details, check out the [@itwin/components-react documentation](https://www.itwinjs.org/reference/components-react/). |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
{ | ||||||
"name": "@itwin/components-react", | ||||||
"version": "4.17.0-dev.0", | ||||||
"description": "iTwin.js UI complex components", | ||||||
"description": "A react component library for iTwin.js UI data-oriented components", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"main": "lib/cjs/components-react.js", | ||||||
"module": "lib/esm/components-react.js", | ||||||
"typings": "lib/cjs/components-react", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,6 +6,29 @@ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The **@itwin/core-react** package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See the [iTwin.js](https://www.itwinjs.org/learning/ui/core/) documentation for more information. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To get started with React components from the `@itwin/core-react` package, simply import the necessary components and utilities: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
```tsx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ContextMenu, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ContextMenuItem, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ContextSubMenu, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} from "@itwin/core-react"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export const Basic: Story = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
render: (props) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<ContextMenu {...props}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<ContextSubMenu label="Label 1" id="1"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<ContextMenuItem>Label 1</ContextMenuItem> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</ContextSubMenu> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</ContextMenu> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+14
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Let's avoid storybook-specific types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we might need separate setup and usage sections for each package... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For more details, check out the [@itwin/core-react documentation](https://www.itwinjs.org/reference/core-react/). |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
{ | ||||||
"name": "@itwin/core-react", | ||||||
"version": "4.17.0-dev.0", | ||||||
"description": "iTwin.js UI core components", | ||||||
"description": "A react component library for iTwin.js UI general purpose components", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"main": "lib/cjs/core-react.js", | ||||||
"module": "lib/esm/core-react.js", | ||||||
"typings": "lib/cjs/core-react", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,19 @@ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md | |||||
|
||||||
The **@itwin/imodel-components-react** package contains React components that depend on the @itwin/core-frontend, @itwin/core-common or @itwin/core-quantity packages. | ||||||
|
||||||
## Documentation | ||||||
## Usage | ||||||
|
||||||
To get started with React components from the `@itwin/imodel-components-react` package, simply import the necessary components and utilities: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```tsx | ||||||
import { BaseSolarDataProvider } from "@itwin/imodel-components-react"; | ||||||
|
||||||
export const Basic: Story = { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's avoid storybook specific snippets. |
||||||
args: { | ||||||
dataProvider: new BaseSolarDataProvider(), | ||||||
}, | ||||||
}; | ||||||
``` | ||||||
|
||||||
For more details, check out the [@itwin/imodel-components-react](https://www.itwinjs.org/reference/imodel-components-react/). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
See the [iTwin.js](https://www.itwinjs.org/learning/ui/imodel-components/) documentation for more information. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
{ | ||||||
"name": "@itwin/imodel-components-react", | ||||||
"version": "4.17.0-dev.0", | ||||||
"description": "iTwin.js UI IModel Components", | ||||||
"description": "A react component library for iTwin.js UI IModel Components", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"main": "lib/cjs/imodel-components-react.js", | ||||||
"module": "lib/esm/imodel-components-react.js", | ||||||
"typings": "lib/cjs/imodel-components-react", | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.