-
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] Split apart config panel component to more manageable chunks #63910
[Lens] Split apart config panel component to more manageable chunks #63910
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
@@ -72,6 +72,10 @@ export const xyVisualization: Visualization<State, PersistableState> = { | |||
return state.layers.map(l => l.layerId); | |||
}, | |||
|
|||
canAppendLayer(state) { | |||
return state.layers.length < 2; | |||
}, |
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.
I should probably take this behavior change out into a separate PR
x-pack/plugins/lens/public/types.ts
Outdated
removeLayer?: (state: T, layerId: string) => T; | ||
/** When function is provided and returns true, multiple layers can be added */ | ||
canAppendLayer?: (state: T) => boolean; |
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 an added function
))} | ||
{activeVisualization.canAppendLayer && | ||
activeVisualization.appendLayer && | ||
activeVisualization.canAppendLayer(visualizationState) && ( |
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 line here is a behavioral change
@elasticmachine merge upstream |
Tested max. 2 layers behavior limit and how it will behave for already saved >2 layers visualization (more than 2 layers can be deleted but cannot be re-created). Looks good. |
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.
❤️ Thank you for this. And all the props comments are sweet! I'll be passing you a PR that just adjusts class names and sass files according to this new broken-down structure.
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!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…lastic#63910) * [Lens] Split apart config panel component to more manageable chunks * Moving around and renaming SASS appropriately * Remove layer limit Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co>
…63910) (#64256) * [Lens] Split apart config panel component to more manageable chunks * Moving around and renaming SASS appropriately * Remove layer limit Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co>
This is setting up for work on the Y-axis formatting options.