Skip to content

[Bug] Cell toolbar hidden by the input footer's toolbar during a diff - #92

Open
Zsailer wants to merge 1 commit into
jupyter-ai-contrib:mainfrom
Zsailer:fix/cell-toolbar-hidden-by-footer
Open

Zsailer wants to merge 1 commit into
jupyter-ai-contrib:mainfrom
Zsailer:fix/cell-toolbar-hidden-by-footer

Conversation

@Zsailer

@Zsailer Zsailer commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

While a cell diff is active, the extension hides the cell's own toolbar so it doesn't overlap the diff view. The lookup matched jp-toolbar anywhere under the cell node — but the cell input footer renders its own <jp-toolbar>, so any toolbar mounted there (e.g. footer action buttons) got hidden along with the cell toolbar.

Fix: scope the lookup to <jp-toolbar> elements that aren't inside a .jp-cellfooter, via a small _cellToolbar() helper used by both hideCellToolbar and showCellToolbar.

While a diff is active we hide the cell's own toolbar so it doesn't overlap the
diff. JupyterLab renders both the cell toolbar and the diff footer's toolbar as
<jp-toolbar>, so the bare selector was also matching the footer and hiding the
Accept/Reject buttons. Scope the lookup to toolbars not inside a .jp-cellfooter.
@Zsailer Zsailer added the bug Something isn't working label Sep 16, 2026
@Zsailer
Zsailer marked this pull request as ready for review September 16, 2026 15:47
@brichet

brichet commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Zsailer.

Could we use the .jp-cell-toolbar class instead of .jp-toolbar ?
It should retrieve the expected toolbar, except if the footer toolbar uses the same class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants