-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: ui.fragment, ui.tabs, ui.tab_list, ui.tab_panels #138
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
- This way components are rendered directly - Still need to automatically wrap tables, figures, and top level to a panel to keep that behaviour Clean up a bit - it's working for a simple counter example - Still need to wrap in a panel automatically, wrap in UITable/UIFigure automatically, etc Add tabs - They work in the most basic example, but they ain't working with tables: ``` from deephaven import ui @ui.component def tab_test(): return ui.panel( ui.tabs( ui.tab_list( ui.item('Hello'), ui.item('World') ), ui.tab_panels( ui.item('Foo'), ui.item('Bar') ) ) ) tt = tab_test() ``` Clean up how objects are implicitly rendered - Add a ui.object_view to explicitly wrap an exported object in an ObjectView - ExportedObjects that are passed as children of an element are implicitly converted to an ObjectView when decoding the JSON in the WidgetHandler - Enforce no mixed panel/non-panels for the document root, as well as implicitly wrapping the root array in a panel if necessary Clean up all tests affected - They all pass again Clean up tables a bit - They now appear correctly in the Tabs component Fix issue where opening a widget twice wouldn't re-open it correctly - Wasn't memoizing the onOpen/onClose callbacks correctly in DocumentHandler Add a spec for ui.fragment and implementation - Also provided an example for it Clean up example a bit Some fixes after Don reviewing - Automatically map "string" that is set as a children in a spectrum element to a `Text` element. Makes padding more correct for buttons/tabs and things - Provide an example for Tabs - Handle object lifecycle in WidgetHandler - This will conflict with my other PR, and the two need to merge - Also need to handle how widget plugins handle the exported object. Not all objects can be copied (only Table can be), and we may also need to fetch an object twice if it's re-used.
mofojed
force-pushed
the
render-refactor
branch
from
December 13, 2023 21:39
8906510
to
fc84ae7
Compare
mattrunyon
requested changes
Dec 18, 2023
- Clean up some comments/params
- Delete object_view (wasn't being used) - Remove overflow: hidden - Other small changes
mattrunyon
requested changes
Dec 20, 2023
mattrunyon
approved these changes
Dec 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ElementView
, which was causing some issues when used within components that expected children of a certain type (such as Tabs/TabPanels/TabList from spectrum)ObjectView
only when they are rendered as children of an elementstring
type to aText
elementdisplay: contents
Tabs
/ui.tabs
ui.item
, but was annoying with setting the keys, not bothering to deviate right nowWidgetHandler
handles closing all the exported objectsTable
can be) and we may have the same object twice in a document