-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
183987088 graph color picker UI (#1568)
* Adds color swatch palette and color picker input to categorical legend brush menu * Refactors point color setting into its own file * removes some positioning console.logs * cleanup * Refactors PointColorSetting to be more general Adds a way to set the categorical legend color in the data configuration Refactors the DisplayItemFormatControl to use the PointColorSetting component * Graph plot updates colors when category color is changed * Coordinates color picker coler with the currently selected color * Update color picker palette color to match V2 * Moves setcatlegendcolor to its own action * fix: use onAnyAction rather than onAction to fix undo/redo bug * Styles select checkmark depending on swatch color * Adds the non-standard swatch to palette as user selects a color in the color picker. * chore: code review tweaks * Changes hashStrinSets to a hashStringSet to ensure reordering categorical legend does not affect the hash. * fixes broken cypress test --------- Co-authored-by: Kirk Swenson <[email protected]>
- Loading branch information
Showing
15 changed files
with
476 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
export const ColorPickerPaletteElements = { | ||
getColorPalette() { | ||
return cy.get(".color-picker-palette") | ||
}, | ||
getCategoricalColorSettingsGroup() { | ||
return cy.get(".cat-color-setting") | ||
}, | ||
getCategoricalColorSettingRow() { | ||
return cy.get(".cat-color-setting .color-picker-row.cat-color-picker") | ||
}, | ||
getCategoricalColorSettingLabel() { | ||
return cy.get(".cat-color-setting .form-label.color-picker") | ||
}, | ||
getCategoricalColorSettingButton() { | ||
return cy.get(".cat-color-setting .color-picker-thumb") | ||
}, | ||
getCategoricalColorSettingSwatch() { | ||
return cy.get(".cat-color-setting .color-picker-thumb-swatch") | ||
}, | ||
getColorSettingPalette() { | ||
return cy.get(".color-picker-palette-container") | ||
}, | ||
getColorSettingSwatchGrid() { | ||
return cy.get(".color-swatch-grid") | ||
}, | ||
getColorSettingSwatchCell() { | ||
return cy.get(".color-swatch-cell") | ||
}, | ||
getColorSettingSwatchRow() { | ||
return cy.get(".color-swatch-row") | ||
}, | ||
getSelectedSwatchCell() { | ||
return cy.get(".selected") | ||
}, | ||
getColorPickerToggleButton() { | ||
return cy.get(".color-swatch-footer [data-testid=toggle-show-color-picker-button]") | ||
}, | ||
getColorPicker() { | ||
return cy.get(".color-picker-container") | ||
}, | ||
getColorPickerSaturation() { | ||
return cy.get(".react-colorful__saturation .react-colorful__interactive") | ||
}, | ||
getColorPickerHue() { | ||
return cy.get(".react-colorful__hue .react-colorful__interactive") | ||
}, | ||
getSetColorButton() { | ||
return cy.get(".color-picker-footer .set-color-button") | ||
}, | ||
getCancelColorButton() { | ||
return cy.get(".color-picker-footer .cancel-button") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.