-
Notifications
You must be signed in to change notification settings - Fork 3
add preview project block from soup and project block #536
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
base: main
Are you sure you want to change the base?
Conversation
| const [containerRef, setContainerRef] = createSignal<HTMLDivElement>(); | ||
| let scopedSplitPanelContextType: SplitPanelContextType = {} as any; | ||
| if (props.isPreviewingProject) { | ||
| const splitPanelContext = useSplitPanelOrThrow(); |
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.
why are we doing this scoping? all the other previews don't use this
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.
Without scoping, causes infinite loop where root project Block keeps switching between initial project view and project rendered inside preview due to Project Block's updating root context in createEffect+onCleanup logic. With scoping, it only updates the context created inside PreviewPanel not the root split panel context.
createRenderEffect(() => {
const previousView = untrack(selectedView);
setSelectedView(projectId);
// ...
onCleanup(() => {
setSelectedView(previousView);
setViewDataStore(projectId, undefined);
});
});Plus scoping scopes the hotkeys to the Project Block rendered inside PreviewPanel, so when PreviewPanel is focused, jk is navigates entities inside of preview instead of root Block.
|
@aquaductape taking a look now |
gbirman
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.
issues:
- duplicate share buttons ( see below). this messed up tool bar exists for all previewed files/folders in project block because the share button will occupy full width but the filter/display buttons are only over the unified list view + we have two competing top bars. im not sure what ppl want from the ui exactly but can u sync with @synoet for what we should be doing because it's too jank atm
- can't click into project that's previewed. yes it's previewed but i may still want to open it completely. I guess this is general preview behavior so can be done in a follow up ticket: https://macro.com/app/channel/0195ceb6-ec2e-7023-80e4-6e084fa6cccd?message_id=019b0e36-c8e6-72cc-904f-16dbd09cabf2
- once preview project steals focus its very unintuitive/difficult to get the folders list back in focus so the j/k hotkeys work. like if i click back on the selected project it doesnt return focus
Summary
Screenshots, GIFs, and Videos