Skip to content
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 grid repositioning on label change #8713

Merged
merged 1 commit into from
Jun 3, 2020
Merged

fix grid repositioning on label change #8713

merged 1 commit into from
Jun 3, 2020

Conversation

brad-decker
Copy link
Contributor

@brad-decker brad-decker commented Jun 1, 2020

resolves #8687

Takes advantage of visibility: hidden/visible which does not remove the space the element takes up on the screen from the dom... as well as a single column/row grid to overlap both off/on labels in the toggle button. I'm not used to BEM syntax so I'm sure the class naming could use some work.

This works for the alert screen because max-content will include visibility: hidden items.

For this demo i modified the HTML content to a longer off statement:

Mixed toggles
Both on

@brad-decker brad-decker requested a review from Gudahtt June 1, 2020 18:49
@Gudahtt
Copy link
Member

Gudahtt commented Jun 1, 2020

This seems promising!

@brad-decker brad-decker force-pushed the fix-8687 branch 3 times, most recently from 04e474e to f04029a Compare June 1, 2020 20:59
@brad-decker brad-decker marked this pull request as ready for review June 1, 2020 22:09
@brad-decker brad-decker requested a review from a team as a code owner June 1, 2020 22:09
@metamaskbot
Copy link
Collaborator

Builds ready [f04029a]
Page Load Metrics (712 ± 65 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint329949189
domContentLoaded38292771013665
load38492971213665
domInteractive38292771013665

@brad-decker brad-decker force-pushed the fix-8687 branch 2 times, most recently from 978ef2a to e27f7ad Compare June 2, 2020 15:47
@metamaskbot
Copy link
Collaborator

Builds ready [bffabc8]
Page Load Metrics (712 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint2910050189
domContentLoaded45491871016780
load45691971216780
domInteractive45391870916780

@brad-decker brad-decker requested review from Gudahtt and removed request for Gudahtt June 2, 2020 22:30
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -1,7 +1,8 @@
.toggle-button {
display: flex;
$self: &;
Copy link
Member

Choose a reason for hiding this comment

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

Huh... I didn't know you could assign & to a variable! That's neat.

@brad-decker brad-decker merged commit c6b77c9 into develop Jun 3, 2020
@brad-decker brad-decker deleted the fix-8687 branch June 3, 2020 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Settings > Alerts toggles grid shifting
3 participants