Improve developer experience for notebook preview #6317
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been unable to run the Panel Preview inside my Jupyter environment for the longest time. I would get the following message:
I have found two reasons for this:
BOKEH_RESOURCES=inline jupyter lab
, this does not work the panel preview.After doing 1, I get an infinity wheel spin with a warning in the terminal
![Screenshot 2024-02-07 15 18 24](https://private-user-images.githubusercontent.com/19758978/303014610-0b675c77-8a70-4910-abfd-e1de622dc96b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxMDExMjUsIm5iZiI6MTcyMDEwMDgyNSwicGF0aCI6Ii8xOTc1ODk3OC8zMDMwMTQ2MTAtMGI2NzVjNzctOGE3MC00OTEwLWFiZmQtZTFkZTYyMmRjOTZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA0VDEzNDcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1ZGJhNjJmNGVjNTNkNDI3N2EwOTVkNDc2ZDE1YjM1YWI1MWYxYjMyOTNjOTQ1NWYxMGE1YzZhNDZmN2NkZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2IP4jN99Fc4IxKlKOja0CR4noF7po7L3SaYulZzlntk)
Therefore, I updated EXECUTION_TEMPLATE to set BOKEH_RESOURCES to 'server' if they are 'inline'. And with that, I can finally get the experience of Panel preview, like a normal user.
![Screenshot 2024-02-07 15 19 33](https://private-user-images.githubusercontent.com/19758978/303015208-ba8e4967-9a65-4e89-be8b-35e0d4281f11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxMDExMjUsIm5iZiI6MTcyMDEwMDgyNSwicGF0aCI6Ii8xOTc1ODk3OC8zMDMwMTUyMDgtYmE4ZTQ5NjctOWE2NS00ZTg5LWJlOGItMzVlMGQ0MjgxZjExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA0VDEzNDcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjN2FkM2E5MDcxODdlZTBjMTFmMWM2ZWEzZjE4NjJhOTIzY2JlNWRlNjAyN2M4Zjc2NDZiNmRlMTJhMjc0ZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.VdaEEjHO7cNfZ_vWznGl7KrxK-sBvxbip6TkPGugGHo)