-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Fall back to rendering cell outputs if notebook does not define servable #5802
Conversation
Looks great! Can cell outputs that are marked resizable in the original notebook also resize automatically in the template (expanding to the full width available), or do they become fixed size when dragged around? |
What happens to Markdown text cells? |
Currently nothing but we could certainly have a report mode. |
If it becomes easy to delete outputs (no idea how to achieve that), then I'd vote for keeping the Markdown output too. |
17ac2a4
to
0515ba6
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5802 +/- ##
==========================================
- Coverage 84.45% 83.96% -0.49%
==========================================
Files 299 301 +2
Lines 44677 45085 +408
==========================================
+ Hits 37730 37856 +126
- Misses 6947 7229 +282
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Dash released app studio which turns any notebook into a dashboard. It does more than you try to do here @philippjfr. |
It's a paid product, right? |
Yes, it's paid, and also apparently tied to a server: "You must be on Dash Enterprise 5.2 to access Plotly App Studio". So immediately it would seem to be locking up the app that you create to be usable only in a tiny, locked-down range of scenarios. I'd have to use it for a while to see whether it's something I'd actually consider a good idea. It's definitely carving things up in a different way than we have been. Seems like it's a mix of pn.rx, the layout mechanism in this PR, and Lumen Builder, and whether that makes sense for Plotly users depends on how well it fits in with the rest of the Dash/Plotly ecosystem. Like the mechanism in this PR, it can take a notebook you wrote and make it into an app without further coding. Then it goes further by giving you a GUI for some aspects of the app, but from that demo I can't tell whether it actually does much more than what the drag-and-drop interface in this PR already provides (in what I consider a more natural interface already). What feels constraining to me is that when you reach the limits of that GUI, I didn't see any option for programmatic control over layout and look and feel, which seems like it would irritate people who by definition can program in Python at least a bit (or they wouldn't be authoring notebooks). So apart from whether it's OSS or not, it isn't clear to me that it would be a good experience beyond the initial thrill of making an app from nothing. Plus it seems to embody a mistaken notion that there are notebooks on the one hand and apps on the other, such that the notebook can define a reactive attribute but widgets for manipulating that appear only in the separately rendered app. I think that's completely the wrong approach; even a single widget with a single output is enormously powerful in the notebook as a compact way to present and explore large numbers of options and large quantities of data. Widgets aren't just for deployed server apps! Ugh. "Tens, hundreds, sometimes thousands of lines of code to create an app like this" -- Maybe for JavaScript, but it's hard to imagine a Python app framework taking thousands of lines to make what looked like a trivially simple app. In fact, the only framework that I'd think would come close is Dash. :-) |
219191f
to
e5a88b2
Compare
Nice! After dragging around and re-arranging elements, is there a way to copy / paste / save the arrangement (as code)? |
+1. That was also my first thought. How can I better persist this and use it with |
In Discord, @jbednar pointed out here that it is saved in the metadata of the Notebook. But I don't think that info can be extracted? Maybe it is possible to use the mechanism that stores it there to also export or expose the information in a variable? Kind of like code_repr (or is it obj_repr ?) does with .controls, expressing the .controls names and values as (almost) Python code. Would that be a viable approach at all? |
Is there a plan to support full screen toggles here. I am using @MarcSkovMadsen fullscreen.py for components ? |
@philippjfr has explained further details about the implementation in Discord here and in the rest of that thread. |
This PR addresses a usability issue of Panel notebook deployments. Specifically it allows users that do not know anything about Panel to render their notebooks as apps and even re-arrange the outputs on a page. This works by adding a fallback case, when there are no servables published in the notebook, that will automatically populate the app with all cell outputs and put them inside the newly added
EditableTemplate
which will allow re-arranging the components on the page.EditableTemplate
that allows users to drag, resize and delete components