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
SceneFlexLayout: Add support for lazy-loading #153
base: main
Are you sure you want to change the base?
Conversation
Ah, this is something I wanted to point out in one of the feedback threads I posted. Given a multi-page, multi-tab, and a drill-down, the bundle went to ~ 500kb. But we don't need to load everything until the user accesses that area, so lazy loading is more than welcomed. |
@@ -86,13 +91,14 @@ interface SceneFlexItemState extends SceneFlexItemPlacement, SceneObjectState { | |||
|
|||
interface SceneFlexItemRenderProps<T> extends SceneComponentProps<T> { | |||
parentDirection?: CSSProperties['flexDirection']; | |||
isLazy?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { getQueryRunnerWithRandomWalkQuery, getEmbeddedSceneDefaults } from './utils'; | ||
import { DebugItem } from './flexLayout'; | ||
|
||
export function getLazyFlexDemo(defaults: SceneAppPageState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get this demo show the lazy loading. So i've tried panel repeater demo with ridiculous 100 repeats and it seems like that demo doesn't render the timeseries viz anymore.
Leaving this as a draft because I have the feeling there are some edge-cases where this breaks down, but it's at least a start.