Skip to content

[Docs, EuiBasicTable] Recreating props tables with props loader#4125

Merged
elizabetdev merged 13 commits intoelastic:masterfrom
elizabetdev:EuiBasicTable-props-table
Oct 19, 2020
Merged

[Docs, EuiBasicTable] Recreating props tables with props loader#4125
elizabetdev merged 13 commits intoelastic:masterfrom
elizabetdev:EuiBasicTable-props-table

Conversation

@elizabetdev
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev commented Oct 8, 2020

Summary

Closes #3644.

Some links were not working in the docs under the props tab for the EuiBasicTable because it was using a manual props table.

With this PR I'm using the !!prop-loader to recreate the EuiBasicTable props tables.

I'm also exporting missing types that close #4011.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs
  • Added documentation
  • [ ] Checked Code Sandbox works for the any docs examples
  • [ ] Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

@elizabetdev elizabetdev changed the title [Docs, EuiTable, EuiBasicTable] Recreating props tables with props loader [Docs, EuiBasicTable] Recreating props tables with props loader Oct 12, 2020
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

@elizabetdev
Copy link
Copy Markdown
Contributor Author

elizabetdev commented Oct 12, 2020

This prop table is not rendering correctly:
Screenshot 2020-10-12 at 15 12 09

I guess because it's an ExclusiveUnion:

export type DefaultItemAction<T> = ExclusiveUnion<
  DefaultItemEmptyButtonAction<T>,
  DefaultItemIconButtonAction<T>
>;

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

@elizabetdev elizabetdev marked this pull request as ready for review October 12, 2020 16:46
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

@thompsongl
Copy link
Copy Markdown
Contributor

Overall, I think this is better than what we had with the manual props-info, although we should find some solution to the empty DefaultItemAction table in this branch (I can help).
I created #4129 as incremental improvement to your work here.

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!
There is also a file at src-docs/src/views/tables/basic/props_info.js that can now be deleted, I think.

@elizabetdev
Copy link
Copy Markdown
Contributor Author

There is also a file at src-docs/src/views/tables/basic/props_info.js that can now be deleted, I think.

The EuiInMemoryTable is calling this file import { propsInfo as basicPropsInfo } from '../basic/props_info'; in src/views/tables/in_memory/props_info.js.

But in a different PR, I can recreate the props tables for EuiInMemoryTable and consequently delete both props_info.js files. I already created an issue #4149 to follow up on the work.

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

@elizabetdev elizabetdev merged commit 7e712e5 into elastic:master Oct 19, 2020
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4125/

kshitij86 added a commit to kshitij86/eui that referenced this pull request Nov 29, 2020
…tic#4125)

* Using prop loader to create props table for basic table

* Added CL

* Reverting criteria types

* More improvements

* More improvements

* Fixing DefaultItemAction prop table not showing

* Es lint fix

* Update src-docs/src/views/tables/basic/props.tsx

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>

* CL

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiBasicTable] onChange parameter type unable to be determined leads to any [Docs] Props table custom interface links not working

3 participants