Skip to content

Conversation

@aquaductape
Copy link
Contributor

Summary

Screenshots, GIFs, and Videos

@aquaductape aquaductape requested a review from a team as a code owner December 10, 2025 21:31
@linear
Copy link

linear bot commented Dec 10, 2025

@aquaductape aquaductape changed the title support previewing project block from soup and project block add preview project block from soup and project block Dec 10, 2025
const [containerRef, setContainerRef] = createSignal<HTMLDivElement>();
let scopedSplitPanelContextType: SplitPanelContextType = {} as any;
if (props.isPreviewingProject) {
const splitPanelContext = useSplitPanelOrThrow();
Copy link
Contributor

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

Copy link
Contributor Author

@aquaductape aquaductape Dec 10, 2025

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.

@gbirman
Copy link
Contributor

gbirman commented Dec 11, 2025

@aquaductape taking a look now

Copy link
Contributor

@gbirman gbirman left a 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
Image

@aquaductape aquaductape marked this pull request as draft December 23, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants