[EuiDataGrid] Replace popoverContents API with renderCellPopover#5640
Merged
cee-chen merged 22 commits intoelastic:mainfrom Feb 16, 2022
Merged
[EuiDataGrid] Replace popoverContents API with renderCellPopover#5640cee-chen merged 22 commits intoelastic:mainfrom
popoverContents API with renderCellPopover#5640cee-chen merged 22 commits intoelastic:mainfrom
Conversation
- which replaces `popoverContents` and shares some common props with `renderCellValue`
+ improve prop documentation for renderCellValue, renderFooterCellValue
- in grid parent components
+ move to data_grid_cell_popover instead of popover_utils
- the popover needs this to conditionally change formatting based on schema, and renderCellValue seems like it could use this info as well
- which will allow custom renderers to pass back the default renderer if they only want custom rendering for certain popovers
- likely created by recent Cypress reference/ts PRs
+ remove props unrelated to schema + schema.js misc cleanup: - Remove unnecessary pagination state/props - there's only 5 items - Remove unnecessary conditional JSON - Make Star Wars vs Star Trek alternating, so sorting does more - Fix aria-label - (lint) fragment, export default
- remove popoverContents, add renderCellPopover - improve documentation on rendercellValue
- Fix several incorrect instances of `optional` vs `required` notation - move inMemory down to sorting/pagination instead of being at the top, since it's an optional prop - misc indentation/lint fixes
c19294a to
7b52c07
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5640/ |
3 tasks
Contributor
chandlerprall
left a comment
There was a problem hiding this comment.
Left a couple thoughts, but I don't see any functional issues. This turned out really clean and straight-forward to use
- the component usage is cleaner than a render fn
3582b4a to
72501ed
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5640/ |
chandlerprall
approved these changes
Feb 16, 2022
Contributor
chandlerprall
left a comment
There was a problem hiding this comment.
Changes LGTM; pulled & tested locally and clicked around in the pr preview docs quite a bit too
Contributor
Author
|
Woohoo!!! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
closes #5310
This PR deprecates the old
popoverContentsAPI:With a new (optional)
renderCellPopoverAPI, that overrides our default popover rendering and allows users to completely customize cell popovers:Notes
renderCellPopoverprop, nothing should have regressed or changed from previous popover rendering/behavior.Screencap
Checklist
- [ ] Checked Code Sandbox works for any docs examples