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

Add minSizeForControls to euiDataGrid #3527

Merged
merged 7 commits into from
Jun 2, 2020
Merged

Add minSizeForControls to euiDataGrid #3527

merged 7 commits into from
Jun 2, 2020

Conversation

mmourafiq
Copy link

@mmourafiq mmourafiq commented May 31, 2020

Summary

Fixes #3505

Added minSizeForControls to euiDataGrid as prop to control the min size for grid controls.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
    [ ] Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation 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

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cla-checker-service
Copy link

cla-checker-service bot commented May 31, 2020

💚 CLA has been signed

@chandlerprall chandlerprall self-requested a review June 1, 2020 20:22
Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Thank you very much for the contribution! ❤️

Couple of changes requested, let me know if anything doesn't make sense / look right.

CHANGELOG.md Outdated Show resolved Hide resolved
src-docs/src/views/datagrid/datagrid_styling_example.js Outdated Show resolved Hide resolved
src/components/datagrid/data_grid.tsx Outdated Show resolved Hide resolved
Mourad and others added 3 commits June 1, 2020 22:32
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Two more quick clean ups and this should ready

src/components/datagrid/data_grid.tsx Outdated Show resolved Hide resolved
src/components/datagrid/data_grid.tsx Outdated Show resolved Hide resolved
@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

@chandlerprall
Copy link
Contributor

Couple of lint errors (yarn lint),

21:21:07 /app/src/components/datagrid/data_grid.tsx
21:21:07   338:33  error    Replace `⏎········width·>·minSizeForControls·||·isFullScreen⏎······` with `width·>·minSizeForControls·||·isFullScreen`   prettier/prettier
21:21:07   342:5   warning  React Hook useCallback has a missing dependency: 'minSizeForControls'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
21:21:07   632:32  error    Insert `⏎····`                                                                                                           prettier/prettier
21:21:07   633:1   error    Replace `····` with `······`                                                                                             prettier/prettier
21:21:07   634:7   error    Insert `··`                                                                                                              prettier/prettier
21:21:07   635:5   error    Insert `··`                                                                                                              prettier/prettier
21:21:07   636:1   error    Replace `··},·isFullScreen,·minSizeForControls` with `····},⏎····isFullScreen,⏎····minSizeForControls⏎··`                prettier/prettier
21:21:07 
21:21:07 /app/src-docs/src/views/datagrid/datagrid_styling_example.js
21:21:07   186:69  error  Replace `⏎··········Use·the` with `·Use·the{'·'}⏎·········`  prettier/prettier
21:21:07 
21:21:07 ✖ 8 problems (7 errors, 1 warning)
21:21:07   7 errors and 0 warnings potentially fixable with the `--fix` option.

@mmourafiq
Copy link
Author

Fixed.

@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM, tested in the PR's deployed docs + React devtools for manipulating the new minSizeForControls prop

@chandlerprall chandlerprall merged commit fc83d28 into elastic:master Jun 2, 2020
daveyholler pushed a commit to daveyholler/eui that referenced this pull request Jun 3, 2020
* Add minSizeForControls to euiDataGrid

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>

* Update src-docs/src/views/datagrid/datagrid_styling_example.js

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>

* Review comment: move minSizeForControls to props destructuring

* Review comments

* Fix lint issues

Co-authored-by: Chandler Prall <chandler.prall@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.

Is it possible to have more control over the MINIMUM_WIDTH_FOR_GRID_CONTROLS
3 participants