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

Labeled field updates #595

Merged
merged 53 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d868e51
Allows LabeledField to accept optional as prop and updates Checkbox+R…
jhp0621 Aug 1, 2023
3fa079b
Uses css to visually hide label if set to false for Checkbox+Radio Gr…
jhp0621 Aug 1, 2023
49debb5
Displays required indicator and hint if provided
jhp0621 Aug 1, 2023
9873164
Updates dropdown-checkbox-group to match the same semantics as regula…
jhp0621 Aug 1, 2023
2dc1661
Merge branch 'main' of https://github.com/LaunchPadLab/lp-components …
jhp0621 Sep 18, 2023
f71254b
Remove dropdown-checkbox-group component
jhp0621 Sep 18, 2023
950cd7d
Add Dropdown in storybook
jhp0621 Sep 18, 2023
4d1c06c
Remove unused css files
jhp0621 Sep 18, 2023
036cf6d
Update styling
jhp0621 Sep 18, 2023
4fbc017
Define checkbox group container outside of component
jhp0621 Sep 25, 2023
8c73fc3
Remove test suite re: missing legend
jhp0621 Sep 25, 2023
c2df5fe
Set group role on labeled field and simplify classname logic
jhp0621 Sep 25, 2023
04015e1
Move dropdown test suite into checkbox-group test file
jhp0621 Sep 25, 2023
e462dbb
Merge branch 'main' into labeled-field-updates
jhp0621 Sep 25, 2023
4a7ee8c
Update comment
jhp0621 Sep 25, 2023
4be9338
Update version
jhp0621 Sep 25, 2023
62fd746
Update helper comment
jhp0621 Sep 25, 2023
23ffe8a
Undo defining variable outside
jhp0621 Sep 25, 2023
ed0cf8e
use prepare for yarn run build
jhp0621 Sep 26, 2023
c8352b9
update comments
Oct 25, 2023
071721e
explicitly set true on useDropdown
Oct 25, 2023
0d2d6ab
update select component to use fieldset and legend
Oct 25, 2023
4e36817
update tests to use test id for labeled field component
Oct 25, 2023
2a74019
Merge branch 'main' into labeled-field-updates
Oct 25, 2023
f1f35d5
undo updates in select
Oct 26, 2023
e6fe0f7
rename prop
Oct 26, 2023
eadf88b
use option.value for key
Oct 26, 2023
490b9e9
update test
Oct 26, 2023
e57ea98
add dropdown checkboxgroup tests
Oct 26, 2023
9fdab57
add test units for updated legend
Oct 26, 2023
ee51287
rename prop rename
Oct 26, 2023
3d47b42
update proptype
Oct 27, 2023
259978d
add migration guide
Oct 30, 2023
ea1f920
use shorthand assignment
Nov 2, 2023
85ac007
add & update migration guide
Nov 3, 2023
8ad9171
use describe
Nov 3, 2023
dbf4ee8
conditionally set field-wrapper class name and remove data-testid
Nov 6, 2023
0844385
add visually hidden class assertion
Nov 6, 2023
a3bdda3
replace example in test to use grouped elements
Nov 6, 2023
598efdc
update param sentence
Nov 6, 2023
cc3b562
be explicit with allowed proptypes for wrapper element
Nov 6, 2023
63514b0
fix typo
Nov 6, 2023
952d3dd
use markup for components
Nov 6, 2023
efa4fc7
pass in is-active conditional classname on higher level
Nov 13, 2023
d587379
update dropdown select so the labels populate
Nov 14, 2023
f6da097
Add a section about dropdown selection changes in migration guide
jhp0621 Feb 8, 2024
2f4dc31
Update comments
jhp0621 Feb 8, 2024
bcb4729
wrap tests under describe
jhp0621 Feb 8, 2024
9814f6b
Use the correct labels for dropdown test
jhp0621 Feb 8, 2024
6b9c6cf
Pass in id for checkbox label that matches input id
jhp0621 Feb 8, 2024
c687232
Merge branch 'main' into labeled-field-updates
chawes13 Feb 12, 2024
c0dd1e7
Use labels for safe guard check
jhp0621 Feb 12, 2024
5fb9bb7
Merge branch 'labeled-field-updates' of https://github.com/LaunchPadL…
jhp0621 Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .storybook/styles/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ $output-bourbon-deprecation-warnings: false;
@import 'components/progress-circle';
@import 'components/login';
@import 'components/pagination';
@import 'components/sidebar-content';
chawes13 marked this conversation as resolved.
Show resolved Hide resolved
@import 'components/radio';
@import 'components/tabs';
@import 'components/visually-hidden';

// Page Styles
@import 'pages/main';
@import 'pages/styleguide';
53 changes: 15 additions & 38 deletions .storybook/styles/components/_forms.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*-----------------------
Fieldset
Fieldsets and Field Wrappers
-----------------------*/
fieldset {
fieldset, .field-wrapper {
display: inline-block;
@include rem(margin-top, 15px);
position: relative;
Expand Down Expand Up @@ -64,12 +64,17 @@ Input Icon
@include rem(padding-left, 30px);
}

i {
@include position(absolute, 1px null null 10px);
background-repeat: no-repeat;
background-size: 15px;
height: 20px;
width: 20px;
.input-wrapper {
position: relative;

i {
@include position(absolute, 3px null null 10px);
background-repeat: no-repeat;
background-size: 15px;
display: inline-block;
height: 20px;
width: 20px;
}
}

.mail-icon:after {
Expand Down Expand Up @@ -404,29 +409,6 @@ Button Area
width: 135px;
}

/*-----------------------
Input Icon
-----------------------*/
.icon-label {
position: relative;
input {
@include rem(padding-left, 30px);
}

.input-wrapper {
position: relative;

i {
@include position(absolute, 3px null null 10px);
background-repeat: no-repeat;
background-size: 15px;
display: inline-block;
height: 20px;
width: 20px;
}
}
}

/*-----------------------
Custom Dropdown Select
-----------------------*/
Expand Down Expand Up @@ -571,13 +553,8 @@ Custom Dropdown Select
}
}

fieldset.checkbox,
fieldset.CheckboxGroup {
width: 100% !important;

input {
jhp0621 marked this conversation as resolved.
Show resolved Hide resolved
border: 1px solid $white-med;
}
.checkbox {
width: 100%;
}
}

Expand Down
107 changes: 0 additions & 107 deletions .storybook/styles/components/_sidebar-content.scss

This file was deleted.

17 changes: 17 additions & 0 deletions .storybook/styles/components/_visually-hidden.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Visually Hidden Element
// https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/

// In the rare case that this is applied to an interactive element, show the
// element temporarily when it receives focus (for keyboard users)

.visually-hidden:not(:focus):not(:active) {
clip: rect(0 0 0 0) !important;
clip-path: inset(50%) !important;
height: 1px !important;
width: 1px !important;
overflow: hidden !important;
position: absolute !important;
white-space: nowrap !important;
border: 0 !important;
padding: 0 !important;
}
53 changes: 0 additions & 53 deletions .storybook/styles/pages/_styleguide.scss

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Documentation and usage info can be found in [docs.md](docs.md).
- [v7.0.0](migration-guides/v7.0.0.md)
- [v8.0.0](migration-guides/v8.0.0.md)
- [v9.0.0](migration-guides/v9.0.0.md)
- [v10.0.0](migration-guides/v10.0.0.md)

## Contribution

Expand Down
Loading