Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions frontend/src/components/editor/actions/useNotebookActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,19 @@ export function useNotebookActions() {
icon: <PanelLeftIcon size={14} strokeWidth={1.5} />,
label: "Helper panel",
handle: NOOP_HANDLER,
dropdown: PANELS.flatMap(({ type, Icon, hidden }) => {
dropdown: PANELS.flatMap(({ type, Icon, hidden, extraDescription }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to create a lot of dropdowns (which we don't want). we should instead fire through a custom filter prop to in frontend/src/components/editor/controls/command-palette.tsx to <CommandDialog that uses these extra descriptions

Copy link
Contributor Author

@koaning koaning Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel inclined to push back a little bit, but this might just be a lack of typescript/react knowledge on my part, so feel free to push back too.

My concern is that if a user types "contextual helper" and they see "documentation" that they may experience that as a "oh, i guess this feature is not here". That's the thing I really want to prevent. I think the only way to get there is to have extra dropdown items because if we just show the "documentation" element without any matching terms the user may still get confused.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is, this is what your change is doing

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Now I understand!

if (hidden) {
return [];
}
return {
label: startCase(type),
const descriptions = extraDescription
? [...extraDescription, type]
: [type];
return descriptions.map((description) => ({
label: startCase(description),
rightElement: renderCheckboxElement(selectedPanel === type),
icon: <Icon size={14} strokeWidth={1.5} />,
handle: () => toggleApplication(type),
};
}));
}),
},

Expand Down
15 changes: 15 additions & 0 deletions frontend/src/components/editor/chrome/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface PanelDescriptor {
hidden?: boolean;
tooltip: string;
position: "sidebar" | "footer";
extraDescription?: string[];
}

export const PANELS: PanelDescriptor[] = [
Expand All @@ -49,66 +50,77 @@ export const PANELS: PanelDescriptor[] = [
Icon: FolderTreeIcon,
tooltip: "View files",
position: "sidebar",
extraDescription: ["View files"],
},
{
type: "variables",
Icon: FunctionSquareIcon,
tooltip: "Explore variables",
position: "sidebar",
extraDescription: ["Explore variables"],
},
{
type: "datasources",
Icon: DatabaseIcon,
tooltip: "Explore data sources",
position: "sidebar",
extraDescription: ["Explore data sources", "data sources"],
},
{
type: "dependencies",
Icon: NetworkIcon,
tooltip: "Explore dependencies",
position: "sidebar",
extraDescription: ["Explore dependencies"],
},
{
type: "packages",
Icon: BoxIcon,
tooltip: "Manage packages",
position: "sidebar",
extraDescription: ["Manage packages", "requirements"],
},
{
type: "outline",
Icon: ScrollTextIcon,
tooltip: "View outline",
position: "sidebar",
extraDescription: ["View outline", "Show chapter headings"],
},
{
type: "chat",
Icon: BotMessageSquareIcon,
tooltip: "Chat with AI",
position: "sidebar",
extraDescription: ["Chat with AI", "AI chat"],
},
{
type: "documentation",
Icon: TextSearchIcon,
tooltip: "View live docs",
position: "sidebar",
extraDescription: ["View live docs", "Show contextual help", "Signature"],
},
{
type: "logs",
Icon: FileTextIcon,
tooltip: "Notebook logs",
position: "sidebar",
extraDescription: ["Notebook logs"],
},
{
type: "tracing",
Icon: ActivityIcon,
tooltip: "Tracing",
position: "sidebar",
extraDescription: ["Traces"],
},
{
type: "snippets",
Icon: SquareDashedBottomCodeIcon,
tooltip: "Snippets",
position: "sidebar",
extraDescription: ["Code snippets"],
},
{
// Not supported in WebAssembly yet
Expand All @@ -117,17 +129,20 @@ export const PANELS: PanelDescriptor[] = [
tooltip: "Secrets",
hidden: isWasm(),
position: "sidebar",
extraDescription: ["Environment variables"],
},
{
type: "scratchpad",
Icon: NotebookPenIcon,
tooltip: "Scratchpad",
position: "sidebar",
extraDescription: ["Notes"],
},
{
type: "errors",
Icon: XCircleIcon,
tooltip: "View errors",
position: "footer",
extraDescription: ["View errors"],
},
];
Loading