-
Notifications
You must be signed in to change notification settings - Fork 100
More efficient build dashboard #741
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
Conversation
49ffa8f to
42ac997
Compare
CaseyHillers
left a comment
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.
This is a great improvement! Much faster and feels good to run the app in dev mode :)
Just a note, the lattice render object code is out of scope for my review. Maybe @yjbanov can review it?
Some observations:
- Seems like web image is showing the canvaskit version everytime (using fake data). I didn't try this in release mode.
- The circle spinning icon for running tasks is nice, however it can be a headache when there are multiple running on the screen (team feedback). Do you have any ideas to still show some sort of motion on running tasks? Such as a dot going from side to side.
- Dart docs and documenting some of the more complex logic in lattice.
- Looks like StatusGrid needs a golden image update
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.
Seems like these helper functions should be moved into QualifiedTask
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.
done
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 can already see the 2D gradient in my head :)
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.
Is 0 transparent (no task for that cell)?
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 numbers here are the probability that it'll pick this item, so 0 means no chance
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.
added comments to this method
app_flutter/lib/state/build.dart
Outdated
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 would make a note saying that this is safe to call multiple times.
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.
done
app_flutter/lib/state/build.dart
Outdated
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.
nit: Seems weird to have _ and Internal in the same function 🤷♂️
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.
yeah, i never know how to name private internal versions of public methods like this :-(
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.
nit: SHOW might be more appropriate
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.
done
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.
Observation: The fake data is showing attempts at 0 for a lot of the task statuses.
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.
Updated this logic to have more plausible attempt counts.
app_flutter/lib/widgets/lattice.dart
Outdated
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 think this file should be split into smaller files, and just import those into this one. Such as lattice_scrollview.dart and lattice_body.dart
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 considered that but really there's only two files here, LatticeScrollView (about 120 lines) and everything else (about 750 lines), most of which is currently marked private and would have to be made public if we split it. How strongly do you feel about this?
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.
Reviewing it again, I agree with you. I wish it was smaller from a maintenance perspective, but this is fine. I just hope it can be moved into the framework :)
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.
Can you add the steps for converting List to the 2D matrix? It was in TaskMatrix and helps outline what this is doing.
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.
Added docs.
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.
With TaskMatrix gone, it might make more sense to call this TaskGrid. That would make the files a bit more cohesive for the build dashboard widgets
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.
done
@goderbauer may also be interested in it.
I made it use the avatar instead of the grey box when it fails to load the image, is that what you're seeing? I never see the images for some reason.
Ah, interesting, I didn't realize we had turned it off due to feedback, I thought it was because of performance. In the old dashboard we had a spinning square, would that work? Or maybe a pulsating circle or something?
Please leave comments on any lines you'd like docs for, I'm happy to add docs places but I have no idea what isn't obvious and what is. :-)
Roger. |
b6ff5aa to
f96bc86
Compare
I went with a slowly pulsating circle, seems pretty good. |
|
Not sure what's up with the golden image on Luci not matching, it works on my machine, and I'm pretty sure I've removed all the sources of randomness... I'll keep poking. |
goderbauer
left a comment
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 lattice stuff LGTM
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.
nit: this class stands out in this file as the only public one without docs. (not sure if we require docs in this repository)
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.
This class should be moved to its own file so it can be reused in the commit overlay too
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.
This is the commit overlay. Did you mean another overlay?
In any case, factored this out into its own file.
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.
style nit: => only if everything fits in one line: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
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.
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.
nit: /// -> //
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.
done
app_flutter/lib/widgets/lattice.dart
Outdated
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.
Not having this will break a11y scrolling on some platforms :(
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.
oh, interesting. The API docs weren't clear about that.
Actually looks like what really matters is that the render object doesn't implement showOnScreen. I've added a dummy implementation for now. It's not actually clear to me how this object should work with accessibility. I mean, it probably needs a semantic label on each LatticeCell, and the accessibility logic should probably build a ton of accessibility nodes and the performance will suck... right now it's pretty much inaccessible since it's all just a big canvas with a few random nodes in it.
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.
Oh, right. The RenderViewportBase and the RenderSingleChildViewport are using getOffsetToReveal to implement showOnScreen, but you're not subclassing from those. So, yes, as you said, you'll need to implement showOnScreen instead (which I imagine would probably use getOffsetToReveal behind the scene, though).
CaseyHillers
left a comment
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.
LGTM on the Cocoon side once the goldens are figured out. Thank you for making this change!
app_flutter/lib/widgets/pulse.dart
Outdated
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.
Can you add a quick dart doc for explaining that is used to pulsate tasks that are currently running in the TaskGrid?
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.
yup! Sorry I keep forgetting to add dartdocs to the top-level classes!
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 was thinking an icon getter so we can just called qualifiedTask.icon here. However, i'll leave it up to you :)
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.
My reasoning is it might be nice to include the icon in the task overlay
f93d175 to
dc02700
Compare
This removes the _FakeViewport from the build dashboard implementation. It was added in #741, and we think it's sole purpose was the preserve the 1D expectations of widgets in the framework like scrollbars and overscroll indicators. Since adding support for 2D in the framework, the framework has been updated so that the fake viewport should no longer be necessary. All of the tests pass, so I think this is safe to remove now that the framework is 2D compatible. This came up as a test failure in flutter/flutter#128812, where the function signature of getOffsetToReveal is being changed.
This is an incremental improvement but there's still plenty of room for making this even faster. I left TODOs where I saw places we could continue the work. I didn't do them yet because this is already a huge patch.