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

refactor(scrollbar): clearing remaining components #3514

Merged
merged 8 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions assets/styles/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -482,17 +482,6 @@ a.link {
}

//Scrollbar
.ps__thumb-x,
.ps__thumb-y,
.ps__rail-x:hover > .ps__thumb-x,
.ps__rail-x:focus > .ps__thumb-x,
.ps__rail-x.ps--clicking .ps__thumb-x,
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
background: @flair-color !important;
}

.auto-scroll {
&::-webkit-scrollbar-thumb {
&:extend(.background-flair);
Expand Down
6 changes: 6 additions & 0 deletions assets/styles/framework/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@
rgba(34, 44, 63, 0) 100%
);

@lighter-splash-radial: radial-gradient(
circle,
rgba(96, 109, 136, 0.813) 0%,
rgba(101, 114, 139, 0.616) 100%
);

@midground-gradient: -webkit-radial-gradient(
top left,
#1c273a,
Expand Down
2 changes: 0 additions & 2 deletions assets/styles/framework/framework.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
@fifth-layer-zindex: 50;
@viewport-width: 100vw;

@import url('~/assets/styles/thirdparty/scrollbar.less');

#__nuxt,
#__layout,
#app-wrap,
Expand Down
4 changes: 1 addition & 3 deletions assets/styles/themes/moonless_night.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
}

&body,
#app,
.horizontal-rule,
.vertical-divider {
#app {
background: @midground !important;
}

Expand Down
65 changes: 0 additions & 65 deletions assets/styles/thirdparty/scrollbar.less

This file was deleted.

9 changes: 9 additions & 0 deletions components/interactables/Close/Close.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
cursor: pointer;
}

.wrapper .close-button {
right: 0;
top: 0;
}

@media only screen and (max-width: @mobile-breakpoint) {
.close-button {
right: @normal-spacing;
top: @normal-spacing;
}

.wrapper .close-button {
top: @large-spacing;
}
}
6 changes: 3 additions & 3 deletions components/interactables/UserPicker/UserPicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
type="dark"
:placeholder="$t('servers.create.select_friends_placeholder')"
/>
<UiScroll verticalScroll scrollbarVisibility="scroll" enableWrap>
<TypographyText
<UiSimpleScroll scrollMode="vertical" scrollShow="scroll"
><TypographyText
v-if="!filteredFriends.length"
:text="$t('servers.create.user_picker_empty')"
class="empty-results-text"
Expand All @@ -29,5 +29,5 @@
:selected="isSelected(friend)"
@click="toggle(friend)"
/>
</UiScroll>
</UiSimpleScroll>
</div>
11 changes: 0 additions & 11 deletions components/ui/ComingSoon/ComingSoon.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,4 @@
pointer-events: none;
padding: 20px;
}

.coming-soon-overlay::before {
content: 'Coming Soon';
position: absolute;
font-size: 2.5em;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: white;
&:extend(.third-layer);
}
}
20 changes: 11 additions & 9 deletions components/ui/HorizontalRule/HorizontalRule.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="horizontal-rule">
<hr />
<div class="horizontal-container">
<div class="horizontal-rule" />
</div>
</template>
<script lang="ts">
Expand All @@ -9,14 +9,16 @@ import Vue from 'vue'
export default Vue.extend({})
</script>
<style scoped lang="less">
hr {
height: 0px;
border: none;
border-bottom: transparents;
}
div {
.horizontal-rule {
height: 1px;
background: @splash-radial;
margin: @normal-spacing 0;
}
.horizontal-container {
padding: @normal-spacing 0;
}
.moonless-night {
.horizontal-rule {
background: @lighter-splash-radial;
}
}
</style>
8 changes: 0 additions & 8 deletions components/ui/Scroll/Scroll.html

This file was deleted.

15 changes: 0 additions & 15 deletions components/ui/Scroll/Scroll.less

This file was deleted.

73 changes: 0 additions & 73 deletions components/ui/Scroll/Scroll.vue

This file was deleted.

3 changes: 2 additions & 1 deletion components/ui/SimpleScroll/SimpleScroll.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
.wrapper {
pointer-events: auto;
width: @full;
height: @full;
height: fit-content;
ThomBos marked this conversation as resolved.
Show resolved Hide resolved
height: -moz-fit-content;
margin: auto;
position: relative;
white-space: normal;
Expand Down
10 changes: 5 additions & 5 deletions components/ui/VerticalRule/VerticalRule.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="vertical-rule">
<div />
<div class="vertical-container">
<div class="vertical-rule" />
</div>
</template>
<script lang="ts">
Expand All @@ -9,12 +9,12 @@ import Vue from 'vue'
export default Vue.extend({})
</script>
<style scoped lang="less">
div {
.vertical-rule {
width: 1px;
height: 40px;
background: @splash-radial;
}
div.vertical-rule {
margin: 0 @normal-spacing;
.vertical-container {
padding: 0 @normal-spacing;
}
</style>
9 changes: 2 additions & 7 deletions components/views/marketplace/Marketplace.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,11 @@
</InteractablesButtonGroup>
</div>
<div class="listing-panel">
<UiScroll
verticalScroll
scrollbarVisibility="scroll"
enableWrap
noPadding
>
<UiSimpleScroll scrollMode="vertical" scrollShow="scroll">
<MarketplaceListing v-if="subject==='Themes'" />
<MarketplaceGlyphs v-if="subject==='Glyphs'" />
<MarketplaceNfts v-if="subject==='NFTs'" />
</UiScroll>
</UiSimpleScroll>
</div>
</swiper-slide>
</swiper>
Expand Down
15 changes: 13 additions & 2 deletions components/views/navigation/mobile/sidebar/sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@
v-scroll-lock="true"
class="scrolling hidden-scroll users"
>
<UiSimpleScroll scroll-mode="vertical" scroll-show="scroll">
<UiSimpleScroll
scroll-mode="vertical"
scroll-show="scroll"
:container-class="isNoFriends ? 'no-friends-scrollbar' : ''"
>
<UiLoadersAddress
v-if="dataState.friends === DataStateType.Loading"
:count="4"
Expand Down Expand Up @@ -318,13 +322,20 @@ export default Vue.extend({
top: 2.5rem;
right: 1rem;
}

#simple-scrollbar.no-friend-scrollbar {
display: flex;
align-items: center;
}

.no-friends {
&:extend(.full-width);
display: inline-flex;
justify-content: center;
flex-direction: column;
align-items: center;
height: calc(100% - @sidebar-inner-offset);
height: @full;
padding-bottom: @xlarge-spacing;

.button {
margin-top: @normal-spacing;
Expand Down
Loading