-
Notifications
You must be signed in to change notification settings - Fork 892
Combine "Variables" & "Data Sources" panels into "Variables & Data Sources" panel #7459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7e02ed9 to
c67cc48
Compare
c67cc48 to
3978c29
Compare
3978c29 to
ac2b2d0
Compare
7ea9b6d to
822c42e
Compare
822c42e to
a0bca62
Compare
|
My only thought is for users who refer to data sources constantly, keeping it closed every time the panel is opened wouldn't be great. We could store it's state in local storage? |
| const variables = useVariables(); | ||
| const cellIds = useCellIds(); | ||
| const datasets = useDatasets(); | ||
| const [openSections, setOpenSections] = useState<string[]>(["variables"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to store this in localstorage. i (n=1) use datasources much more than the variables
8b598e7 to
c299d07
Compare
a0bca62 to
17ca970
Compare
| Icon: DatabaseIcon, | ||
| tooltip: "Explore data sources", | ||
| Icon: VariableIcon, | ||
| tooltip: "Explore session", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will make using the command palette much harder (since you cannot search variables or datasources to find this panel)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is Explore variables and datasources too verbose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to have a follow up PR for the commandn palette? I updated the tooltip to "Explore variables and datasources"
17ca970 to
e7a4a44
Compare
c299d07 to
9f2f110
Compare
9f2f110 to
775038e
Compare
e7a4a44 to
8ceb948
Compare
8ceb948 to
b5b1403
Compare
775038e to
8743f2d
Compare
87917dd to
c8e1450
Compare
789cefd to
136e69c
Compare
The footer now has a single button to toggle the developer panel. It shows a terminal icon normally, or an error icon with count when there are errors. Either way, clicking toggles the panel. The developer panel's Errors tab shows a red dot indicator when there are errors, even when viewing other tabs. Add spacing to developer button
The kernel health indicator has moved from the footer into the developer panel header, next to the tabs. This keeps the footer minimal while still making health status accessible when debugging.
These changes introduce a new "Session" panel that combines what were previously separate "Variables" and "Data Sources" panels into a single view with collapsible accordion sections. Data Sources appears first and is collapsed by default, showing a badge with the count when collapsed. Variables is expanded by default. This reduces sidebar icon count while keeping both features easily accessible.
136e69c to
7ab9040
Compare
7ab9040 to
307e851
Compare
63e210c to
ebd354a
Compare
| import { useVariables } from "@/core/variables/state"; | ||
| import { jotaiJsonStorage } from "@/utils/storage/jotai"; | ||
|
|
||
| const openSectionsAtom = atomWithStorage<string[]>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this could be typesafe strings
|
|
||
| const { isFetching, error, data, refetch } = useAsyncData(async () => { | ||
| if (connection !== WebSocketState.OPEN) { | ||
| store.set(connectionStatusAtom, "disconnected"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than gabbing the store, could we use useSetAtom?
| const sidebarRef = React.useRef<ImperativePanelHandle>(null); | ||
| const terminalRef = React.useRef<ImperativePanelHandle>(null); | ||
| const { aiPanelTab, setAiPanelTab } = useAiPanelTab(); | ||
| const errorCount = useAtomValue(cellErrorCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if its possible to push this down, but errors will create re-renders here (but they are really cheap)
Persist open/closed section state in localStorage so users don't need to re-open data sources each time. Update tooltip to "Explore variables and data sources" for command palette discoverability.
ebd354a to
da5f272
Compare
These changes introduce a new "Session" panel that combines what were previously separate "Variables" and "Data Sources" panels into a single view with collapsible accordion sections. Data Sources appears first and is collapsed by default, showing a badge with the count when collapsed. Variables is expanded by default. This reduces sidebar icon count while keeping both features easily accessible.