-
Notifications
You must be signed in to change notification settings - Fork 323
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
support custom widget entry labels #5705
Conversation
ba22b7f
to
e1f01a8
Compare
What is the status of this? CC @sylwiabr |
@Frizi ? |
26221a9
to
7a10ac9
Compare
Since last change request
|
7a10ac9
to
1f1681b
Compare
CHANGELOG.md
Outdated
@@ -111,6 +111,7 @@ | |||
- [Named arguments syntax is now recognized in IDE][5774]. Connections to | |||
function arguments will now use named argument syntax instead of inserting | |||
wildcards on all preceding arguments. | |||
- [Added more user-friendly labels to dropdown widgets.][5705] |
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.
Please make it more wordy. Explanations in changeling should be understandable by no-code users. "more user-friendly" does not tell much .
/// Delay and deduplicate the incoming events. Once an event is received, it will be emitted | ||
/// after the current program execution finishes, but before returning to the event loop. If | ||
/// multiple events are received within the same microtask, only the last one will be emitted. | ||
/// | ||
/// Use [`Network::batch`] if you want to collect all emitted values within a microtask. | ||
/// | ||
/// ```text | ||
/// Input: ───────1──2─3─────────── | ||
/// Microtasks: ── ▶──── ▶──── ▶──── ▶── | ||
/// Output: ─────────1─────3──────── | ||
/// ``` | ||
/// | ||
/// This node is useful when dealing with a diamond-shaped network, where a single source event | ||
/// is flowing into multiple subgraphs, and those subgraphs eventually merge into a single node. | ||
/// That final node would ordinarily receive multiple events for the same source event, once per | ||
/// execution of each subgraph. It is usually a waste of resources to process those intermediate | ||
/// events, and it can even lead to logical errors, as those events may contain partially | ||
/// outdated data. This node can be used to deduplicate the events and only process the most | ||
/// up-to-date one once all subgraphs have finished their execution. | ||
/// | ||
/// Example network with a diamond-shaped subgraph: | ||
/// ```text | ||
/// clickPosition | ||
/// / \ | ||
/// / \ | ||
/// posX absPosY | ||
/// \ / |
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.
these docs rock!
3b1e2e1
to
829eeb3
Compare
829eeb3
to
85af9d8
Compare
Oh, that's nice. I think we can use it to fix CB in #5770 instead of creating a 0-ms timer. @farmaazon jfyi |
@Frizi is it ready for QA? |
@sylwiabr yes, it is waiting for QA now. |
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.
QA passed
Pull Request Description
Implements #5640 and #5650
It made sense for me to implement those two together, as I wanted to make sure that the necessary widget API changes will support custom entry values for both dynamic and static data.
Important Notes
During implementation I had multiple data update order issues caused by FRP network forming a diamond shape. Two inputs that are often updated together were combined with
all
combinator, and that was further fed into the dropdown. This caused two updates to propagate through the whole network, and one of them was immediately outdated. To fix this and similar future scenarios, I've added annext_tick
FRP node. It buffers the incoming events until the next browser microtask, preserving only the last received event. Currently if it is called inside arequestAnimationFrame
callback, the effects of that processing will only be rendered in the next frame. Later this can be mitigated by delaying the rendering logic until the microtask queue is empty.Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.