Skip to content
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

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

Merged
merged 13 commits into from
Oct 19, 2020

Conversation

elizabetdev
Copy link
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

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

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

@elizabetdev
Copy link
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

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

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

@thompsongl
Copy link
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

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

Copy link
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.

src-docs/src/views/tables/basic/props.tsx Show resolved Hide resolved
src-docs/src/views/tables/basic/props.tsx Outdated Show resolved Hide resolved
@elizabetdev
Copy link
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

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

Copy link
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

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

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 <[email protected]>

* CL

Co-authored-by: Greg Thompson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants