-
Notifications
You must be signed in to change notification settings - Fork 0
Switch to retentive outputs #20
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@platforma-open/milaboratories.rarefaction.model": patch | ||
| --- | ||
|
|
||
| Switch to retentive outputs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ export const model = BlockModel.create() | |
| /************************* | ||
| * OUTPUTS * | ||
| *************************/ | ||
| .outputWithStatus('graphPFrame', (ctx) => { | ||
| .retentiveOutputWithStatus('graphPFrame', (ctx) => { | ||
| const pCols = ctx.outputs?.resolve('rarefactionPFrame')?.getPColumns(); | ||
| if (pCols === undefined) { | ||
| return undefined; | ||
|
|
@@ -86,7 +86,7 @@ export const model = BlockModel.create() | |
| .output('rarefactionPFrameCols', (ctx) => { | ||
| return ctx.outputs?.resolve('rarefactionPFrame')?.getPColumns()?.map((p) => p.spec); | ||
| }) | ||
| .outputWithStatus('table', (ctx) => { | ||
| .retentiveOutputWithStatus('table', (ctx) => { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, the switch to |
||
| const cols = ctx.outputs?.resolve('rarefactionPFrame')?.getPColumns(); | ||
| if (cols === undefined) { | ||
| return undefined; | ||
|
|
||
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.
The change from
outputWithStatustoretentiveOutputWithStatusforgraphPFrameimplies that this output will now retain its last successfully computed value even if subsequent computations fail or returnundefined. Please ensure that all consumers of this output are aware of this change and handle potentially stale data appropriately. For example, if a UI component previously expected anundefinedoutput to clear its display, it might now show old data. This is a significant behavioral change that could lead to unexpected user experiences if not properly managed downstream.