-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(expansion): fix expansion .mat-expansion-panel-header
styles
#20019
Conversation
@@ -45,12 +45,23 @@ | |||
flex: 1; | |||
flex-direction: row; | |||
overflow: hidden; | |||
|
|||
// width of .mat-expansion-indicator::after element | |||
&:only-child { |
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 might break down if we add another element to the markup. Maybe we can set a class based on whether the toggle exists instead?
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.
@crisbeto I've adopted this approach. I also realized that my original commit did not take into consideration togglePosition="before"
being used. My new commit takes this into consideration.
053ac5c
to
1cfce4c
Compare
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.
LGTM
@swseverance This change breaks ~60 targets inside Google, mostly screenshot tests. I was taking a look at the diffs and they seem significant. I don't think it's worth the effort to fix the |
@wagnermaciel ok. I’ll close the PR |
IMO this is still a worthwhile change. The screenshot diffs were expected since it moves an element a few pixels away in some cases. |
I've been looking through the diffs for the screenshots and I'm going to try and see if I can come up with a fix for them and I'll let you know how it goes. From what I see we can ignore the vast majority of the changes and there are only maybe 1, 2, or 3 that I think someone would complain about |
This is generating some unexpected diffs inside of google. It'll be in our backlogs for things to debug but it's relatively low priority compared to other PRs |
@swseverance I think we can try again to get this landed - would mind rebasing the rebase the PR? |
* Add margin to `.mat-content` element to account for consumer using `mat-expansion-panel` components with the toggle hidden alongside `mat-expansion-panel` components where the toggle is visible * Adjust sizing of `.mat-expansion-panel-header-title` and `.mat-expansion-panel-header-description` elements so that the width of each respective element is uniform across multiple adjacent `mat-expansion-panel` elements * Fixes angular#20002
1cfce4c
to
a718c20
Compare
@andrewseguin rebased! |
…20019) * Add margin to `.mat-content` element to account for consumer using `mat-expansion-panel` components with the toggle hidden alongside `mat-expansion-panel` components where the toggle is visible * Adjust sizing of `.mat-expansion-panel-header-title` and `.mat-expansion-panel-header-description` elements so that the width of each respective element is uniform across multiple adjacent `mat-expansion-panel` elements * Fixes #20002 (cherry picked from commit 2615b5f)
…20019) * Add margin to `.mat-content` element to account for consumer using `mat-expansion-panel` components with the toggle hidden alongside `mat-expansion-panel` components where the toggle is visible * Adjust sizing of `.mat-expansion-panel-header-title` and `.mat-expansion-panel-header-description` elements so that the width of each respective element is uniform across multiple adjacent `mat-expansion-panel` elements * Fixes #20002 (cherry picked from commit 2615b5f)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`14.1.2` -> `14.1.3`](https://renovatebot.com/diffs/npm/@angular%2fcdk/14.1.2/14.1.3) | | [@angular/material](https://github.com/angular/components) | dependencies | patch | [`14.1.2` -> `14.1.3`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/14.1.2/14.1.3) | --- ### Release Notes <details> <summary>angular/components</summary> ### [`v14.1.3`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#​1413-rubber-chicken-2022-08-19) [Compare Source](angular/components@14.1.2...14.1.3) ##### cdk | Commit | Type | Description | | -- | -- | -- | | [f661a9300e](angular/components@f661a93) | fix | **dialog:** fall back to node injector token doesn't exist in template injector ([#​25406](angular/components#25406)) | | [b9f09aa741](angular/components@b9f09aa) | fix | **overlay:** backdropClass type mismatch ([#​25487](angular/components#25487)) | ##### material | Commit | Type | Description | | -- | -- | -- | | [d1ef7e23c6](angular/components@d1ef7e2) | fix | **button-toggle:** toggle name falling out of sync if name changes ([#​24713](angular/components#24713)) | | [19df7cf940](angular/components@19df7cf) | fix | **expansion:** fix lint issue ([#​25469](angular/components#25469)) | ##### expansion | Commit | Type | Description | | -- | -- | -- | | [b1450b1cb5](angular/components@b1450b1) | fix | fix expansion `.mat-expansion-panel-header` styles ([#​20019](angular/components#20019)) | #### Special Thanks Andrew Seguin, Dmitrii Kuzmin, Kristiyan Kostadinov, ko-tori and swseverance <!-- CHANGELOG SPLIT MARKER --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNjUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjE2NS4xIn0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1515 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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. |
.mat-content
element to account for consumer usingmat-expansion-panel
components with the toggle hidden alongsidemat-expansion-panel
components where the toggle is visible.mat-expansion-panel-header-title
and.mat-expansion-panel-header-description
elements so that the widthof each respective element is uniform across multiple adjacent
mat-expansion-panel
elementsLTR
RTL
Caretaker Note (andrewseguin, 2022-04): Breaks ~50 screenshot tests. Text in expansion panels are getting shifted over maybe 10 - 15px