Closed interim17 closed 3 weeks ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π‘ | Statements | 66.23% (-0.03% π») |
651/983 |
π‘ | Branches | 65.73% | 94/143 |
π΄ | Functions | 34.8% (-0.3% π») |
87/250 |
π‘ | Lines | 64.56% (-0.09% π») |
581/900 |
111 tests passing in 7 suites.
Report generated by π§ͺjest coverage report action from 91f93b8abc8d99332f26123e10dbd739769dc4f2
Time estimate or Size
medium: 10-15
Problem
Closes #411
Solution
New redux actions/type/constant/state for
selectedAgent
ViewerPanel
Retrieve agent meta data via the new viewer callback
onFollowObjectChanged
and put into redux asAgentMetadata
.ModelPanel
->SidebarContents
Get metadata from state and pass it (and UIDisplayData) down to new Metadata Panel. Refactored both of these components from Classes into Functional Components, trivial because no lifecycle methods. Small tweaks to html structure and CSS
MetadataPanel
Hopefully it reads easily, is fairly self explanatory. Use helper functions and manage a few pieces of state/constants to track whether the panel is open and what it should display.
selectedAgentNotRendered
is truthy only when the agent type is a positive number, greater than the number of agents in UIDisplayData. I don't know if there are any other ways to check for an agent that exists, but has "left the simulation" that don't collide with the null state where the id is -1.Steps to Verify:
Screenshots (optional):
Thanks for contributing!