FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(datalist): add hidden and visible breakpoints by boaz0 · Pull Request #2251 · patternfly/patternfly-react · GitHub

feat(datalist): add hidden and visible breakpoints - #2251

Merged
redallen merged 1 commit into
patternfly:masterfrom
boaz0:closes_2221
Jul 8, 2019
Merged

feat(datalist): add hidden and visible breakpoints#2251
redallen merged 1 commit into
patternfly:masterfrom
boaz0:closes_2221

Conversation

boaz0 commented Jun 12, 2019
edited
Loading

Copy link
Copy Markdown
Member

What:

closes #2221 and fixes #2197

  • update the datalist action component to what is given in pf-core
  • add the hidden and visible breakpoint modifiers as props
  • update the datalist checkbox and actions example in the docs
  • update tests

codecov-io commented Jun 15, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@7e9ae5c). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #2251   +/-   ##
=========================================
  Coverage          ?   80.59%           
=========================================
  Files             ?      666           
  Lines             ?     8441           
  Branches          ?      719           
=========================================
  Hits              ?     6803           
  Misses            ?     1280           
  Partials          ?      358
Flag Coverage Δ
#patternfly3 85.23% <ø> (?)
#patternfly4 76.16% <100%> (?)
#patternflymisc 95.79% <ø> (?)
Impacted Files Coverage Δ
...act-core/src/components/DataList/DataListAction.js 77.77% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e9ae5c...71e2477. Read the comment docs.

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://2251-pr-patternfly-react-patternfly.surge.sh

tlabaj requested a review from mcoker June 17, 2019 18:28
tlabaj added PF4 and removed css approved labels Jun 17, 2019

mcoker commented Jun 18, 2019

Copy link
Copy Markdown
Contributor

Thanks @boaz0! Does this only allow you to pass a single breakpoint to visibleBreakpoint or hiddenBreakpoint? If so, we'll want to extend it so you can, for example, show at xs (0), hide on sm, show on md, hide on lg, and show again on xl.

And it looks like hiddenBreakpoint="" will hide something at all breakpoints? Personally I think that's fine as long as it's documented, but since you're passing breakpoints, seems like you should also be able to pass "xs" (0) there to do the same thing.

And since this is the same exact functionality that we use in the table component with this syntax classNames(Visibility.hidden, Visibility.visibleOnMd, Visibility.hiddenOnLg), and we'll likely add this functionality to other components in the future, I wonder if we should use a similar approach in the classes or names used to show/hide content?

boaz0 commented Jun 21, 2019

Copy link
Copy Markdown
Member Author

@mcoker thanks for your feedback ❤️ ! I will update this PR to match the requirements. 😄

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2251.surge.sh

boaz0 commented Jun 25, 2019

Copy link
Copy Markdown
Member Author

@mcoker & @redallen - PR is updated. Feel free to review 😄 thanks.

redallen previously approved these changes Jun 26, 2019

christiemolloy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Left one comment, otherwise looks really good

constructor(props) {
super(props);
this.state = { isOpen: false };
this.state = { isOpen1: false, isOpen2: false };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

is isOpen3 missing here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That's odd I thought I added it. Thanks for the double check.

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

christiemolloy previously approved these changes Jul 2, 2019

christiemolloy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

'hiddenOnMd',
'hiddenOnLg',
'hiddenOnXl',
'hiddenOn2Xl',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Just want to confirm this should be [hidden/visible]On2Xl and not [hidden/visible]On2xl? Not sure how numbers play with camel case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hmm... I'm trying the [hidden/visible]On2Xl props and they don't seem to be working. Can someone confirm? @tlabaj or @christiemolloy. I'm probably doing it wrong :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I actually was wondering the same thing...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

hiddenOn2Xl is correct. It comes from our Javascript variable names being camelcased in react-styles based on the css variables.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I also do not see the [hidden/visible]On2Xl being applied.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For now I wrote a workaround for that. Please review and let me know what you think.

Thanks.

tlabaj previously requested changes Jul 2, 2019

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Investigating Michael's comments

redallen previously approved these changes Jul 5, 2019
'hiddenOnMd',
'hiddenOnLg',
'hiddenOnXl',
'hiddenOn_2xl',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Workaround looks good. Thanks as always @boaz0 ! 👍

mcoker commented Jul 5, 2019

Copy link
Copy Markdown
Contributor

@boaz0 the preview URL isn't working for some reason, but I built it locally and looks like the 2xl breakpoints are working, but looks like the base DataListActionVisibility.hidden isn't working.

/>
</DataListAction>
<DataListAction
className={css(DataListActionVisibility.visibleOnXl, DataListActionVisibility.hidden)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The buttons are still visible when i reduce the screen width

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks. I will be looking into it. 😄

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yep, I found the problem!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am just adding unit tests.

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
redallen dismissed tlabaj’s stale review July 8, 2019 15:24

Naming comments were investigated and fixed.

redallen merged commit fdbde6d into patternfly:master Jul 8, 2019

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • @patternfly/react-charts@4.4.13
  • @patternfly/react-core@3.65.0
  • @patternfly/react-docs@4.8.63
  • @patternfly/react-inline-edit-extension@2.9.26
  • demo-app-ts@2.6.1
  • @patternfly/react-styled-system@3.6.10
  • @patternfly/react-styles@3.5.0
  • @patternfly/react-table@2.14.0
  • @patternfly/react-topology@2.5.7
  • @patternfly/react-virtualized-extension@1.1.59

Thanks for your contribution! 🎉

boaz0 commented Jul 8, 2019

Copy link
Copy Markdown
Member Author

Thanks a lot: @jschuler @redallen @mcoker @tlabaj and @christiemolloy

tlabaj commented Jul 9, 2019

Copy link
Copy Markdown
Contributor

@boaz0 @mcoker @redallen
This PR was merged before it was ready. the 2Xl breakpoints are still not working, I have opened issue #2490 for follow up work.

boaz0 commented Jul 9, 2019
edited
Loading

Copy link
Copy Markdown
Member Author

@tlabaj can you give me a way to reproduce it in https://patternfly-react.surge.sh/patternfly-4/components/datalist/ or any way that I can see where it's not working.

I tried it on https://patternfly-react.surge.sh/patternfly-4/ and it looks OK.

mcoker commented Jul 9, 2019

Copy link
Copy Markdown
Contributor

@boaz0 @tlabaj I also just confirmed it looks OK on master. I was testing previously using the preview build in this PR. Maybe the preview wasn't updating properly. I think we can close #2490

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Data list checkboxes, actions and additional cells datalist: add support for hidden/visible

8 participants


Back | FazBrowse Home | New Git URL