Skip to content
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

Fix onOutput ordering w/ Conflated Renderings Changes #876

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

steve-the-edwards
Copy link
Contributor

When adding in the option to conflate renderings, we changed the order in which the StateFlow of renderings was updated and the Output was emitted.

We return now to updating the rendering StateFlow and then immediately calling onOutput.

Copy link
Contributor

@rjrjr rjrjr left a comment

Choose a reason for hiding this comment

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

LGTM with test.

@steve-the-edwards steve-the-edwards force-pushed the sedwards/fix-output-ordering branch from 2eb893b to 9d70978 Compare September 15, 2022 16:41
Comment on lines 371 to 374
public final class com/squareup/workflow1/ui/container/DialogOverlayKt {
public static final fun getOverlay (Landroid/app/Dialog;)Lcom/squareup/workflow1/ui/container/Overlay;
public static final fun getOverlayOrNull (Landroid/app/Dialog;)Lcom/squareup/workflow1/ui/container/Overlay;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rjrjr What is missing in the rebase that apiDump removed this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I never checked that the down merge was green. I think that Rick upgraded our API checker and the rules changed. This looks legit.

Copy link
Contributor

Choose a reason for hiding this comment

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

LMK if you want this fix in a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its fine. Will just merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Acutally. I'll do that other apiDump commit first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#877 for the API update.

@steve-the-edwards steve-the-edwards marked this pull request as ready for review September 15, 2022 16:51
@steve-the-edwards steve-the-edwards force-pushed the sedwards/fix-output-ordering branch from 9d70978 to 239e712 Compare September 15, 2022 18:11
@steve-the-edwards steve-the-edwards changed the base branch from main to sedwards/update-API September 15, 2022 18:11
// Only null will allow us to continue processing actions and conflating stale renderings.
// If this is not null, then we had an Output and we want to send it with the Rendering
// (stale or not).
while (actionResult == null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PTAL again @rjrjr as I changed the logic here such that if we ever had an Output we would emit the rendering and the Output so that we always satisfy the same constraints.

Copy link
Contributor

@rjrjr rjrjr Sep 15, 2022

Choose a reason for hiding this comment

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

Do we still need the enum? Seems like we're only checking is WorkflowOutput at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Though we may go back there. I'll leave the slight YAGNI in for now.

Base automatically changed from sedwards/update-API to main September 15, 2022 18:38
// Only null will allow us to continue processing actions and conflating stale renderings.
// If this is not null, then we had an Output and we want to send it with the Rendering
// (stale or not).
while (actionResult == null) {
Copy link
Contributor

@rjrjr rjrjr Sep 15, 2022

Choose a reason for hiding this comment

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

Do we still need the enum? Seems like we're only checking is WorkflowOutput at this point.

@steve-the-edwards steve-the-edwards merged commit c77a88d into main Sep 15, 2022
@steve-the-edwards steve-the-edwards deleted the sedwards/fix-output-ordering branch September 15, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants