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

Settings menu & UX improvements #5029

Open
wants to merge 31 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9a75cd0
Implement settings section sorting
kommunarr Apr 24, 2024
569f561
Make IS_ELECTRON property used directly
kommunarr Apr 24, 2024
edafe33
Implement settings menu with icons
kommunarr Apr 25, 2024
97a5c73
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 25, 2024
f4d8648
Implement short labels and fallback to longer label when translation …
kommunarr Apr 26, 2024
8135ff2
Implement dynamic scroll-based underlining of active section
kommunarr Apr 26, 2024
e9c527a
Ensure General Settings is always first, ignoring sorting
kommunarr Apr 26, 2024
e16b372
Styling & documentation improvements; remove problematized Hot Pink l…
kommunarr Apr 27, 2024
5bbc41a
Implement bare minimum mobile styling
kommunarr Apr 27, 2024
5eaf469
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 27, 2024
9097768
Increase link padding
kommunarr Apr 27, 2024
02567db
Fix underline to be equal on both sides
kommunarr Apr 27, 2024
938b40d
Update to have first section active by default
kommunarr Apr 27, 2024
1d88d64
Make constant for 'active' class name
kommunarr Apr 27, 2024
a2f346e
Replace proxy icon with more fitting one
kommunarr Apr 27, 2024
6df5ac1
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 30, 2024
faa920d
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 2, 2024
c59b9a8
Merge branch 'development' into feat/add-settings-menu
kommunarr May 4, 2024
bb0a3d7
Move shortTitle logic
kommunarr May 14, 2024
94d403a
Update scrolling logic to not use anchor links
kommunarr May 14, 2024
9e9a07a
Implement mobile view for Settings Menu
kommunarr May 15, 2024
1408a44
Replace rounded corners and move section titles to the interior
kommunarr May 17, 2024
31112da
Update font sizes and breakpoints to work for all supported devices &…
kommunarr May 20, 2024
dcdd170
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 22, 2024
de6b2fe
Update as per review comments
kommunarr May 25, 2024
a07bafc
Make class-specific constants declared in file
kommunarr May 25, 2024
c7479b6
Update settings menu link sizing to be dynamic to better accommodate …
kommunarr May 30, 2024
745b222
Focus active menu on mobile close
kommunarr May 31, 2024
08a22be
Replace shortTitle with title, & replace EN-US labels with shorter forms
kommunarr Jun 4, 2024
7108cea
Update menu font size for mobile devices
kommunarr Jun 7, 2024
cf784d7
Merge branch 'development' into feat/add-settings-menu
kommunarr Jun 12, 2024
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
125 changes: 125 additions & 0 deletions src/renderer/components/ft-settings-menu/ft-settings-menu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
.settingsMenu {
/* top nav + margin */
inset-block-start: 96px;
position: sticky;
display: flex;
flex-direction: column;
padding-inline-start: 0;
block-size: calc(85vh - 96px);
max-block-size: 600px;
}

.header {
inline-size: fit-content;
margin-block: 0 10px;
}

.title {
text-decoration: none;
color: var(--tertiary-text-color);
inline-size: 220px;
flex: 1 1 auto;
display: flex;
align-items: center;
}

/* prevent hover styling from showing on title click for mobile */
@media (hover: hover) {
.title:hover {
color: var(--primary-text-color);
}
}

.titleContent {
inline-size: fit-content;
max-inline-size: 100%;
}


.iconAndTitleText {
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;

/* needed to have underline poke out */
margin-inline-start: 3px;
}

.titleUnderline {
/* have underline poke out */
inline-size: calc(100% + 6px);

/* prevent "active" border from visibly pushing the content up */
border-block-end: 4px solid transparent;
}

@media only screen and (width >= 1015px) {
.settingsMenu {
margin-block: 0;
font-size: 16px;
}

.header {
margin-block-start: 10px;
font-size: 26px;
}

.titleIcon {
inline-size: 16px;
block-size: 16px;
}

.title.active {
color: var(--primary-text-color);
font-weight: 600;
}

.title.active .titleUnderline {
border-block-end: 4px solid var(--primary-color);
}
}

