Skip to content

Commit

Permalink
Improve viewer creator styling (#2743)
Browse files Browse the repository at this point in the history
* tooltip and remove divider for viewer-creator

* rely on index instead of name

* no divider on far left or between import button and next item
* achieve padding on right side of import button instead of assuming next entry
  • Loading branch information
kecnry authored Mar 8, 2024
1 parent c731eef commit b86d854
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jdaviz/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
</div>
</v-overlay>
<v-app-bar color="toolbar" dark :dense="state.settings.dense_toolbar" flat app absolute clipped-right :style="checkNotebookContext() ? 'margin-left: 1px; margin-right: 1px' : ''">
<v-toolbar-items v-for="item in state.tool_items">
<v-divider v-if="['g-data-tools', 'g-subset-tools'].indexOf(item.name) === -1" vertical style="margin: 0px 10px"></v-divider>
<v-divider v-else-if="item.name === 'g-subset-tools'" vertical style="margin: 0px 10px; border-width: 0"></v-divider>
<v-toolbar-items v-for="(item, index) in state.tool_items">
<!-- this logic assumes the first entry is g-data-tools, if that changes, this may need to be modified -->
<v-divider v-if="index > 1" vertical style="margin: 0px 10px"></v-divider>
<j-tooltip v-if="['cubeviz', 'mosviz'].indexOf(config) !== -1 && item.name == 'g-data-tools' && state.data_items.length !== 0"></j-tooltip>
<j-tooltip v-else :tipid="item.name">
<jupyter-widget :widget="item.widget" :key="item.name"></jupyter-widget>
</j-tooltip>
<v-divider v-if="item.name === 'g-data-tools'" vertical style="margin: 0px 10px; border-width: 0"></v-divider>
</v-toolbar-items>
<v-spacer></v-spacer>
<v-toolbar-items>
Expand Down
2 changes: 2 additions & 0 deletions jdaviz/components/tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const tooltips = {
'g-data-tools':
'Load data from file',
'g-viewer-creator':
'Create a new viewer',
'g-subset-tools':
'Select, create, and delete subsets',
'g-subset-mode':
Expand Down

0 comments on commit b86d854

Please sign in to comment.