Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Apr 9, 2020

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.

@Hixie
Copy link
Contributor Author

Hixie commented Apr 9, 2020

cc @CaseyHillers @yjbanov

@Hixie Hixie force-pushed the lattice branch 5 times, most recently from 49ffa8f to 42ac997 Compare April 9, 2020 06:23
Copy link
Contributor

@CaseyHillers CaseyHillers left a 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:

  1. Seems like web image is showing the canvaskit version everytime (using fake data). I didn't try this in release mode.
  2. 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.
  3. Dart docs and documenting some of the more complex logic in lattice.
  4. Looks like StatusGrid needs a golden image update

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

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 :)

Copy link
Contributor

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)?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

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 🤷‍♂️

Copy link
Contributor Author

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 :-(

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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 :)

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added docs.

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Hixie
Copy link
Contributor Author

Hixie commented Apr 9, 2020

Just a note, the lattice render object code is out of scope for my review. Maybe @yjbanov can review it?

@goderbauer may also be interested in it.

  1. Seems like web image is showing the canvaskit version everytime (using fake data). I didn't try this in release mode.

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.

  1. 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.

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?

  1. Dart docs and documenting some of the more complex logic in lattice.

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. :-)

  1. Looks like StatusGrid needs a golden image update

Roger.

@Hixie Hixie force-pushed the lattice branch 3 times, most recently from b6ff5aa to f96bc86 Compare April 9, 2020 22:47
@Hixie
Copy link
Contributor Author

Hixie commented Apr 9, 2020

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?

I went with a slowly pulsating circle, seems pretty good.

@Hixie
Copy link
Contributor Author

Hixie commented Apr 9, 2020

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.

Copy link
Member

@goderbauer goderbauer left a 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

Copy link
Member

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)

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

nit: /// -> //

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

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 :(

Copy link
Contributor Author

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.

Copy link
Member

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).

Copy link
Contributor

@CaseyHillers CaseyHillers left a 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!

Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor

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 :)

Copy link
Contributor

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

@Hixie Hixie force-pushed the lattice branch 3 times, most recently from f93d175 to dc02700 Compare April 10, 2020 05:04
@Hixie Hixie merged commit 05e3d65 into flutter:master Apr 10, 2020
@Hixie Hixie deleted the lattice branch April 10, 2020 23:43
@Piinks Piinks mentioned this pull request Jun 13, 2023
8 tasks
auto-submit bot pushed a commit that referenced this pull request Jun 13, 2023
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.
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.

4 participants