Skip to content
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

fix: Creating multiple new notebooks leading to an issue #19077

Closed
wants to merge 7 commits into from

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Dec 5, 2023

Problem

We create a new notebook on the scene mounting if the id is "new" but this doesn't work when going back and forth as the scene gets cached by some other app logic I'm not fully up to speed with.

Changes

  • Move the check into the component so that it always runs
  • Also fixes deletion logic so that the panel only select a different notebook and not opens the panel

TODO

  • Fix recursive issue - using the notebooksModel in the panelLogic causes the issue somewhere...

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

@benjackwhite benjackwhite requested a review from a team December 5, 2023 09:04
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

github-actions bot commented Dec 5, 2023

Size Change: +174 kB (+9%) 🔍

Total Size: 2.01 MB

Filename Size Change
frontend/dist/toolbar.js 2.01 MB +174 kB (+9%) 🔍

compressed-size-action

],
}),
actions({
selectNotebook: (id: string, autofocus: EditorFocusPosition | undefined = undefined) => ({ id, autofocus }),
selectNotebook: (id: string, options: { autofocus?: EditorFocusPosition; silent?: boolean } = {}) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

silent as a prop name confused me for a little bit. Wonder if there's something else we could call it or add a description for what it achieves. Maybe open or more explicitly openInSidePanel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants