-
Notifications
You must be signed in to change notification settings - Fork 30
Select the number of items per row from slider #3405
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
Changes from 10 commits
dd0100b
5cbbe7c
d842ea3
5b79ecf
49ec3e4
2a5f87e
1b4a76a
38d3231
309f78d
28bf685
fbc5d26
4990930
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,7 @@ | ||
| import { VisualizationSpec } from 'react-vega' | ||
| import { Color } from '../../experiments/model/status/colors' | ||
|
|
||
| // It is easier to keep the numerical order than the alphabetical one | ||
| /* eslint-disable sort-keys-fix/sort-keys-fix */ | ||
| export const PlotNumberOfItemsPerRow = { | ||
| ONE: 1, | ||
| TWO: 2, | ||
| THREE: 3, | ||
| FOUR: 4 | ||
| } | ||
| /* eslint-enable sort-keys-fix/sort-keys-fix */ | ||
| export const DefaultNumberOfItemsPerRow = 2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Q] Should this be calculated based on the screen size?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure myself, just asking the question.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [N] Should use screaming snake case. e.g
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I got confused and was wondering about this because of other variables not using this format. Will change that.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good question. I could try this as a follow up. Currently the default vale is set in the extension, so I'd have to reset everything to undefined to then calculate it in the webview. I'd probably select the middle value by default. |
||
|
|
||
| export enum Section { | ||
| CHECKPOINT_PLOTS = 'checkpoint-plots', | ||
|
|
@@ -19,10 +11,10 @@ export enum Section { | |
| } | ||
|
|
||
| export const DEFAULT_SECTION_NB_ITEMS_PER_ROW = { | ||
| [Section.CHECKPOINT_PLOTS]: PlotNumberOfItemsPerRow.TWO, | ||
| [Section.TEMPLATE_PLOTS]: PlotNumberOfItemsPerRow.TWO, | ||
| [Section.COMPARISON_TABLE]: PlotNumberOfItemsPerRow.TWO, | ||
| [Section.CUSTOM_PLOTS]: PlotNumberOfItemsPerRow.TWO | ||
| [Section.CHECKPOINT_PLOTS]: DefaultNumberOfItemsPerRow, | ||
| [Section.TEMPLATE_PLOTS]: DefaultNumberOfItemsPerRow, | ||
| [Section.COMPARISON_TABLE]: DefaultNumberOfItemsPerRow, | ||
| [Section.CUSTOM_PLOTS]: DefaultNumberOfItemsPerRow | ||
| } | ||
|
|
||
| // Height is undefined by default because it is calculated by ratio of the width it'll fill (calculated by the webview) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.