Project

General

Profile

Actions

Feature #22159

open

Refactor Data-Explorer and renderers.tsx

Added by Lisa Knox about 2 months ago. Updated about 21 hours ago.

Status:
In Progress
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-

Description

Currently, the data-table is passed a list of UUIDs which are extracted from resources stored in the redux store. It then passes each UUID to a table row, which is then passed to renderer function for each column, which returns a connected react component that makes its own call to the redux store to get the specific value to be rendered. This adds unneeded complexity and unneeded computational overhead in extra calls to redux and extra react re-rendering checks. We should refactor so that there is one call to redux for each resource in the data table and each table cell calls a render function that only handles the styling, unless the specific contents require more complex logic to work.

Proposed steps:
  1. Convert data-table to accept an array of resource objects (as "items") instead of an array of UUIDs, and to pass each resource object (instead of the UUID) to each table row
  2. Go through each data-explorer and determine which table cells can be displayed as simple JSX vs those that must require a child component due to additional logic being necessary for rendering
  3. refactor the rendering functions to be as simple as possible, eliminating extra calls to the redux store and returning only JSX wherever possible

This should all be done with every intention of not changing what is visibly rendered to the user in any way. The result should be a faster First Contentful Paint on each render, making workbench as a whole feel snappier.


Subtasks 1 (1 open0 closed)

Task #22180: Review 22159-data-explorer-refactorIn ProgressStephen Smith11/19/2024Actions
Actions

Also available in: Atom PDF