-
Notifications
You must be signed in to change notification settings - Fork 29
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
Resize comparison table with slider #3480
Conversation
import { PlotsContainer } from '../PlotsContainer' | ||
import { PlotsState } from '../../store' | ||
|
||
export const ComparisonTableWrapper: React.FC = () => { | ||
const { nbItemsPerRow, isCollapsed, height } = useSelector( | ||
const { width, isCollapsed, height, plots } = useSelector( |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
@@ -6,6 +6,12 @@ export const withScale = (scale: number) => | |||
HTMLDivElement | |||
>) | |||
|
|||
export const withVariant = (variant: number) => |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
Sorry for the renaming, it just made more sense that way. The main parts of the change are found in |
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.
Change looks fine outside of previously mentioned issue
@@ -56,7 +56,7 @@ export type CustomPlotsOrderValue = { metric: string; param: string } | |||
export class PlotsModel extends ModelWithPersistence { | |||
private readonly experiments: Experiments | |||
|
|||
private nbItemsPerRow: Record<PlotsSection, number> | |||
private nbItemsPerRowOrWidth: Record<PlotsSection, number> |
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.
[Q] Do these need to be stored together?
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.
Was debating this, but they function the exact same way it's just that one cannot be called nbItemsPerRow
. Separating them would probably mean checking whether it has one property or another multiple times.
Code Climate has analyzed commit b524c59 and detected 7 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 86.9% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.7% (0.0% change). View more on Code Climate. |
Part of #2585
Screen.Recording.2023-03-16.at.1.04.03.PM.mov