Conversation
49ffa8f to
42ac997
Compare
CaseyHillers
left a comment
There was a problem hiding this comment.
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.
Seems like these helper functions should be moved into QualifiedTask
There was a problem hiding this comment.
I can already see the 2D gradient in my head :)
There was a problem hiding this comment.
Is 0 transparent (no task for that cell)?
There was a problem hiding this comment.
the numbers here are the probability that it'll pick this item, so 0 means no chance
There was a problem hiding this comment.
added comments to this method
app_flutter/lib/state/build.dart
Outdated
There was a problem hiding this comment.
I would make a note saying that this is safe to call multiple times.
app_flutter/lib/state/build.dart
Outdated
There was a problem hiding this comment.
nit: Seems weird to have _ and Internal in the same function 🤷♂️
There was a problem hiding this comment.
yeah, i never know how to name private internal versions of public methods like this :-(
There was a problem hiding this comment.
nit: SHOW might be more appropriate
There was a problem hiding this comment.
Observation: The fake data is showing attempts at 0 for a lot of the task statuses.
There was a problem hiding this comment.
Updated this logic to have more plausible attempt counts.
app_flutter/lib/widgets/lattice.dart
Outdated
There was a problem hiding this comment.
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.
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.
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.
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.
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
@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. |
There was a problem hiding this comment.
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.
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.
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.
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.
app_flutter/lib/widgets/lattice.dart
Outdated
There was a problem hiding this comment.
Not having this will break a11y scrolling on some platforms :(
There was a problem hiding this comment.
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.
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.
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.
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.
yup! Sorry I keep forgetting to add dartdocs to the top-level classes!
There was a problem hiding this comment.
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.
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.