-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Improve color stop UI #119165
Merged
Merged
[Lens] Improve color stop UI #119165
Changes from all commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
a56b23e
First very draft version
VladLasitsa 9e7715b
Added validation, clean up code
VladLasitsa 7029192
Some fixes
VladLasitsa e10e350
Adapt components to the new UI design
VladLasitsa 924efe3
Some fixes
VladLasitsa bc9d87f
Fix validation
VladLasitsa be37180
Fix lint errors
VladLasitsa c3d0786
Fix metric vis for new color stop UI
VladLasitsa fea83b3
Fix problems with keeping state of auto detecting max/min value
VladLasitsa 35ad9b3
Add tests
VladLasitsa 2f9b2f1
Fix CI
VladLasitsa a9017f8
Fix tests
VladLasitsa 212dd76
Fix some lint problems
VladLasitsa ebc6a3a
Fix CI
VladLasitsa 4ea7daa
Merge remote-tracking branch 'upstream/main' into 116422
VladLasitsa 5765073
Fix min/max behavior for heatmap
VladLasitsa c863aa4
Fix checks.
VladLasitsa 956b3ba
Fix auto value when we add new color range
VladLasitsa 084461e
Fix check task
VladLasitsa 7dd40d0
Fix some issues
VladLasitsa 93927da
Some fixes
VladLasitsa a5c6430
Fix functional tests
VladLasitsa e6a5b25
small fix for heatmap
VladLasitsa 8581e8e
Fix test
VladLasitsa e21bf05
Update comment-description
VladLasitsa 33ed775
Merge branch 'main' into 116422
kibanamachine 72c8e05
fix PR comments
alexwizp ae7fedc
Merge remote-tracking branch 'upstream/main' into 116422
alexwizp 3cce2dc
Merge remote-tracking branch 'upstream/main' into 116422
alexwizp 7e5265a
do some refactoring (work in progress)
alexwizp 9f124be
do some refactoring (work in progress)
alexwizp 857e79e
some cleanup
alexwizp fa174eb
some cleanup
alexwizp 1ac0c85
wp: fix validation
alexwizp 2c5daf3
wip: fix validation
alexwizp fcaba4d
push some refactoring
alexwizp 2d45297
do some refactoring
alexwizp 495ca70
add useDebounce
alexwizp 9775347
add useReducer
alexwizp dddd143
Merge remote-tracking branch 'upstream/main' into 116422
alexwizp b61bcbc
remove autoValue
alexwizp e3cfa20
fix validation
alexwizp aced21d
update validation logic
alexwizp e0fbdb6
revert getStopsForFixedMode
alexwizp 65f8cef
some updates
alexwizp 43968da
Merge branch 'main' into 116422
kibanamachine a209e56
update EuiColorPaletteDisplay palette arg
alexwizp 70276c9
push some logic
alexwizp ac911a8
push some logic
alexwizp 1c86832
update validation messages
alexwizp a1d0584
push some updates
alexwizp 5d75740
fix some logic
alexwizp 833db8d
fix some cases
alexwizp 5912c27
fix JES
alexwizp 9f5e407
Merge branch 'main' into 116422
kibanamachine 66fb5ed
fix CI
alexwizp 88f460b
Merge branch 'main' into 116422
kibanamachine 86b5c5f
reset continuity
alexwizp 91ecc15
fix functional tests
alexwizp 7bf0b6f
fix issue with -infinite/+infinite
alexwizp 0fcd666
fix CI
alexwizp 64f6ec4
push some updates
alexwizp 7d0e872
Update x-pack/plugins/lens/public/shared_components/coloring/color_ra…
alexwizp 6792ee9
Update x-pack/plugins/lens/public/shared_components/coloring/color_ra…
alexwizp 32a9539
fix some comments
alexwizp 04a9c16
make color ranges crud methods "immutable"
alexwizp a15d351
fix Max. value input size
alexwizp 73ae6c7
Merge branch 'main' into 116422
kibanamachine 806b1a8
fix PR comment
alexwizp 57d89f8
fix tests
alexwizp 45c4ebb
Merge branch 'main' into 116422
kibanamachine 97b1eb2
Merge branch 'main' into 116422
kibanamachine 676396f
Fix edit/min/max buttons behavior
VladLasitsa cd5d5c1
Fix entering decimal values and max/min value behavior
VladLasitsa 5fa1e1b
Fix lint
VladLasitsa 63aeaa8
Fix getNormalizedValueByRange for case when min == max
VladLasitsa 7663daf
Fix table cell coloring
VladLasitsa 1260e3f
add warning messages
alexwizp c66d811
Move color ranges reducer upper to palette_configuration (#3)
VladLasitsa ca4684f
Fix lint
VladLasitsa 7a6013c
Merge remote-tracking branch 'upstream/main' into 116422
alexwizp a4ef93d
Merge branch 'main' into 116422
kibanamachine ef5f658
use one dataBounds type across palette configuration
alexwizp a51b833
cleanup
alexwizp 08f4454
Fix some behavior
VladLasitsa 45a17d9
Fix checks
VladLasitsa d303747
Some clean up
VladLasitsa 0b22b92
Some fixes
VladLasitsa e057bb9
Some fixes
VladLasitsa 6474301
Fix validation
VladLasitsa f22826c
Fix CI
VladLasitsa 2e3436c
Add unit tests for color_ranges_crud util
VladLasitsa 0c0e8f6
Fix unit test
VladLasitsa bad0ecb
Merge branch 'main' into 116422
kibanamachine 9ea3af8
Add unit tests for color ranges utils.ts
VladLasitsa 463b8bf
Add allowEditMinMaxValues props and fix validation
VladLasitsa fb909e9
Fix CI
VladLasitsa b711798
Rename allowEditMinMaxValues to disableSwitchingContinuity
VladLasitsa 006a714
Add unit tests for color_ranges_validation
VladLasitsa e551e8e
Merge remote-tracking branch 'upstream/main' into 116422
VladLasitsa b90c368
Add unit tests for updateRangeType and changeColorPalette functions
VladLasitsa 9fea8a4
Add unit tests for color_ranges_extra_actions
VladLasitsa 0d23316
Fix checks
VladLasitsa 29662c1
Clean up code
VladLasitsa 2eb5ca9
Some fixes
VladLasitsa 2a11580
Fix unit-tests
VladLasitsa daa5aaa
Fix comments
VladLasitsa 67194be
Some changes
VladLasitsa 6aa3aa8
Fix tests
VladLasitsa 9e0ddd9
Merge branch 'main' into 116422
kibanamachine fc02977
Fix all comments
VladLasitsa 262a2ea
Fix Checks
VladLasitsa 84bbe33
Fix CI
VladLasitsa 1b323d3
Merge branch 'main' into 116422
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { PaletteContinuity } from '../../types'; | ||
|
||
export const checkIsMinContinuity = (continuity: PaletteContinuity | undefined) => | ||
Boolean(continuity && ['below', 'all'].includes(continuity)); | ||
|
||
export const checkIsMaxContinuity = (continuity: PaletteContinuity | undefined) => | ||
Boolean(continuity && ['above', 'all'].includes(continuity)); |
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
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
2 changes: 1 addition & 1 deletion
2
test/interpreter_functional/snapshots/baseline/partial_test_1.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":100,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} |
2 changes: 1 addition & 1 deletion
2
test/interpreter_functional/snapshots/baseline/tagcloud_all_data.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":100,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} |
2 changes: 1 addition & 1 deletion
2
test/interpreter_functional/snapshots/baseline/tagcloud_empty_data.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":100,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} | ||
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We are applying the
smattering
on both conditions now. Is it due to the changes in the palette?