Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/bumpy-ties-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@platforma-open/milaboratories.graph-maker.model': patch
'@platforma-open/milaboratories.graph-maker.ui': patch
---

fix loading
4 changes: 2 additions & 2 deletions model/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const platforma = BlockModel.create('Heavy')
.withUiState<UiState>({ graphs: [] })
.withArgs<BlockArgs>({})

.sections((ctx: RenderCtx<any, any>) => {
.sections((ctx) => {
const graphRoutes = (ctx.uiState?.graphs ?? []).map((gs: GraphPageState) => ({
type: 'link' as const,
href: `/graph?id=${gs.id}` as const,
Expand All @@ -40,7 +40,7 @@ export const platforma = BlockModel.create('Heavy')
];
})

.outputWithStatus('pFrame', (ctx) => {
.output('pFrame', (ctx) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Changing from outputWithStatus to output seems to be the root cause for the complex caching logic and potential error-hiding in GraphPage.vue. While this might fix the 'unstable loading', it loses the error and stability status that outputWithStatus provides.

Have you considered keeping outputWithStatus and instead adjusting the UI to correctly handle the stable and ok flags from the OutputWithStatus object? This would likely be a more robust solution that doesn't hide computation errors from the user.

return createPFrameForGraphs(ctx);
})
.done(2);
Expand Down
Loading