-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(toolbar): Title text should allow ellipsis. #9229
fix(toolbar): Title text should allow ellipsis. #9229
Conversation
@ThomasBurleson @EladBezalel @crisbeto @devversion Can you guys review and see if you like the color/styling of the new "CSS & Styles" section of the Toolbar docs? Also, standard review of my proposed solution to the actual problem 😄 |
@topherfangio - this looks very cool. Like your use of the Component API in the |
@topherfangio - lgtm |
} | ||
} | ||
|
||
function DocsCssApiTableController() { |
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.
Nit: Why are there controllers if they aren't used? Same for the selector directive.
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.
can you simply use :
controller : function() { },
LGTM aside from that minor comment 👍 |
50af486
to
77612f0
Compare
@ThomasBurleson @devversion Waiting for Travis to succeed, but I pushed the requested updates, and fixed a typo 😃 |
flex: 1; | ||
width: 0; | ||
|
||
span { |
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.
Why not use &:first-child
and make it more generic?
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.
Since the only formatting this applies is the overflow, I wanted something that shouldn't apply any additional formatting.
I guess I'm afraid that if we switch it to :first-child
, people might try to use a <div>
or something else strange and it will mess up.
I'm not opposed to switching it, and I honestly can't put a finger on why I feel this way, but using the <span>
just feels like a better solution to me 😕
Thoughts?
@topherfangio - can you fix the failing tests ? |
@ThomasBurleson Um...I "fixed" the tests...actually, I didn't do anything. Someone must have rerun the failed build and it passed? I ran the tests on my Windows box twice. The first time a |
77612f0
to
a95ea71
Compare
Talked with Elad, we think making this an actual directive of @ThomasBurleson Unless you disagree, I'll get this done tomorrow. |
a95ea71
to
f7d4cb4
Compare
@ThomasBurleson @EladBezalel Made a more generic Do you like the name |
I said that maybe having an ellipsis directive would be nice but in case we don't want to create more complexibility than I'd go with |
|
Currently, the title text of a toolbar wraps around on small screens causing the toolbar to become larger than expected. - Provide a new `md-truncate` component that applies the appropriate styles for using CSS-based text-overflow with an ellipsis. This component is designed to work nicely with the Toolbar component, but is also reusable and can be used in any other component. - Add docs/demos for the new component. - Update Toolbar demos to use new `md-truncate` component and show proper usage. Additionally, add the appropriate CSS docs in a new CSS & Styles section which includes a new doc-only directive (`docs-css-api-table`) that creates a clean way to view documentation regarding available CSS classes. Fixes angular#9026.
f7d4cb4
to
2c0555d
Compare
Updated to |
@topherfangio - lgtm |
Currently, the title text of a toolbar wraps around on small screens causing the toolbar to become larger than expected.
Provide a new
md-truncate
component that applies the appropriate stylesfor using CSS-based text-overflow with an ellipsis.
This component is designed to work nicely with the Toolbar component,
but is also reusable and can be used in any other component.
Add docs/demos for the new component.
Update Toolbar demos to use new
md-truncate
component and show properusage.
Additionally, add the appropriate CSS docs in a new CSS & Styles section which includes a new doc-only directive (
docs-css-api-table
) that creates a clean way to view documentation regarding available CSS classes.Fixes #9026.
Edit: Add screenshot of new docs section.