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

feat(togglegroup): add toggle group component #3355

Merged
merged 7 commits into from Jul 31, 2020

Conversation

christiemolloy
Copy link
Member

@christiemolloy christiemolloy commented Jul 31, 2020

closes #2625

new PR from new forked repo

old PR #3295

@patternfly-build
Copy link

patternfly-build commented Jul 31, 2020

Preview: https://patternfly-pr-3355.surge.sh

A11y report: https://patternfly-pr-3355-coverage.surge.sh

CSS Size Report
NameCurrentPreviousDiff %
components/Tile/tile.css6.2 kB5.3 kB13.71
utilities/Accessibility/accessibility.css2.6 kB2.7 kB-5.66
base/patternfly-pf-icons.css8.8 kB9.0 kB-1.72
components/Button/button.css21.1 kB21.2 kB-0.12
site/docs/components/Wizard/examples/Wizard.css117 B56 B52.14
components/Label/label.css16.2 kB16.4 kB-1.11
site/docs/components/ToggleGroup/examples/ToggleGroup.css126 BNaN kBNaN
components/NotificationDrawer/notification-drawer.css15.6 kB16.0 kB-2.57
patternfly.min.css659.5 kB663.3 kB-0.57
components/Table/table-grid.css57.3 kB57.9 kB-0.95
components/Table/table.css35.7 kB35.8 kB-0.37
components/Tabs/tabs.css24.2 kB24.7 kB-2.14
base/patternfly-icons.css77.0 kB77.2 kB-0.20
components/ToggleGroup/toggle-group.css3.7 kBNaN kBNaN
components/Wizard/wizard.css21.0 kB21.1 kB-0.10
patternfly-addons.css147.7 kB147.9 kB-0.10
patternfly-base.css106.0 kB106.2 kB-0.16
patternfly-charts.css9.8 kB9.8 kB0.01
patternfly-no-reset.css746.6 kB750.7 kB-0.56
patternfly.css748.5 kB752.6 kB-0.56
base/patternfly-common.css297 B318 B-7.07
components/Drawer/drawer.css19.6 kB21.4 kB-9.32
components/Page/page.css23.0 kB26.8 kB-16.30
components/NotificationBadge/notification-badge.css3.5 kB4.5 kB-26.95

{{/toggle-group-text}}
{{/toggle-group-button}}
{{> divider divider--type="div" divider--modifier="pf-m-vertical"}}
{{#> toggle-group-button toggle-group-button--modifier="pf-m-selected"}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{#> toggle-group-button toggle-group-button--modifier="pf-m-selected"}}
{{#> toggle-group-button}}

Looks like you have two set to selected

Copy link
Member Author

Choose a reason for hiding this comment

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

this is to demonstrated two things can be clicked.

@@ -0,0 +1,6 @@
<div class="pf-c-toggle-group__icon{{#if toggle-group-icon--modifier}} {{toggle-group-icon--modifier}}{{/if}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this a span?

@@ -0,0 +1,6 @@
<div class="pf-c-toggle-group__text{{#if toggle-group-text--modifier}} {{toggle-group-text--modifier}}{{/if}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

same, can this be a span?

border-bottom-right-radius: var(--pf-c-toggle-group__button--last-child--BorderBottomRightRadius);
}

&:hover {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a focus state?

Copy link
Member Author

Choose a reason for hiding this comment

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

added the focus state and going to follow up with @mceledonia on monday

font-size: var(--pf-c-toggle-group__button--FontSize);
color: var(--pf-c-toggle-group__button--Color);
background-color: var(--pf-c-toggle-group__button--BackgroundColor);
border: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be an inline-flex item?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we support icon positioning the same way we do with the button component? That would be another reason to use a button component here.

Copy link
Member Author

Choose a reason for hiding this comment

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

^ will follow up on this

font-size: var(--pf-c-toggle-group__button--FontSize);
color: var(--pf-c-toggle-group__button--Color);
background-color: var(--pf-c-toggle-group__button--BackgroundColor);
border: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
border: 0;
border: none;

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

lgtm!

@mcoker mcoker merged commit d1e2143 into patternfly:master Jul 31, 2020
Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

LPTM 🥳

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.

Introduce Toogle Button Group
4 participants