-
Notifications
You must be signed in to change notification settings - Fork 709
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
Fixes: Library - Connection state's position when there are no libraries around #11442 #12948
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
<KGrid | ||
gutter="0" | ||
class="grid" | ||
style="margin-bottom: -25px" | ||
> | ||
<KGridItem | ||
:layout12="{ span: 6 }" | ||
|
@@ -13,12 +14,7 @@ | |
<h1 :style="{ marginLeft: '-8px' }"> | ||
{{ injectedtr('otherLibraries') }} | ||
</h1> | ||
</KGridItem> | ||
<KGridItem | ||
:layout12="{ span: 6 }" | ||
:layout8="{ span: 4 }" | ||
:layout4="{ span: 4 }" | ||
> | ||
|
||
<div class="sync-status"> | ||
<span | ||
v-show="searchingOtherLibraries" | ||
|
@@ -55,16 +51,25 @@ | |
/> | ||
</span> | ||
</span> | ||
<span | ||
<div | ||
v-show="!searchingOtherLibraries && !devicesWithChannelsExist" | ||
data-test="no-other" | ||
class="a" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CSS class names are most effective when they are descriptive and meaningful, and indicate the purpose of the element. It would be best to avoid using vague or generic names. Maybe instead of class names |
||
> | ||
<span> | ||
<KIcon icon="disconnected" /> | ||
<span data-test="no-other"> | ||
<div> | ||
<span> | ||
<KIcon | ||
class="disco" | ||
icon="disconnected" | ||
/> | ||
</span> | ||
</div> | ||
| ||
<div class="b"> | ||
<span data-test="no-other-label">{{ injectedtr('noOtherLibraries') }}</span> | ||
</div> | ||
</span> | ||
| ||
<span data-test="no-other-label">{{ injectedtr('noOtherLibraries') }}</span> | ||
</span> | ||
</div> | ||
</div> | ||
</KGridItem> | ||
</KGrid> | ||
|
@@ -236,10 +241,34 @@ | |
.sync-status { | ||
display: flex; | ||
justify-content: flex-end; | ||
margin: 30px 0 10px; | ||
min-width: 400px; | ||
padding-left: 10px; | ||
margin-top: -20px; | ||
margin-bottom: 25px; | ||
margin-left: 0; | ||
|
||
.a { | ||
display: flex; | ||
align-items: center; | ||
margin-top: -5px; | ||
margin-left: 100px; | ||
} | ||
|
||
.b { | ||
min-width: 200px; | ||
padding-left: 00; | ||
margin-left: 500px; | ||
} | ||
|
||
.disco { | ||
margin-left: 1000px; | ||
} | ||
|
||
span { | ||
display: inline-flex; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
margin-left: -8px; | ||
vertical-align: bottom; | ||
} | ||
} | ||
|
@@ -257,4 +286,67 @@ | |
margin-left: 0.75em; | ||
} | ||
|
||
@media screen and (max-width: 600px) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I saw that you mentioned logo overlapping with text on some screen sizes; perhaps this issue could be fixed by using conditional styling? |
||
.sync-status { | ||
max-width: 400px; | ||
|
||
.a { | ||
margin-right: 13px; | ||
} | ||
|
||
.disco { | ||
margin-right: -640px; | ||
} | ||
|
||
span { | ||
margin-left: -191px; | ||
word-wrap: break-word; | ||
} | ||
} | ||
|
||
.wifi-svg { | ||
margin-left: -213px; | ||
} | ||
} | ||
@media screen and (min-width: 600px) and (max-width: 1100px) { | ||
.sync-status { | ||
.a { | ||
margin-right: 13px; | ||
} | ||
|
||
.disco { | ||
margin-right: -640px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed more than 10 instances of negative margins being used. While they can be useful at times, they can be difficult to debug and make the CSS harder to read, so we try to avoid them or add a comment explaining its usage. Is there an alternative you can use in place of some of these? |
||
} | ||
|
||
span { | ||
margin-left: -190px; | ||
} | ||
} | ||
|
||
.wifi-svg { | ||
margin-left: -160px; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 1100px) { | ||
.sync-status { | ||
span { | ||
padding-left: -50px; | ||
margin-left: -220px; | ||
} | ||
|
||
.a { | ||
margin-right: 50px; | ||
} | ||
|
||
.disco { | ||
margin-right: -610px; | ||
} | ||
} | ||
|
||
.wifi-svg { | ||
margin-left: -140px; | ||
} | ||
} | ||
|
||
</style> |
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.
Removing the usage of
KGridItem
here or themargin-left: -190px;
on line 322 might have had unwanted effects on the icon and string shown when searching for other libraries:I also noticed that when the window is large, the
No other libraries around you right now
andShowing all available libraries around you
descriptions are no longer positioned underneath theOther Libraries
section header:I think any changes you make to the connection state when there are no libraries should also be compared with the other two connection state descriptions to make sure there are no regressions.