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

fix: Correct layout of Description List if multiple terms share a description #1763

Merged
merged 23 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b926bec
Inline style to prevent row skip
dlnr Nov 26, 2024
56a4d48
Fixed it and gave it a story
dlnr Nov 26, 2024
64575b5
inline html
dlnr Nov 26, 2024
425fa29
A solution using groups and no subgrid
dlnr Nov 26, 2024
11d1d5e
The tests
dlnr Nov 26, 2024
7e39a94
Align dd on first row of group if there are multiple terms
dlnr Dec 4, 2024
ae5e76d
Merge branch 'develop' into feature/DES-998-multiple-terms
VincentSmedinga Dec 4, 2024
25d4a27
Apply suggestions from code review
dlnr Dec 4, 2024
3142a2a
Refactor description list grid layout and update storybook examples f…
dlnr Dec 5, 2024
4bb4506
Seems like to only way to fix this is an inline style
dlnr Dec 5, 2024
7d53b0d
Add support for subgrid alignment in description list groups
dlnr Dec 5, 2024
3501236
Increase specificity for subgrid alignment in description list groups
dlnr Dec 5, 2024
1804de0
Update documentation for DescriptionList to clarify subgrid compatibi…
dlnr Dec 5, 2024
6bab918
Rename DescriptionListGroup to DescriptionListSection and update rela…
dlnr Dec 5, 2024
8b2750e
Refactor DescriptionList story to remove unnecessary keys from terms
dlnr Dec 5, 2024
5dfe987
Update tests to reflect renaming of DescriptionListGroup to Descripti…
dlnr Dec 10, 2024
f4ad94b
Refactor DescriptionList styles and documentation to enhance grid lay…
dlnr Dec 11, 2024
322fee1
Remove @supports
dlnr Dec 11, 2024
e1700c9
Merge branch 'develop' into feature/DES-998-multiple-terms
VincentSmedinga Dec 11, 2024
58ad1cd
Any element or class would also work the other way around
dlnr Dec 11, 2024
6323d4f
Merge branch 'feature/DES-998-multiple-terms' of https://github.com/A…
dlnr Dec 11, 2024
b536cd1
Applied suggestions
dlnr Dec 13, 2024
77e3c24
Merge branch 'develop' into feature/DES-998-multiple-terms
VincentSmedinga Dec 13, 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import README from "../../../../packages/css/src/components/description-list/REA

### Multiple descriptions

A term may have multiple descriptions.
A term may have multiple descriptions. In the case of multiple terms for a description
you may use an inline style to define the row of the first term to prevent the description
from skipping a lines.

<Canvas of={DescriptionListStories.MultipleDescriptions} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ export const MultipleDescriptions: Story = {
args: {
children: [
<DescriptionList.Term key={1}>Blinde, slechtziende</DescriptionList.Term>,
<DescriptionList.Description key={2}>Persoon met een visuele beperking</DescriptionList.Description>,
<DescriptionList.Description key={3}>Persoon met een visuele handicap</DescriptionList.Description>,
<DescriptionList.Description key={4}>Persoon die blind is</DescriptionList.Description>,
<DescriptionList.Description key={5}>Persoon die slechtziend is</DescriptionList.Description>,
<DescriptionList.Description key={1.2}>Persoon met een visuele beperking</DescriptionList.Description>,
<DescriptionList.Description key={1.3}>Persoon met een visuele handicap</DescriptionList.Description>,
<DescriptionList.Description key={1.4}>Persoon die blind is</DescriptionList.Description>,
<DescriptionList.Description key={1.5}>Persoon die slechtziend is</DescriptionList.Description>,
<DescriptionList.Term key={2}>Doof</DescriptionList.Term>,
<DescriptionList.Term key={3}>Slechthorend</DescriptionList.Term>,
<DescriptionList.Description key={2.1} style={{ gridRowStart: 5 }}>
VincentSmedinga marked this conversation as resolved.
Show resolved Hide resolved
Persoon die niet of slecht hoort
</DescriptionList.Description>,
<DescriptionList.Term key={4}>Dyslexie</DescriptionList.Term>,
<DescriptionList.Description key={4.1}>Moeite met lezen en schrijven</DescriptionList.Description>,
],
},
}
Expand Down