-
Notifications
You must be signed in to change notification settings - Fork 79
Docs GridLayout #365
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
Docs GridLayout #365
Conversation
components/gridlayout/overview.md
Outdated
--- | ||
title: Overview | ||
page_title: GridLayout Overview | ||
description: Overview of the GridLayout for Blazor. |
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.
Use different keywords in the different meta elements.
description: Overview of the GridLayout for Blazor. | |
description: Introduction to the GridLayout for Blazor. The component provides a CSS grid system. |
components/gridlayout/overview.md
Outdated
|
||
## Basics | ||
|
||
#### To use a Telerik GridLayout for Blazor |
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.
We are skipping one heading level here (## -> ####). Is a heading needed at all?
#### To use a Telerik GridLayout for Blazor | |
To use a Telerik GridLayout for Blazor: |
components/gridlayout/overview.md
Outdated
|
||
1. Declare the `<TelerikGridLayout>` tag | ||
|
||
1. To define columns in the GridLayout add one or more instances of the `<GridLayoutColumn>` to the `<GridLayoutColumns>` collection. |
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.
1. To define columns in the GridLayout add one or more instances of the `<GridLayoutColumn>` to the `<GridLayoutColumns>` collection. | |
1. To define columns in the GridLayout, add one or more `<GridLayoutColumn>` tags to the `<GridLayoutColumns>` collection. |
components/gridlayout/overview.md
Outdated
|
||
1. To define columns in the GridLayout add one or more instances of the `<GridLayoutColumn>` to the `<GridLayoutColumns>` collection. | ||
|
||
* The number of `<GridLayoutColumn>` should be the same as the number of the `<GridLayoutItem>`. |
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.
This is not true if ColumnSpan is used, right?
* The number of `<GridLayoutColumn>` should be the same as the number of the `<GridLayoutItem>`. | |
* The number of `<GridLayoutColumn>`s should match the number of `<GridLayoutItem>`s. If [items span across multiple columns]({%slug gridlayout-items %}#columnspan), then the columns can be more than the items. |
components/gridlayout/overview.md
Outdated
|
||
* The number of `<GridLayoutColumn>` should be the same as the number of the `<GridLayoutItem>`. | ||
|
||
1. To define rows in the GridLayout add one or more instances of the `<GridLayoutRow>` to the `<GridLayoutRows>` collection. |
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.
1. To define rows in the GridLayout add one or more instances of the `<GridLayoutRow>` to the `<GridLayoutRows>` collection. | |
1. To define rows in the GridLayout, add one or more `<GridLayoutRow>` tags to the `<GridLayoutRows>` collection. |
components/gridlayout/overview.md
Outdated
|
||
1. To define rows in the GridLayout add one or more instances of the `<GridLayoutRow>` to the `<GridLayoutRows>` collection. | ||
|
||
1. Provide one or more instances of the `<GridLayoutItem>` to the `<GridLayoutItems>` collection. |
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.
1. Provide one or more instances of the `<GridLayoutItem>` to the `<GridLayoutItems>` collection. | |
1. Define one or more `<GridLayoutItem>` tags in the `<GridLayoutItems>` collection. |
|
||
* [Features](#features) | ||
|
||
## Basics |
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.
In this section we explain how rows, columns and items are defined. It becomes clear that the number of columns should match the number of items. However, it doesn't become clear if rows are required or not. Also, what happens if multiple rows are defined?
 | ||
|
||
|
||
>caption Component namespace and reference |
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.
This second snippet brings little value, but expands the article length. It can be merged with the first one.
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.
This is a common practice across our documentation, to add a snippet that showcases the namespace and reference. I would rather leave it there.
components/gridlayout/overview.md
Outdated
|
||
## Features | ||
|
||
The StackLayout offers the following features: |
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.
We are introducing a StackLayout term, which has not been defined. Is this a typo? Is this a feature of the GridLayout? Is this a separate component? How does it fit in the above information and snippets?
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.
Indeed, it is a typo. Will be fixed with the rest of the improvements based on your feedback
components/gridlayout/overview.md
Outdated
|
||
* `Width`- takes a CSS unit that determines how wide the GridLayout is. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | ||
|
||
* `ColumnSpacing` - controls the space between the columns in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. |
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.
We have already linked the Dimensions article.
* `ColumnSpacing` - controls the space between the columns in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | |
* `ColumnSpacing` - controls the space between the columns in the GridLayout. Use a CSS length unit. |
components/gridlayout/overview.md
Outdated
|
||
* `Class` - the CSS class that renders on the main wrapping element of the component. | ||
|
||
* `Width`- takes a CSS unit that determines how wide the GridLayout is. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. |
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.
Integers and doubles are valid CSS units, but not supported here, as far as I understand. That is why we specify what units we require.
* `Width`- takes a CSS unit that determines how wide the GridLayout is. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | |
* `Width`- takes a CSS length unit that determines how wide the GridLayout is. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. |
components/gridlayout/overview.md
Outdated
|
||
* `ColumnSpacing` - controls the space between the columns in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | ||
|
||
* `RowSpacing` - controls the space between the rows in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. |
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.
* `RowSpacing` - controls the space between the rows in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | |
* `RowSpacing` - controls the space between the rows in the GridLayout. Use a CSS length unit. |
|
||
* `RowSpacing` - controls the space between the rows in the GridLayout. See the [Dimensions]({%slug common-features/dimensions%}) article for more details on what units you can use and how dimensions in percent work. | ||
|
||
* `HorizontalAlign` - controls the alignment of the inner items in the GridLayout column based on the X axis. Takes a member of the `GridLayoutHorizontalAlign` enum: |
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.
Which are the inner items and which are the "outer" items?
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.
The inner items are all s defined. They are inner to the component
components/gridlayout/items.md
Outdated
--- | ||
title: Items | ||
page_title: GridLayout Items | ||
description: Items in the GridLayout for Blazor. |
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.
description: Items in the GridLayout for Blazor. | |
description: Usage of layout items in the GridLayout for Blazor. |
components/gridlayout/items.md
Outdated
|
||
# Items | ||
|
||
The you can control the items in the GridLayout with the parameters they expose: |
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.
The you can control the items in the GridLayout with the parameters they expose: | |
You can control the items in the GridLayout with the parameters they expose: |
components/gridlayout/items.md
Outdated
|
||
## Row | ||
|
||
The `Row` parameter controls in which row the `GridLayoutItem` will reside. The rows in the component are `1-based`. |
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.
What happens if a Row is not set?
components/gridlayout/items.md
Outdated
|
||
## Column | ||
|
||
The `Column` parameter controls in which row the `GridLayoutItem` will reside. The columns in the component are `1-based`. |
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.
The `Column` parameter controls in which row the `GridLayoutItem` will reside. The columns in the component are `1-based`. | |
The `Column` parameter controls in which column the `GridLayoutItem` will reside. The columns in the component are `1-based`. |
</TelerikGridLayout> | ||
```` | ||
|
||
## Column |
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.
What happens if a Column is not set?
components/gridlayout/items.md
Outdated
|
||
## ColumnSpan | ||
|
||
The `ColumnSpan` parameter defines the column span that the item will occupy. |
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.
Explain terms with different words, otherwise the explanation becomes unnecessary.
The `ColumnSpan` parameter defines the column span that the item will occupy. | |
The `ColumnSpan` parameter defines how many columns the item will occupy. |
components/gridlayout/items.md
Outdated
|
||
## RowSpan | ||
|
||
The `RowSpan` parameter defines the row span that the item will occupy. |
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.
The `RowSpan` parameter defines the row span that the item will occupy. | |
The `RowSpan` parameter defines how many rows the item will occupy. |
} | ||
```` | ||
|
||
## Example: Complex Grid Layout |
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.
What are the pros and cons of using a GridLayout vs a Splitter layout?
components/gridlayout/items.md
Outdated
|
||
## Example: Complex Grid Layout | ||
|
||
You can use the parameter exposed for the GridLayout items to create more complex layouts. |
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.
You can use the parameter exposed for the GridLayout items to create more complex layouts. | |
You can use the exposed parameters of the GridLayout items to create more complex layouts. |
components/gridlayout/items.md
Outdated
>caption Create a page layout with the GridLayout component. The result from the code snippet below | ||
|
||
 |
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.
>caption Create a page layout with the GridLayout component. The result from the code snippet below | |
 | |
 | |
>caption Create a page layout with the GridLayout component |
components/gridlayout/items.md
Outdated
public string MyImageUrl { get; set; } | ||
} | ||
|
||
public IEnumerable<SampleData> MyData = Enumerable.Range(1, 30).Select(x => new SampleData |
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.
MyData and SampleData are not intuitive names when using multiple components and multiple data sources.
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.
Here are some improvement suggestions for the language, explanations and code.
components/gridlayout/items.md
Outdated
|
||
## Column | ||
|
||
The `Column` parameter controls in which column the `GridLayoutItem` will reside. The columns in the component are `1-based`. If not columns are set the GridLayout items will be grouped in one column. |
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.
The `Column` parameter controls in which column the `GridLayoutItem` will reside. The columns in the component are `1-based`. If not columns are set the GridLayout items will be grouped in one column. | |
The `Column` parameter controls in which column the `GridLayoutItem` will reside. The column indexes in the component are `1-based`. If no columns are defined, the GridLayout items will be displayed in one column. |
components/gridlayout/items.md
Outdated
|
||
## Row | ||
|
||
The `Row` parameter controls in which row the `GridLayoutItem` will reside. The rows in the component are `1-based`. If not rows are defined the items will be grouped in one column with `n` rows where `n` is the number of items. |
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.
The `Row` parameter controls in which row the `GridLayoutItem` will reside. The rows in the component are `1-based`. If not rows are defined the items will be grouped in one column with `n` rows where `n` is the number of items. | |
The `Row` parameter controls in which row the `GridLayoutItem` will reside. The row indexes in the component are `1-based`. If no rows are defined, the items will be displayed in `r = i / c` rows, where: | |
* `r` is the number of rows; | |
* `i` is the number of items; | |
* `c` is the number of columns; |
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.
Note the suggestion about the scenario when no rows are defined.
New Component Checklist (delete for other types of PRs)
- Overview article
- Data binding article - applicable if data can be provided to the component. My be one article or a folder with several articles (examples - DropDownList and TreeView)
- Feature/component specific articles - those articles explain the component specific features, which do not suit in any of the before-mentioned articles. Examples of such articles are the Navigator for the Stock Chart, the Indeterminate state for the CheckBox and others.
- Selection article - applicable if the component exposes items selection. May be a folder.
[ ] - Single item selection
[ ] - Multiple item selection
- Templates - applicable if additional customization is allowed with Templates. Usually a folder, see the grid
- Events article - applicable if the component expose events.
Examples of such events could be:
Update Input Validation, Globalization, Keyboard Navigation, Accessibility Compliance articles as applicable.
Link from the Overview components list