Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Dashboard] [Collapsable Panels] Switch to using props (#200793) (
#201253) # Backport This will backport the following commits from `main` to `8.x`: - [[Dashboard] [Collapsable Panels] Switch to using props (#200793)](#200793) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T17:27:56Z","message":"[Dashboard] [Collapsable Panels] Switch to using props (#200793)\n\nCloses https://github.com/elastic/kibana/issues/200090\r\n\r\n## Summary\r\n\r\nThis PR migrates the `GridLayout` component a more traditional React\r\ndesign using **props** rather than providing an API. This change serves\r\ntwo purposes:\r\n1. It makes the eventual Dashboard migration easier, since it is more\r\nsimilar to `react-grid-layout`'s implementation\r\n3. It makes the `GridLayout` component less opinionated by moving the\r\nlogic for panel management (i.e. panel placement, etc) to the parent\r\ncomponent.\r\n\r\nI tried to keep efficiency in mind for this comparison, and ensured that\r\nwe are still keeping the number of rerenders **o a minimum**. This PR\r\nshould not introduce **any** extra renders in comparison to the API\r\nversion.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nThere are no risks to this PR, since all work is contained in the\r\n`examples` plugin.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"549532240cd8bc271a78b74846021c9023e2da64","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Dashboard","Team:Presentation","loe:medium","release_note:skip","impact:high","v9.0.0","backport:prev-minor","Project:Collapsable Panels"],"title":"[Dashboard] [Collapsable Panels] Switch to using props","number":200793,"url":"https://github.com/elastic/kibana/pull/200793","mergeCommit":{"message":"[Dashboard] [Collapsable Panels] Switch to using props (#200793)\n\nCloses https://github.com/elastic/kibana/issues/200090\r\n\r\n## Summary\r\n\r\nThis PR migrates the `GridLayout` component a more traditional React\r\ndesign using **props** rather than providing an API. This change serves\r\ntwo purposes:\r\n1. It makes the eventual Dashboard migration easier, since it is more\r\nsimilar to `react-grid-layout`'s implementation\r\n3. It makes the `GridLayout` component less opinionated by moving the\r\nlogic for panel management (i.e. panel placement, etc) to the parent\r\ncomponent.\r\n\r\nI tried to keep efficiency in mind for this comparison, and ensured that\r\nwe are still keeping the number of rerenders **o a minimum**. This PR\r\nshould not introduce **any** extra renders in comparison to the API\r\nversion.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nThere are no risks to this PR, since all work is contained in the\r\n`examples` plugin.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"549532240cd8bc271a78b74846021c9023e2da64"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200793","number":200793,"mergeCommit":{"message":"[Dashboard] [Collapsable Panels] Switch to using props (#200793)\n\nCloses https://github.com/elastic/kibana/issues/200090\r\n\r\n## Summary\r\n\r\nThis PR migrates the `GridLayout` component a more traditional React\r\ndesign using **props** rather than providing an API. This change serves\r\ntwo purposes:\r\n1. It makes the eventual Dashboard migration easier, since it is more\r\nsimilar to `react-grid-layout`'s implementation\r\n3. It makes the `GridLayout` component less opinionated by moving the\r\nlogic for panel management (i.e. panel placement, etc) to the parent\r\ncomponent.\r\n\r\nI tried to keep efficiency in mind for this comparison, and ensured that\r\nwe are still keeping the number of rerenders **o a minimum**. This PR\r\nshould not introduce **any** extra renders in comparison to the API\r\nversion.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nThere are no risks to this PR, since all work is contained in the\r\n`examples` plugin.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"549532240cd8bc271a78b74846021c9023e2da64"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <[email protected]>
- Loading branch information