Skip to content

Conversation

@guoda-puidokaite
Copy link
Contributor

Summary

Introduce a standardised DescriptionList component along with its child components, DescriptionTerm and DescriptionDefinition, to display terms and descriptions consistently across applications following semantically correct HTML elements.

Changes Made

  • Created DescriptionList, DescriptionTerm, and DescriptionDefinition Components using corresponding html elements.
  • Alias Export: Provided shorter alias names (DL, DT, DD) for easy use in React code, promoting cleaner and more readable syntax.
  • Flexible Child Handling: Allowed multiple
    elements per <dt>, supporting valid spec structure and potential future layouts using grid systems.

Testing Instructions

Check ACs, Figma and test in Storybook.

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

@guoda-puidokaite guoda-puidokaite self-assigned this Nov 17, 2025
@guoda-puidokaite guoda-puidokaite requested review from a team and franzheidl as code owners November 17, 2025 08:17
@guoda-puidokaite guoda-puidokaite added package All tasks related to package under packages/ ui-components All tasks related to juno-ui-components library labels Nov 17, 2025
@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2025

⚠️ No Changeset found

Latest commit: 312c43a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://cloudoperators.github.io/juno/pr-preview/pr-1329/

Built to branch gh-pages at 2025-11-25 10:40 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@guoda-puidokaite guoda-puidokaite changed the title feat(ui): create Description Term, Description List, Description Term feat(ui): create DescriptionTerm, DescriptionList, DescriptionTerm Nov 17, 2025
TilmanHaupt
TilmanHaupt previously approved these changes Nov 17, 2025
Copy link
Contributor

@TilmanHaupt TilmanHaupt left a comment

Choose a reason for hiding this comment

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

i like

@edda edda mentioned this pull request Nov 18, 2025
7 tasks
@edda
Copy link
Contributor

edda commented Nov 18, 2025

Would you please add the link to the original issue to make it easier to look up requirements and acceptance criteria?

@guoda-puidokaite guoda-puidokaite linked an issue Nov 18, 2025 that may be closed by this pull request
Copy link
Contributor

Choose a reason for hiding this comment

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

While we used to add stories for all child components of a parent component, I think DL with DT and DD is a good demonstration case why/when we shouldn't: <dt> and <dd>. elements really do not make any sense to use outside of a <dl> and represent structurally and semantically invalid html, we shouldn't demonstrate their standalone use in storybook as it could lead users to think it may be possible or valid to use them standalone. Same goes for DD.

IMO we should concentrate n showing real-world-like use cases in the DL story, demonstrating good, semantic and valid use of all three components together, and get rid of the individual child component stories.

Copy link
Contributor

Choose a reason for hiding this comment

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

For idinvidual DD stories, the same applies as to DT. These components do not make any sense to use alone / ouside of a DL parent (nd may be invalid html), and we shouldn't demonstrate such a use IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to have a story with more DT and DD pairs with some more real-world-like metadata content to better illustrating their intended use case. Maybe we can supply some content, @edda ?

* Pairs with DescriptionTerm to complete the term-description association, offering flexible content styling.
*/
export const DescriptionDefinition: React.FC<DescriptionDefinitionProps> = ({ children, className = "" }) => (
<div className="dd-container">
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to wrap each <dd> in a container <div>, this is most likely even invalid.

The ticket mentions an option to allow users to wrap one DT and one or multiple DD elements in a <div> for better styling flexibility as outlined in the spec here:

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dl#wrapping_name-value_groups_in_div_elements

* Used to denote terms, headers, or keys in a semantic way, allowing for flexible styling.
*/
export const DescriptionTerm: React.FC<DescriptionTermProps> = ({ children, className = "" }) => (
<div className="dt-container">
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't wrap the <dt> in a container div, see https://github.com/cloudoperators/juno/pull/1329/files#r2538718640, the exact same applies here.

gap: 0.25rem;
}

.dd {
Copy link
Contributor

Choose a reason for hiding this comment

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

Both <dt> and <dd> should have a bottom border as specified in the ticket.

Updated the variable table in the ticket to map a new variable to the existintheme- variable.

gap: 0.25rem;
}

.dt {
Copy link
Contributor

Choose a reason for hiding this comment

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

Both <dt> and <dd> should have a bottom border as specified in the ticket.

Updated the variable table in the ticket to map a new variable to the existintheme- variable.

Copy link
Contributor

@franzheidl franzheidl left a comment

Choose a reason for hiding this comment

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

See individual comments,.

@guoda-puidokaite guoda-puidokaite marked this pull request as draft November 26, 2025 08:17
@guoda-puidokaite guoda-puidokaite changed the title feat(ui): create DescriptionTerm, DescriptionList, DescriptionTerm feat(ui): create DescriptionList with DescriptionTerm and DescriptionDefinition Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package All tasks related to package under packages/ ui-components All tasks related to juno-ui-components library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](ui): create DescriptionList with child components

5 participants