-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(material/toolbar): minor doc fixes #29227
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export {ToolbarBasicExample} from './toolbar-basic/toolbar-basic-example'; | ||
| export {ToolbarMultirowExample} from './toolbar-multirow/toolbar-multirow-example'; | ||
| export {ToolbarSimpleExample} from './toolbar-simple/toolbar-simple-example'; | ||
| export {ToolbarOverviewExample} from './toolbar-overview/toolbar-overview-example'; | ||
| export {ToolbarHarnessExample} from './toolbar-harness/toolbar-harness-example'; |
2 changes: 1 addition & 1 deletion
2
src/components-examples/material/toolbar/toolbar-multirow/toolbar-multirow-example.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 13 additions & 62 deletions
75
src/components-examples/material/toolbar/toolbar-overview/toolbar-overview-example.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,13 @@ | ||
| <p> | ||
| <!-- #docregion toolbar-simple --> | ||
| <mat-toolbar> | ||
| <span>My Application</span> | ||
| </mat-toolbar> | ||
| <!-- #enddocregion toolbar-simple --> | ||
| </p> | ||
|
|
||
| <p> | ||
| <mat-toolbar> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with menu icon"> | ||
| <mat-icon>menu</mat-icon> | ||
| </button> | ||
| <span>My App</span> | ||
| <span class="example-spacer"></span> | ||
| <button mat-icon-button class="example-icon favorite-icon" aria-label="Example icon-button with heart icon"> | ||
| <mat-icon>favorite</mat-icon> | ||
| </button> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with share icon"> | ||
| <mat-icon>share</mat-icon> | ||
| </button> | ||
| </mat-toolbar> | ||
| </p> | ||
|
|
||
| <p> | ||
| <mat-toolbar color="primary"> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with menu icon"> | ||
| <mat-icon>menu</mat-icon> | ||
| </button> | ||
| <span>My App</span> | ||
| <span class="example-spacer"></span> | ||
| <button mat-icon-button class="example-icon favorite-icon" aria-label="Example icon-button with heart icon"> | ||
| <mat-icon>favorite</mat-icon> | ||
| </button> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with share icon"> | ||
| <mat-icon>share</mat-icon> | ||
| </button> | ||
| </mat-toolbar> | ||
| </p> | ||
|
|
||
| <p> | ||
| <mat-toolbar color="primary"> | ||
| <mat-toolbar-row> | ||
| <span>My App</span> | ||
| <span class="example-spacer"></span> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with menu icon"> | ||
| <mat-icon>menu</mat-icon> | ||
| </button> | ||
| </mat-toolbar-row> | ||
|
|
||
| <mat-toolbar-row> | ||
| <span>Second Line</span> | ||
| <span class="example-spacer"></span> | ||
| <button mat-icon-button class="example-icon favorite-icon" aria-label="Example icon-button with heart icon"> | ||
| <mat-icon>favorite</mat-icon> | ||
| </button> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with share icon"> | ||
| <mat-icon>share</mat-icon> | ||
| </button> | ||
| </mat-toolbar-row> | ||
| </mat-toolbar> | ||
| </p> | ||
| <mat-toolbar> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with menu icon"> | ||
| <mat-icon>menu</mat-icon> | ||
| </button> | ||
| <span>My App</span> | ||
| <span class="example-spacer"></span> | ||
| <button mat-icon-button class="example-icon favorite-icon" aria-label="Example icon-button with heart icon"> | ||
| <mat-icon>favorite</mat-icon> | ||
| </button> | ||
| <button mat-icon-button class="example-icon" aria-label="Example icon-button with share icon"> | ||
| <mat-icon>share</mat-icon> | ||
| </button> | ||
| </mat-toolbar> |
3 changes: 3 additions & 0 deletions
3
src/components-examples/material/toolbar/toolbar-simple/toolbar-simple-example.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <mat-toolbar> | ||
| <span>My Application</span> | ||
| </mat-toolbar> |
13 changes: 13 additions & 0 deletions
13
src/components-examples/material/toolbar/toolbar-simple/toolbar-simple-example.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import {Component} from '@angular/core'; | ||
| import {MatToolbarModule} from '@angular/material/toolbar'; | ||
|
|
||
| /** | ||
| * @title Toolbar with just text | ||
| */ | ||
| @Component({ | ||
| selector: 'toolbar-simple-example', | ||
| templateUrl: 'toolbar-simple-example.html', | ||
| standalone: true, | ||
| imports: [MatToolbarModule], | ||
| }) | ||
| export class ToolbarSimpleExample {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Shouldn't this doc comment be updated as well since that generates what is on the API tab? https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.ts#L49.
Maybe something like:
/** Palette color of the toolbar. Not recommended in M3, for more information see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants. */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.
Yes definitely - I'm thinking we'll have one single PR that goes around to update all
colorinputs with some consistent messageThere 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.
If color is not supported in MD3 or not recommended, then why keep using it in the angular material page? Its misguiding. (Also, I personally am against toolbar not having a pallete color, I find it hostile to how a business wants to present its brand.)
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 #28805 (comment) I made a comment of how to adapt theme colors to the toolbar.
Option 1:
Option 2:
Any Thoughts?
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.
I empathize with wanting color in the toolbar - we also think it looks better for branding. However, we're beholden to the spec and designers here, and our goal is to match their direction
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.
Thanks for the reply. I understand, is the Angular Material page be updated to adhere to the specs? As it is it, I believe it contributes to the confusion.