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

Try to reload a notebook editor when its viewtype is installed or enabled #180191

Closed
bpasero opened this issue Apr 18, 2023 · 4 comments
Closed
Assignees
Labels
notebook polish Cleanup and polish issue
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 18, 2023

Related to #179224

Enabling a notebook extension should ideally reload the editor with that view type without having to jump to another editor and back:

Recording 2023-04-18 at 09 35 25

@rebornix rebornix added the polish Cleanup and polish issue label Apr 19, 2023
@rebornix rebornix added this to the April 2023 milestone Apr 19, 2023
@rebornix
Copy link
Member

rebornix commented Apr 19, 2023

In this scenario:

  • Open NotebookEditorInput, it doesn't resolve and throw an error with actions
  • Actions are rendered now in a Placeholder editor
  • Serializer enabled, editor/view type provider registered

I'm not sure where is the best place to register the view type listener. IMHO we should register this in notebook land, but I'm a bit unclear of the lifecyles of the viewmodel/models:

  • NotebookEditor is disposed after the error is thrown and it's replaced by the Placeholder Editor
  • NotebookEditorInput is still alive (I guess?) but it's weird to have a listener inside it and trigger an editor reopen. Opening an editor from an editor input doesn't feel right

@bpasero any suggestion?

@bpasero
Copy link
Member Author

bpasero commented Apr 19, 2023

@rebornix this flow seems to actually work fine when I use the button in the placeholder editor:

Recording 2023-04-19 at 08 23 28

Given that, I am fine closing this as out of scope for now given it will not be the primary interaction from the user most likely.

I notice however, that when the extension is not installed, you briefly switch to the extension editor and then back to the notebook, I wonder if that flow can be made smoother.

@bpasero
Copy link
Member Author

bpasero commented Apr 19, 2023

Hm, actually it may be nice to show the extension to the user so that the user gets to see what is being installed. Maybe we just leave it like this!

Recording 2023-04-19 at 08 26 21

@rebornix
Copy link
Member

@bpasero yeah that's the default experience of Install Recommended Extension. It gives users more awareness what's being installed.

Let's close this for now and see if we want to improve this later.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
notebook polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

2 participants