Skip to content

Conversation

devversion
Copy link
Member

--- WIP ---

  • Restricted Flexbox Usage
  • Multi Line Support
  • Custom CSS Support
  • Input for Theme Color

The design doc isn't finished yet, but as discussed with @jelbourn, I'll submit that PR, so I can retrieve some feedback.

Open Points:

  • Item Alignment in the Toolbar

PS: Issue intentionally not referenced yet.

image

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 10, 2016
@jelbourn jelbourn added the in progress This issue is currently in progress label Mar 10, 2016
@@ -0,0 +1 @@
<ng-content></ng-content>
Copy link
Member

Choose a reason for hiding this comment

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

When the template of a component is just <ng-content>, it can be a @Directive (no template) instead of a @Component

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 Thanks good idea.

@devversion devversion force-pushed the wip/toolbar-component branch 8 times, most recently from 912e639 to 7f77d64 Compare March 11, 2016 21:46
// Fills the remaining space of the toolbar row.
.md-fill {
flex: 1 1 auto;
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm tempted to say that we eliminate this class and just people apply the styles they want to apply. I don't want to end up with a giant bag of classes that can be applied to different components in different contexts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, I'll remove that, but IMO there should be a class / element which fills the remaining space in the toolbar row. Otherwise the user has to apply the flex fill himself.

@jelbourn
Copy link
Member

Left a couple of comments and also added a screenshot to your PR description. Looking good! I like the API.

Aside from the comments, it just needs README.md file similar to the other components.

@robertmesserle can you also give this a look?

@devversion devversion force-pushed the wip/toolbar-component branch 2 times, most recently from 71d9719 to c48184a Compare March 13, 2016 09:08
@devversion
Copy link
Member Author

@jelbourn Completed your suggestions and added a README.md.

@jelbourn jelbourn added pr: needs review and removed in progress This issue is currently in progress labels Mar 13, 2016

### Example
```html
<md-toolbar [color]="myColor">
Copy link
Member

Choose a reason for hiding this comment

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

Start off with a simple example of the toolbar with just a single row (most common case), and then say something like "The toolbar also supports multiple rows" with the second example.

```

### Alignment
The `md-toolbar` component doesn't provide any API to align the items probably in the row.
Copy link
Member

Choose a reason for hiding this comment

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

I'd omit this line, and just go straight into saying that the toolbar content can be directly styles with flex, and then show the example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just wanted to clarify that there's no public API by the component itself.

@devversion devversion force-pushed the wip/toolbar-component branch 2 times, most recently from 354a50c to a940153 Compare March 13, 2016 19:23
@devversion devversion force-pushed the wip/toolbar-component branch from cb1d594 to c5a0515 Compare March 13, 2016 19:24
@jelbourn
Copy link
Member

LGTM

@jelbourn jelbourn merged commit c5a0515 into angular:master Mar 13, 2016
@devversion devversion deleted the wip/toolbar-component branch March 13, 2016 19:40
@jelbourn jelbourn mentioned this pull request Mar 13, 2016
4 tasks
andrewseguin pushed a commit to andrewseguin/components that referenced this pull request Oct 15, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has agreed to Google's Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants