feat: replace text buttons with icons (tooltip on hover)

Replaces the two visible 'button-like' affordances with LabIcon glyphs
so the sidebar and toolbar stay compact; the explanatory text moves
to the hover tooltip.

Changes:
- Toolbar 'Save Snapshot' button: text label -> saveIcon (floppy),
  tooltip '保存当前 notebook 为快照'
- Sidebar panel '快照历史' text label -> saveIcon + caption='快照历史'
  (the panel tab is now icon-only)
- Sidebar refresh button: text -> refreshIcon with a 1s rotate animation
  while loading

Dependencies:
- Adds @jupyterlab/ui-components to package.json (source of the
  standard LabIcon set: saveIcon, refreshIcon, historyIcon)

Style:
- New .jp-snapshot-panel-refresh-button sizing (28x24 fixed box,
  centered icon) and .is-loading spin keyframes
- @keyframes jp-snapshot-spin applied to the icon's .jp-Icon element

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-21 18:41:01 +08:00
co-authored by Claude
parent 2fc584d70f
commit 263232bea4
6 changed files with 45 additions and 11 deletions
+2 -1
View File
@@ -2785,7 +2785,7 @@ __metadata:
languageName: node
linkType: hard
"@jupyterlab/ui-components@npm:^4.6.1":
"@jupyterlab/ui-components@npm:^4.0.0, @jupyterlab/ui-components@npm:^4.6.1":
version: 4.6.1
resolution: "@jupyterlab/ui-components@npm:4.6.1"
dependencies:
@@ -9222,6 +9222,7 @@ __metadata:
"@jupyterlab/settingregistry": ^4.0.0
"@jupyterlab/testing": ^4.6.1
"@jupyterlab/testutils": ^4.0.0
"@jupyterlab/ui-components": ^4.0.0
"@lumino/signaling": ^2.0.0
"@lumino/widgets": ^2.0.0
"@module-federation/runtime-tools": ^2.0.0