/* overall mobile breakpoint; large text */
@media only screen and (width <= 1015px) {
.settingsMenu {
inline-size: fit-content;
margin-inline: auto;
position: relative;
inset-block-start: 0;
font-size: 30px;
max-block-size: 1100px;
}

.titleIcon {
inline-size: 30px;
block-size: 30px;
margin-inline-end: 10px;
}

.title {
inline-size: fit-content;
max-inline-size: 90vw;
}

.header {
font-size: 32px;
}
}

/* small height or width mobile breakpoint; intermediary text */
@media only screen and (width <= 1015px) and (height <= 830px),
only screen and (width <= 500px) {
.settingsMenu {
font-size: 25px;
}

.titleIcon {
inline-size: 25px;
block-size: 25px;
margin-inline-end: 5px;
}

.header {
font-size: 25px;
}
}
17 changes: 17 additions & 0 deletions src/renderer/components/ft-settings-menu/ft-settings-menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineComponent } from 'vue'

export default defineComponent({
name: 'FtSettingsMenu',
props: {
settingsSections: {
type: Array,
required: true
},
},
emits: ['navigate-to-section'],
methods: {
goToSettingsSection: function (sectionType) {
this.$emit('navigate-to-section', sectionType)
}
}
})
32 changes: 32 additions & 0 deletions src/renderer/components/ft-settings-menu/ft-settings-menu.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<menu
class="settingsMenu"
>
<h2 class="header">
{{ $t('Settings.Settings') }}
</h2>
<a
v-for="(settingsSection) in settingsSections"
:id="settingsSection.type"
:key="settingsSection.type + '-link'"
class="title"
href="javascript:;"
@click.stop="goToSettingsSection(settingsSection.type)"
@keydown.enter.stop="goToSettingsSection(settingsSection.type)"
>
<div class="titleContent">
<div class="iconAndTitleText">
<font-awesome-icon
:icon="['fas', settingsSection.icon]"
class="titleIcon"
/>
{{ settingsSection.title }}
</div>
<div class="titleUnderline" />
</div>
</a>
</menu>
</template>

<script src="./ft-settings-menu.js" />
<style scoped src="./ft-settings-menu.css" />
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,5 @@ export default defineComponent({
type: String,
required: true
},
},
computed: {
allSettingsSectionsExpandedByDefault: function () {
return this.$store.getters.getAllSettingsSectionsExpandedByDefault
}
}
})
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
.settingsSection {
background-color: var(--card-bg-color);
margin-block: 0;
margin-inline: auto;
inline-size: 85%;

@media only screen and (width <= 800px) {
inline-size: 100%;
}
}

&[open] {
padding-block-end: 15px;
}
.sectionHeader {
cursor: pointer;
display: block;
padding: 1px;
}

.sectionBody {
background-color: var(--card-bg-color);
padding-block: 10px;

> div {
box-sizing: border-box;
Expand All @@ -26,22 +30,9 @@
}
}

.sectionLine {
border: 0;
border-block-start: 2px solid var(--primary-color);
margin-block-start: -1px;
inline-size: 100%;
}

.sectionHeader {
cursor: pointer;
display: block;
padding: 1px;
}

.sectionTitle {
user-select: none;
margin-inline-start: 2%;
margin-inline-start: 20px;
margin-block: 0.5em;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<template>
<details
:open="allSettingsSectionsExpandedByDefault"
<div
class="settingsSection"
>
<summary class="sectionHeader">
<div class="sectionBody">
<h3 class="sectionTitle">
{{ title }}
</h3>
</summary>
<hr class="sectionLine">
<slot />
</details>
<slot />
</div>
</div>
</template>

<script src="./ft-settings-section.js" />
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/proxy-settings/proxy-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:select-names="protocolNames"
:select-values="protocolValues"
class="protocol-dropdown"
:icon="['fas', 'microchip']"
:icon="['fas', 'network-wired']"
@change="handleUpdateProxyProtocol"
/>
</ft-flex-box>
Expand Down
Loading