-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(expansion): Allow expansion indicator positioning #6917
Conversation
8769ebf
to
83f2690
Compare
src/lib/expansion/expansion-panel.ts
Outdated
/** Whether the toggle indicator should be hidden. */ | ||
@Input() hideToggle: boolean = false; | ||
/** The positioning of the expansion indicator. */ | ||
@Input() togglePosition: string = 'end'; |
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.
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 think I prefer the single togglePosition
since it avoids bloating the API for a somewhat minor feature. It's also consistent with other inputs like the MdFormField.floatPlaceholder
which is 'always' | 'never' | 'auto'
.
*/ | ||
.mat-expansion-indicator::after { | ||
.mat-expansion-indicator-container { | ||
margin-bottom: 2.83px; |
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.
These is weirdly specific- is there any way this can be calculated or set as the result of other known values?
if (this.panel.togglePosition === 'start') { | ||
return -1; | ||
} | ||
return 1; |
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.
return this.panel.togglePosition === 'start' ? -1 : 1;
src/lib/expansion/expansion-panel.ts
Outdated
} | ||
return this.hideToggle; | ||
return this.togglePosition; |
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.
return this.accordion ? this.accordion.togglePosition : this.togglePosition;
bd5e96f
to
b2b6c3f
Compare
b2b6c3f
to
a7308fa
Compare
20d7cd1
to
81361a7
Compare
@jelbourn When you have a moment can you take a look at this PR? I don't remember where we landed on this one. |
2d63a28
to
ca027bf
Compare
BREAKING CHANGE: Expansion panel toggle indicicator is no longer hidden with a boolean input property hideToggle, but is not controlled with a string input property togglePosition. Available positions are: start, end and hidden. Defaults to hidden.
ca027bf
to
77cd36f
Compare
@josephperrott as discussed we're going to keep |
Closing in favor of #8199 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
#6726
Allows expansion indicator to be positioned at start, end and hidden.