-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Moved tab rendering logic (annotations pt. 2) #500
base: feature/annotation-data
Are you sure you want to change the base?
Conversation
|
Coverage Report
File Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have one non-blocking comment about prop management. Looks good overall!
<ScatterPlotTab | ||
dataset={dataset} | ||
currentFrame={currentFrame} | ||
selectedTrack={selectedTrack} | ||
findTrack={findTrack} | ||
setFrame={setFrameAndRender} | ||
isVisible={config.openTab === TabType.SCATTER_PLOT} | ||
isPlaying={timeControls.isPlaying() || isRecording} | ||
selectedFeatureKey={featureKey} | ||
colorRampMin={colorRampMin} | ||
colorRampMax={colorRampMax} | ||
colorRamp={getColorMap(colorRampData, colorRampKey, colorRampReversed)} | ||
categoricalPalette={categoricalPalette} | ||
inRangeIds={inRangeLUT} | ||
viewerConfig={config} | ||
scatterPlotConfig={scatterPlotConfig} | ||
updateScatterPlotConfig={updateScatterPlotConfig} | ||
showAlert={showAlert} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already clean and readable, I just have a thought for future maintainability if we anticipate adding more props: would it be less error prone to group related props into a single config object instead of passing them individually?
For instance:
const scatterPlotDisplayConfig = {
dataset,
currentFrame,
...
};
const scatterPlotColorConfig = {
colorRampMin,
colorRampMax,
...
};
<ScatterPlotTab
displayConfig={scatterPlotDisplayConfig}
...
>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh, yes! We already kind of do this for the scatterPlotConfig
and viewerConfig
, but you're right that the color ramps etc. could be bundled together into an object as well. I'll open an issue ticket for this and update here. :')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened as #502
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Problem
Part 2 of ??? for #484, prototyping annotations.
This change is a simple code move, with a little extra placeholder for the annotation tab thrown in.
Estimated review size: small, <10 minutes
Solution
Type of change
Steps to Verify: