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

[stable7] make navigation-collapsible always visible #4161

Merged
merged 2 commits into from May 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 2 additions & 35 deletions src/components/NcAppNavigationItem/NcAppNavigationItem.vue
Expand Up @@ -259,7 +259,6 @@ Just set the `pinned` prop.
:to="to"
:exact="isRouterLink ? exact : null">
<div :class="{
'app-navigation-entry--no-icon': !isIconShown,
'app-navigation-entry--editing': editingActive,
'app-navigation-entry--deleted': undo,
'active': isActive && to,
Expand All @@ -280,10 +279,10 @@ Just set the `pinned` prop.

<!-- icon if not collapsible -->
<!-- never show the icon over the collapsible if mobile -->
<div :class="{ [icon]: icon && isIconShown }"
<div :class="{ [icon]: icon }"
class="app-navigation-entry-icon">
<NcLoadingIcon v-if="loading" />
<slot v-else-if="isIconShown" name="icon" />
<slot v-else name="icon" />
</div>
<span v-if="!editingActive" class="app-navigation-entry__title">
{{ nameTitleFallback }}
Expand Down Expand Up @@ -624,13 +623,6 @@ export default {
return this.allowCollapse && !!this.$slots.default
},

// is the icon shown?
// we don't show it on mobile if the entry is collapsible
// we show the collapse toggle directly!
isIconShown() {
return !this.collapsible || (this.collapsible && !this.isMobile)
},

// Checks if the component is already a children of another
// instance of AppNavigationItem
canHaveChildren() {
Expand Down Expand Up @@ -921,31 +913,6 @@ export default {
}
}

/* Makes the icon of the collapsible element disappear
* When hovering on the root element
*/
.app-navigation-entry--collapsible {
// hides the triangle button
.icon-collapse {
display: none;
}
&.app-navigation-entry--no-icon,
&:hover, &:focus {
a .app-navigation-entry-icon {
visibility: visible;
}
.icon-collapse {
// shows the triangle button
display: initial;
}
// prevent the icon of children elements from being hidden
// by the previous rule
.app-navigation-entry__children li:not(.app-navigation-entry--collapsible) a :first-child {
visibility: visible;
}
}
}

/* counter and actions */
.app-navigation-entry__utils {
display: flex;
Expand Down