Skip to content

Commit

Permalink
Add tooltip to expand/collapse toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
WarmCyan committed Aug 21, 2023
1 parent ca656ff commit a5a485e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
* Data column sorting not working.
* Needing to render the notebook's first model view cell twice for ipyvuetify
stylesheets to propagate.



Expand Down
16 changes: 15 additions & 1 deletion icat/anchorlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,23 @@ def __init__(
x_small=True,
plain=True,
children=[v.Icon(children=["mdi-expand-all"])],
v_on="tooltip.on",
)
self.expand_toggle.on_event("click", self._handle_ipv_expand_toggle_click)

self.expand_toggle_tooltip = v.Tooltip(
top=True,
open_delay=500,
v_slots=[
{
"name": "activator",
"variable": "tooltip",
"children": self.expand_toggle,
}
],
children=["Collapse/expand all."],
)

# creating objects for adding new anchors to list
self.dictionary_button = pn.widgets.Button(
name="Add Dictionary Anchor",
Expand All @@ -270,7 +284,7 @@ def __init__(

self.layout = pn.Column(
pn.Row(
self.expand_toggle,
self.expand_toggle_tooltip,
self.dictionary_button,
self.tfidf_button,
self.similarity_button,
Expand Down

0 comments on commit a5a485e

Please sign in to comment.