This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Add list support to Worker Inspector #1396
Merged
jamiebrynes7
merged 7 commits into
develop
from
feature/worker-inspector-paginated-list
Jun 17, 2020
Merged
Add list support to Worker Inspector #1396
jamiebrynes7
merged 7 commits into
develop
from
feature/worker-inspector-paginated-list
Jun 17, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
improbable-prow-robot
added
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
labels
Jun 15, 2020
improbable-prow-robot
added
A: tooling
Area: Tooling
size/L
Denotes a PR that changes 150-299 lines, ignoring generated files.
labels
Jun 15, 2020
jamiebrynes7
force-pushed
the
feature/worker-inspector-paginated-list
branch
from
June 15, 2020 16:29
1909fa0
to
8c11302
Compare
Also as a note, the elements in the list view are lazily created (rather than creating the max-per-page up front) as certain schema will cause a stack overflow. I.e. -
(This could happen with options, but we prevent recursive options for other reasons!) |
jamiebrynes7
force-pushed
the
feature/worker-inspector-paginated-list
branch
from
June 16, 2020 16:26
7374c46
to
243b7c1
Compare
improbable-prow-robot
added
size/XL
Denotes a PR that changes 300-599 lines, ignoring generated files.
and removed
size/L
Denotes a PR that changes 150-299 lines, ignoring generated files.
labels
Jun 16, 2020
improbable-prow-robot
removed
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
label
Jun 16, 2020
jamiebrynes7
force-pushed
the
feature/worker-inspector-paginated-list
branch
from
June 16, 2020 16:29
243b7c1
to
2a061cc
Compare
paulbalaji
approved these changes
Jun 17, 2020
zeroZshadow
suggested changes
Jun 17, 2020
workers/unity/Packages/io.improbable.gdk.debug/WorkerInspector/Codegen/PaginatedListView.cs
Outdated
Show resolved
Hide resolved
workers/unity/Packages/io.improbable.gdk.debug/WorkerInspector/Codegen/PaginatedListView.cs
Outdated
Show resolved
Hide resolved
workers/unity/Packages/io.improbable.gdk.debug/WorkerInspector/Codegen/PaginatedListView.cs
Outdated
Show resolved
Hide resolved
workers/unity/Packages/io.improbable.gdk.debug/WorkerInspector/Codegen/PaginatedListView.cs
Outdated
Show resolved
Hide resolved
zeroZshadow
approved these changes
Jun 17, 2020
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
improbable-prow-robot
deleted the
feature/worker-inspector-paginated-list
branch
June 17, 2020 16:58
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A: tooling
Area: Tooling
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/XL
Denotes a PR that changes 300-599 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces list support for the worker inspector by adding a
PaginatedListView<TElement, TData>
visual element for use in the worker inspector. This maintains a pool ofTElement
objects that it will reuse. By default, the number of elements per page is5
, we can tweak this pretty easily. ThePaginatedListView
accepts two closures in its constructor:Func<TElement> makeElement
. This is what the pool calls when it needs to create a new element.Action<int, TData, TElement> bindElement
. This is what is called when the list view is updating an element. Theint
parameter is the absolute position of the element in the list (i.e. - not the position in the page).The pagination handles elements being removed from the list underneath you as well as additions.
(See
CubeSpawner
component for the list)Tests