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

feat(mainHeader): make the user menu panel always open to the left #691

Merged
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
3 changes: 2 additions & 1 deletion frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"conventionalCommits.scopes": [
"i18n",
"vscode",
"eslint"
"eslint",
"mainHeader"
],
"editor.rulers": [
80,
Expand Down
14 changes: 10 additions & 4 deletions frontend/components/bc/header/MainHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,13 @@ const userMenu = computed(() => {
/>
</BcLink>
</div>
<div
v-else-if="!isSmallScreen"
class="user-menu"
>
<div v-else-if="!isSmallScreen" class="user-menu">
<BcDropdown
:options="userMenu"
variant="header"
option-label="label"
class="menu-component"
panel-class="user-menu-panel"
>
<template #value>
<FontAwesomeIcon
Expand Down Expand Up @@ -378,6 +376,14 @@ $smallHeaderThreshold: 1024px;
}
}
}
:global(.user-menu-panel) {
// hack: panel should always get opened to the left, but this is not possible with component props
$widthThePanelHasEnoughSpaceToOpenToTheRight: 1558px;
$widthOfUserMenu: 43px;
@media screen and (min-width: $widthThePanelHasEnoughSpaceToOpenToTheRight) {
translate: calc(-100% + $widthOfUserMenu);
}
}
.burger {
height: 24px;
cursor: pointer;
Expand Down
Loading