feat(pfTabs): enhance pf-tabs api - #67
Conversation
acdc033 to
1bcd011
Compare
|
rebased w/ latest and ensured semantic-release commit... |
cdcabrera
left a comment
There was a problem hiding this comment.
Looks good overall, just 2 minor annotation pieces and some general question/comments.
Found some minor annotation updates
Some CSS observations...
Separating the tab panels out from my perspective means we could relax the CSS associated with the content panels. Right now it's kind of strict around how it should be formatted. Could relaxing it be a thing we want to investigate?
Some accessibility extra...
We use some Aria attributes on the panels, would providing something in addition like "aria-live=polite" conflict with anything?
1bcd011 to
84758e2
Compare
|
@cdcabrera +1 to annotation fixes and good catch on those. I've attempted to make them more relevant... Regarding the content panels, I thought that making a wrapping element and just using it to enhance accessibility attributes would be an OK pattern. However, we could easily adopt something else. Main thing this approach attempts to support though is having the ability to activate multiple content panels on selecting a tab, and enabling flexibility of where that content is located. If you have another proposal or you'd like to suggest something, maybe a PR in the future? I'm always up for supporting more use cases... Re: accessibility. I believe Andres suggested some other attributes as well (although I'm not sure which). Happy to revisit this, but attempted to follow the guidelines used on the VMWare Clarity tabs here... |
84758e2 to
d693388
Compare
d693388 to
2f2fa90
Compare
|
@jgiardino has proposed an additional feature for allowing right-aligned content (alongside the left-aligned tabs). we will need to review this rendered HTML with the CSS group and determine if this is an accepted pattern for PF. less: html I tend to think providing a i guess too, that we prefer to keep tabs left aligned, so allowing buttons or other content on the right hand side doesn't seem so bad i.m.h.o. |
|
also @jgiardino - can you speak to the responsiveness of this approach? |
|
I'm not at a computer, so I can't double-check, but I think this is as
responsive as the tabs are. When I tested the HTML and CSS that Patrick
shared in the comment, the .pf-tabrow-contents displayed above the tabs.
I'm wondering if at a minimum, the web component just includes the ability
to define additional contents, and require the product dev to define the
css necessary for it to display as expected.
It's possible that the '.pf-tabrow-contents' does not need to be a <li>
element (but I didn't have time to test that), and I'm not sure that it's
semantically correct to use <li> either (although maybe we could address
that by setting the 'role' attribute to something that is semantically
correct). However, if we leave the custom css up to the product dev, then I
think we're limited to using <li>, because to not use <li> would require
extra css to handle the change in DOM structure.
On Wed, Aug 16, 2017 at 4:26 PM Patrick Riley ***@***.***> wrote:
also @jgiardino <https://github.com/jgiardino> - can you speak to the
responsiveness of this approach?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUFmoKDdzpGhMMedm5-gu170m5rxnCzsks5sY1CJgaJpZM4Oye8O>
.
--
Jenn Giardino
Senior Interaction Designer
User Experience Design Team
Red Hat, Inc.
1-919-716-5045
jgiardin@redhat.com
|
|
fair enough @jgiardino...i think we're OK to add this, knowing that it will just aid in flexibility for certain product use cases (and that it will likely be customized). Sooo.. i'll add a I should have this ready some time tomorrow. |
317250b to
b92fe93
Compare
* enhance pf-tabs API to support DOM nodes within the tabs * enhance pf-tabs API to support multiple contents * enhance pf-tabs to support pf-dropdown tab items * enhance pf-tabs test page to include several style variations and dynamic contents example Closes patternfly-webcomponents#60
b92fe93 to
25800d6
Compare
|
@jgiardino @cdcabrera i've added support for https://stackblitz.com/edit/using-pf-tabs-in-reactjs?file=index.js Due to the nature of this approach with transcluded content and framework interop/Mutation Observers, I will be following up shortly in an email with some of my research alongside this PR. |
| <pf-tab content-id="example-four-tab-two">Tab Two</pf-tab> | ||
| <pf-tab content-id="example-four-tab-three"> | ||
| <pf-dropdown class="dropdown" id="dropdown1"> | ||
| <a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
There was a problem hiding this comment.
I think attribute "data-***" is specific for bootstrap, it should not appear in patternfly-webcomponents
pf-tab-contentCEbuttondropdown toggles (such asarendered bypf-tabs)test page:
https://rawgit.com/priley86/patternfly-webcomponents/pf-tabs-updates-dist/app/app.html?dir=pf-tabs&file=index.html
stackblitz:
https://using-pf-tabs-in-reactjs.stackblitz.io/
Closes #60