-
-
Notifications
You must be signed in to change notification settings - Fork 592
XWIKI-22485: Livedata option dropdown has no grouping semantics #3662
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
Changes from 2 commits
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 |
---|---|---|
|
@@ -47,47 +47,42 @@ | |
<ul class="dropdown-menu dropdown-menu-right"> | ||
|
||
<!-- Actions --> | ||
<li class="dropdown-header">{{ $t('livedata.dropdownMenu.actions') }}</li> | ||
|
||
<li> | ||
<!-- Refresh --> | ||
<a href="#" @click.prevent="logic.updateEntries()" class="livedata-action-refresh"> | ||
<XWikiIcon :icon-descriptor="{name: 'repeat'}" /> | ||
{{ $t('livedata.action.refresh') }} | ||
</a> | ||
</li> | ||
|
||
<li><span class="dropdown-header">{{ $t('livedata.dropdownMenu.actions') }}</span><ul> | ||
<li> | ||
<!-- Refresh --> | ||
<a href="#" @click.prevent="logic.updateEntries()" class="livedata-action-refresh"> | ||
<XWikiIcon :icon-descriptor="{name: 'repeat'}" /> | ||
{{ $t('livedata.action.refresh') }} | ||
</a> | ||
</li> | ||
</ul></li> | ||
|
||
<!-- Layouts --> | ||
<li role="separator" class="divider"></li> | ||
|
||
<li class="dropdown-header">{{ $t('livedata.dropdownMenu.layouts') }}</li> | ||
|
||
<!-- Layout options --> | ||
<li | ||
v-for="layout in data.meta.layouts" | ||
:key="layout.id" | ||
:class="{ | ||
'disabled': isCurrentLayout(layout.id), | ||
}" | ||
> | ||
<a href="#" @click.prevent="changeLayout(layout.id)"> | ||
<XWikiIcon :icon-descriptor="layout.icon"></XWikiIcon> | ||
{{ layout.name }} | ||
</a> | ||
</li> | ||
<li><span class="dropdown-header">{{ $t('livedata.dropdownMenu.layouts') }}</span><ul> | ||
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. Same question as https://github.com/xwiki/xwiki-platform/pull/3662/files#r1853982643 here too 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. Done in 53d85de 👍 |
||
<!-- Layout options --> | ||
<li | ||
v-for="layout in data.meta.layouts" | ||
:key="layout.id" | ||
:class="{ | ||
'disabled': isCurrentLayout(layout.id), | ||
}" | ||
> | ||
<a href="#" @click.prevent="changeLayout(layout.id)"> | ||
<XWikiIcon :icon-descriptor="layout.icon"></XWikiIcon> | ||
{{ layout.name }} | ||
</a> | ||
</li> | ||
</ul></li> | ||
|
||
<!-- Panels --> | ||
<li role="separator" class="divider"></li> | ||
|
||
<li class="dropdown-header">{{ $t('livedata.dropdownMenu.panels') }}</li> | ||
|
||
<li v-for="panel in logic.panels" :key="panel.id"> | ||
<a href="#" @click.prevent="logic.uniqueArrayToggle(logic.openedPanels, panel.id)"> | ||
<XWikiIcon :icon-descriptor="{name: panel.icon}"/> | ||
{{ panel.name }} | ||
</a> | ||
</li> | ||
<li><span class="dropdown-header">{{ $t('livedata.dropdownMenu.panels') }}</span><ul> | ||
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. that part could be indented as well. 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. Addressed in 3cb1436 👍 |
||
<li v-for="panel in logic.panels" :key="panel.id"> | ||
<a href="#" @click.prevent="logic.uniqueArrayToggle(logic.openedPanels, panel.id)"> | ||
<XWikiIcon :icon-descriptor="{name: panel.icon}"/> | ||
{{ panel.name }} | ||
</a> | ||
</li> | ||
</ul></li> | ||
|
||
</ul> | ||
|
||
|
@@ -130,7 +125,7 @@ export default { | |
<style> | ||
|
||
.livedata-dropdown-menu { | ||
// Similar to .flat-buttons() | ||
/* Similar to .flat-buttons() */ | ||
.btn-default { | ||
background-color: @breadcrumb-bg; | ||
background-image: none; | ||
|
@@ -143,6 +138,12 @@ export default { | |
.btn-default:hover, .btn-default:active, .btn-default:focus, .open .dropdown-toggle { | ||
border-color: darken(@dropdown-divider-bg, 10%); | ||
} | ||
|
||
/* Style each section of the dropdown */ | ||
ul.dropdown-menu > li > ul { | ||
list-style: none; | ||
padding-left: 0; | ||
} | ||
} | ||
|
||
.livedata-dropdown-menu .btn-default span { | ||
|
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.
WDYT of indenting the new
ul
block?Uh oh!
There was an error while loading. Please reload this page.
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.
Done in 53d85de 👍
I indented only once for the
<li><ul>
blocks though.In order to avoid making code review more difficult for barely any reason, I try to not add indentation at first on code blocks where it looks okayish without it.
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.
Go ahead with the right formatting.