-
Notifications
You must be signed in to change notification settings - Fork 860
always open datasource panel initially if connection & fix styles #7718
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.
|
manzt
left a comment
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.
I like the goal here of making datasources more visible when they're relevant.
One thought on the state persistence: the hasUserInteracted flag being persisted means once a user collapses the panel, it won't ever auto-open again, right? Even in future sessions with new connections?
One idea I had was to keep open sections persistent but reset interaction tracking each session:
const openSectionsAtom = atomWithStorage<OpenSections[]>(
"marimo:session-panel:open-sections",
["variables"],
jotaiJsonStorage,
);
const hasUserInteractedAtom = atom(false); // resets each sessionAnother would be to maybe do something "smarter" and try to auto-open when new connections appear. But I'm guessing there would be some false positives with this:
interface SessionPanelState {
openSections: OpenSections[];
lastSeenConnectionCount: number;
}
// then auto-open if datasourcesCount > state.lastSeenConnectionCountNeither is blocking, just wanted to flag some more ideas.
| columnLocal: "pl-5", | ||
| columnSql: "pl-13", | ||
| columnPreview: "pl-10", | ||
| }; |
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.
Idk if relevant anywhere, but this would make this constant readonly.
| }; | |
| } as const; |
Thanks! I like this idea and a simpler default. |
📝 Summary
before

after

🔍 Description of Changes
📋 Checklist