-
Notifications
You must be signed in to change notification settings - Fork 37
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
Collapsing Sidebery #158
base: main
Are you sure you want to change the base?
Collapsing Sidebery #158
Changes from 3 commits
dfcf006
e7c317c
2aed5f8
ca82622
5d097df
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
@media (-moz-bool-pref: "uc.tweak.collapse-sidebery") { | ||
:root:not([customizing]):has(#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([hidden])) { | ||
--uc-sidebar-width: 256px; | ||
--uc-sidebar-collapsed-width: 48px; | ||
|
||
& #sidebar-box { | ||
position: relative; | ||
min-width: var(--uc-sidebar-collapsed-width) !important; | ||
width: var(--uc-sidebar-collapsed-width) !important; | ||
max-width: var(--uc-sidebar-width) !important; | ||
z-index: calc(var(--browser-area-z-index-tabbox, 0) + 1) !important; | ||
} | ||
|
||
& #sidebar-box[positionend] { | ||
direction: rtl; | ||
} | ||
& #sidebar-box[positionend] > * { | ||
direction: ltr; | ||
} | ||
|
||
& #sidebar-box[positionend]:-moz-locale-dir(rtl) { | ||
direction: ltr; | ||
} | ||
& #sidebar-box[positionend]:-moz-locale-dir(rtl) > * { | ||
direction: rtl; | ||
} | ||
|
||
& #sidebar-box[positionend] { | ||
& #sidebar { | ||
border-left: 1px solid var(--sidebar-border-color); | ||
} | ||
} | ||
& #sidebar-box:not([positionend]) { | ||
& #sidebar { | ||
border-right: 1px solid var(--sidebar-border-color); | ||
} | ||
} | ||
|
||
& #sidebar-header { | ||
display: none; | ||
} | ||
|
||
& #sidebar { | ||
background-color: inherit; | ||
overflow: hidden; | ||
padding-inline: 4px; | ||
width: var(--uc-sidebar-width) !important; | ||
} | ||
|
||
& #sidebar-splitter { | ||
display: none; | ||
} | ||
} | ||
|
||
:root:not([customizing]):has(#sidebar-title[value="Sidebery"]:not([hidden])), | ||
:root:not([customizing]):has(#sidebar-title[value="Tabs"]:not([hidden])) { | ||
--uc-sidebar-collapse-duration: 0ms; | ||
--uc-sidebar-collapse-delay: 0ms; | ||
--uc-sidebar-expand-duration: 100ms; | ||
--uc-sidebar-expand-delay: 400ms; | ||
|
||
& #sidebar { | ||
width: var(--uc-sidebar-collapsed-width) !important; | ||
transition-property: width; | ||
transition-duration: var(--uc-sidebar-collapse-duration); | ||
transition-delay: var(--uc-sidebar-collapse-delay); | ||
} | ||
|
||
& #sidebar-box:hover { | ||
& #sidebar-header, & #sidebar { | ||
width: var(--uc-sidebar-width) !important; | ||
transition-duration: var(--uc-sidebar-expand-duration); | ||
transition-delay: var(--uc-sidebar-expand-delay); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@-moz-document regexp("^moz-extension://.*?/sidebar/sidebar.html") { | ||
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. The contents of the collapsed file could probably just be added to the end of the 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. Merged into sidebery.css |
||
@media (max-width: 50px) { | ||
#root { | ||
--tabs-indent: unset !important; | ||
--tabs-lvl-opacity: 0 !important; | ||
} | ||
|
||
.CtxMenu[data-active="true"] { | ||
display: none; | ||
} | ||
|
||
.NavigationBar[data-layout="inline"] { | ||
& .static-btns { | ||
display: none !important; | ||
} | ||
& .nav-item[data-active="true"] { | ||
background-color: unset !important; | ||
box-shadow: unset !important; | ||
margin: auto; | ||
opacity: unset !important; | ||
position: relative !important; | ||
transform: unset !important; | ||
} | ||
} | ||
|
||
.SearchBar[data-showed="true"] { | ||
& .search-icon > svg { | ||
margin: unset !important; | ||
} | ||
& .placeholder, & .input, & .clear-btn { | ||
display: none !important; | ||
} | ||
} | ||
|
||
.ScrollBox > .scroll-container { | ||
scrollbar-width: none !important; | ||
} | ||
|
||
.Tab .fav { | ||
margin: auto !important; | ||
} | ||
|
||
.Tab .audio { | ||
top: unset !important; | ||
left: unset !important; | ||
bottom: 0; | ||
right: 0; | ||
width: 14px !important; | ||
height: 14px !important; | ||
} | ||
|
||
.Tab .t-box, | ||
.Tab .close { | ||
display: none; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
@import url("content/common.css"); | ||
@import url("content/newtab.css"); | ||
@import url("tweaks/sidebery.css") (-moz-bool-pref: "uc.tweak.theme.sidebery"); | ||
@import url("tweaks/sidebery-collapsed.css") (-moz-bool-pref: "uc.tweak.collapse-sidebery"); | ||
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. If you move the collapsed Sidebery code to the |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,61 @@ | |
"settings": { | ||
"nativeScrollbars": true, | ||
"nativeScrollbarsThin": true, | ||
"ctxMenuNative": true, | ||
"navBarLayout": "hidden", | ||
"updateSidebarTitle": true, | ||
"ctxMenuNative": false, | ||
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. Was there any specific reason to use the non-native context menu by default? I think the default option should probably be to use the native menu as it seemed to work better most of the time. 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. There is an issue with the way I use Sidebery. In any case, I have removed settings that may be specific to the way I use Sidebery. |
||
"navBarLayout": "horizontal", | ||
"navBarInline": true, | ||
"subPanelRecentlyClosedBar": false, | ||
"subPanelBookmarks": false, | ||
"subPanelHistory": false, | ||
"showNewTabBtns": true, | ||
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 would probably leave the new tab button enabled by default, as that is what Edge displays. |
||
"searchBarMode": "dynamic", | ||
"tabRmBtn": "always", | ||
"tabsRmUndoNote": false, | ||
"showNewTabBtns": true, | ||
"newTabBarPosition": "after_tabs", | ||
"moveNewTabParent": "default", | ||
"pinnedTabsPosition": "panel", | ||
"pinnedTabsList": true, | ||
"bookmarksRmUndoNote": false, | ||
"theme": "proton", | ||
"colorScheme": "ff" | ||
}, | ||
"ver": "5.1.1" | ||
} | ||
"sidebar": { | ||
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. What was the reason for adding these panels? As far as I know most of these are there by default? |
||
"nav": [ | ||
"bookmarks", | ||
"history", | ||
"tabs", | ||
"search" | ||
], | ||
"panels": { | ||
"bookmarks": { | ||
"type": 1, | ||
"id": "bookmarks", | ||
"name": "Bookmarks", | ||
"iconSVG": "icon_bookmarks", | ||
"tempMode": true, | ||
"skipOnSwitching": true, | ||
"viewMode": "tree" | ||
}, | ||
"history": { | ||
"type": 4, | ||
"id": "history", | ||
"name": "History", | ||
"color": "toolbar", | ||
"iconSVG": "icon_clock", | ||
"tempMode": true, | ||
"skipOnSwitching": true, | ||
"viewMode": "history" | ||
}, | ||
"tabs": { | ||
"type": 2, | ||
"id": "tabs", | ||
"name": "Tabs", | ||
"color": "toolbar", | ||
"iconSVG": "icon_tabs", | ||
"skipOnSwitching": false | ||
} | ||
} | ||
}, | ||
"ver": "5.2.0" | ||
} |
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.
I think it would be best to change this to use the same selector as above,
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]
as the panel name can be arbitrary based on user settings.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.
Updated