Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Git documentation. #983

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions ui/appui-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To get started with React components from the `@itwin/appui-react` package, simply import the necessary components and utilities:
To get started with 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import {
MessageCenterField,
StatusBarItemUtilities,
StatusBarSection,
} from "@itwin/appui-react";
function createItem() {
const custom = StatusBarItemUtilities.createCustomItem(
"item1",
StatusBarSection.Left,
10,
<MessageCenterField />
);
return {
custom1
};
}
import {
MessageCenterField,
StatusBarItemUtilities,
StatusBarSection,
UiItemsManager,
} from "@itwin/appui-react";
UiItemsManager.register({
id: "provider-1",
getStatusBarItems: () => [StatusBarItemUtilities.createCustomItem({
id: "item-1",
section: StatusBarSection.Left,
content: <MessageCenterField />,
})],
});

Copy link
Collaborator

Choose a reason for hiding this comment

The 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/).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
For more details, check out the [@itwin/appui-react documentation](https://www.itwinjs.org/reference/appui-react/).
For more details, check out [Get Started](https://www.itwinjs.org/ui/appui/get-started/) guide or [@itwin/appui-react documentation](https://www.itwinjs.org/reference/appui-react/).

2 changes: 1 addition & 1 deletion ui/appui-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@itwin/appui-react",
"version": "4.17.0-dev.0",
"description": "UI framework",
"description": "A react component library for AppUI framework",
"main": "lib/cjs/appui-react.js",
"module": "lib/esm/appui-react.js",
"typings": "lib/cjs/appui-react",
Expand Down
38 changes: 36 additions & 2 deletions ui/components-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To get started with React components from the `@itwin/components-react` package, simply import the necessary components and utilities:
To get started with the `@itwin/components-react` package, simply import the necessary components and utilities:


```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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update this snippet to pass in some minimal data/props to PropertyFilterBuilderRenderer.

```

For more details, check out the [@itwin/components-react documentation](https://www.itwinjs.org/reference/components-react/).
2 changes: 1 addition & 1 deletion ui/components-react/package.json
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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "A react component library for iTwin.js UI data-oriented components",
"description": "A react component library of iTwin.js UI data-oriented components",

"main": "lib/cjs/components-react.js",
"module": "lib/esm/components-react.js",
"typings": "lib/cjs/components-react",
Expand Down
27 changes: 25 additions & 2 deletions ui/core-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To get started with React components from the `@itwin/core-react` package, simply import the necessary components and utilities:
To get started with the `@itwin/components-react` package, simply import the necessary components and utilities:


```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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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>
);
},
};
import {
ContextMenu,
ContextMenuItem,
} from "@itwin/core-react";
export function App() {
return (
<ContextMenu>
<ContextMenuItem>Item 1</ContextMenuItem>
</ContextMenu>
);
};

Let's avoid storybook-specific types.

Copy link
Collaborator

@GerardasB GerardasB Sep 3, 2024

Choose a reason for hiding this comment

The 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/).
2 changes: 1 addition & 1 deletion ui/core-react/package.json
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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "A react component library for iTwin.js UI general purpose components",
"description": "A react component library of iTwin.js UI general purpose components",

"main": "lib/cjs/core-react.js",
"module": "lib/esm/core-react.js",
"typings": "lib/cjs/core-react",
Expand Down
17 changes: 15 additions & 2 deletions ui/imodel-components-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To get started with React components from the `@itwin/imodel-components-react` package, simply import the necessary components and utilities:
To get started with the `@itwin/imodel-components-react` package, simply import the necessary components and utilities:


```tsx
import { BaseSolarDataProvider } from "@itwin/imodel-components-react";

export const Basic: Story = {
Copy link
Collaborator

Choose a reason for hiding this comment

The 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/).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
For more details, check out the [@itwin/imodel-components-react](https://www.itwinjs.org/reference/imodel-components-react/).
For more details, check out the [@itwin/imodel-components-react documentation](https://www.itwinjs.org/reference/imodel-components-react/).


See the [iTwin.js](https://www.itwinjs.org/learning/ui/imodel-components/) documentation for more information.
2 changes: 1 addition & 1 deletion ui/imodel-components-react/package.json
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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "A react component library for iTwin.js UI IModel Components",
"description": "A react component library of iTwin.js UI iModel components",

"main": "lib/cjs/imodel-components-react.js",
"module": "lib/esm/imodel-components-react.js",
"typings": "lib/cjs/imodel-components-react",
Expand Down
Loading