Skip to content

feat: Update pfe-content-set to accept custom container queries#710

Merged
starryeyez024 merged 25 commits intomasterfrom
US231294-Update-pfe-content-set-to-accept-custom-container-queries
Feb 12, 2020
Merged

feat: Update pfe-content-set to accept custom container queries#710
starryeyez024 merged 25 commits intomasterfrom
US231294-Update-pfe-content-set-to-accept-custom-container-queries

Conversation

@alazzara
Copy link
Copy Markdown
Contributor

@alazzara alazzara commented Jan 30, 2020

Update pfe-content-set to accept custom container queries

Discovery doc:

Sandbox link:


What has changed and why

  • Updated pfe-content-set.js - to update offsetWidth based on a value given in a new data attribute called "pfe-breakpoint". This was done to fix and issue with tabs spilling off the page by giving the ability to set when the tabs change to accordions. You can input values with or without px and it will work (the code strips out any non-numeric values). This is to insure the code wont break if someone happens to put 500px instead of just 500.

Testing instructions

Test cases:

  1. If I set the value of the attribute pfe-breakpoint to 500
    a. And I reload the page at window size 300, i expect that
    i. The content set should become accordions
    b. And I reload the page at window size 550, i expect that
    i. The content set should become tabs
  2. If I set the value of the attribute pfe-breakpoint to 900
    a. And I reload the page at window size 800, i expect that
    i. The content set should become accordions
    b. And I reload the page at window size 1000, i expect that
    i. The content set should become tabs
  3. If I do not set the value of the attribute pfe-breakpoint
    a. And I reload the page at window size 600, i expect that
    i. The content set should become accordions
    b. And I reload the page at window size 800, i expect that
    i. The content set should become tabs
  4. If I load the page at window size 600, And then I use web inspector to add the attribute pfe-breakpoint
    a. with a value of 400 after the page has loaded
    i. The content set should become accordions
    b. with a value of 650 after the page has loaded
    i. The content set should become tabs

Edge case:
1. Test using px and no px in the value of pfe-breakpoint

Browser requirements

Your component should work in all of the following environments:

  • Latest 2 versions of Edge
  • Internet Explorer 11 (should be useable, not pixel perfect)
  • Latest 2 versions of Firefox (one on Mac OS, one of Windows OS)
  • Firefox 60.7.2 (or latest version for Red Hat Enterprise Linux distribution)
  • Latest 2 versions of Chrome (one on Mac OS, one of Windows OS)
  • Latest 2 versions of Safari
  • Galaxy S9 Firefox
  • iPhone X Safari
  • iPad Pro Safari
  • Pixel 3 Chrome

Ready-for-merge Checklist

  • Expected files: all files in this pull request are related to one feature request or issue (no stragglers)?
  • Did browser testing pass?
  • Did you update or add any necessary documentation (README.md, WHY.md, etc.)?
  • Was this feature demo'd and the design review approved?
  • Did you update the CHANGELOG.md file with a summary of this update?

Be sure to share your updates with the patternfly-elements-contribute@redhat.com mailing list!

@alazzara alazzara changed the title WIP: Update pfe content set to accept custom container queries Update pfe content set to accept custom container queries Jan 31, 2020
@alazzara alazzara changed the title Update pfe content set to accept custom container queries WIP: Update pfe content set to accept custom container queries Jan 31, 2020
Comment thread elements/pfe-content-set/src/pfe-content-set.js Outdated
Comment thread elements/pfe-content-set/src/pfe-content-set.js Outdated
Per allotted content area within pfe-band on tablets, which is 704px
@starryeyez024 starryeyez024 changed the title WIP: Update pfe content set to accept custom container queries Update pfe content set to accept custom container queries Feb 5, 2020
@castastrophe castastrophe changed the title Update pfe content set to accept custom container queries feat: Update pfe-content-set to accept custom container queries Feb 7, 2020
@castastrophe castastrophe added the needs changelog Be sure to update the Changelog before merging. label Feb 7, 2020
Copy link
Copy Markdown
Contributor

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

Looks great! Love this update. Needs a changelog.

Comment thread elements/pfe-content-set/src/pfe-content-set.js Outdated
Comment thread elements/pfe-content-set/test/pfe-content-set_test.html
Copy link
Copy Markdown
Contributor

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

A couple small notes for the demo page

Comment thread elements/pfe-content-set/demo/index.html
Comment thread elements/pfe-content-set/demo/index.html Outdated
Comment thread elements/pfe-content-set/demo/index.html Outdated
Comment thread elements/pfe-content-set/demo/index.html
Comment thread CHANGELOG-prerelease.md Outdated
…ner-queries' of https://github.com/patternfly/patternfly-elements into US231294-Update-pfe-content-set-to-accept-custom-container-queries

Update branch with latest in gitlab
starryeyez024
starryeyez024 previously approved these changes Feb 10, 2020
Copy link
Copy Markdown
Member

@starryeyez024 starryeyez024 left a comment

Choose a reason for hiding this comment

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

Late? Gimme Ten Minutes

@starryeyez024
Copy link
Copy Markdown
Member

@castastrophe this PR is stuck on your requested changes, can you approve when you have a moment? Thx!

Comment thread examples/index.html Outdated
starryeyez024
starryeyez024 previously approved these changes Feb 12, 2020
castastrophe
castastrophe previously approved these changes Feb 12, 2020
Copy link
Copy Markdown
Member

@starryeyez024 starryeyez024 left a comment

Choose a reason for hiding this comment

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

Large Galaxy, Tiny Me

@starryeyez024 starryeyez024 merged commit aac9925 into master Feb 12, 2020
@castastrophe castastrophe deleted the US231294-Update-pfe-content-set-to-accept-custom-container-queries branch February 12, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changelog Be sure to update the Changelog before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants