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(TMC-27716): fix firefox height for fieldset #5246

Merged
merged 4 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/chatty-cherries-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@talend/design-system": patch
---

TMC-27716 - Fix firefox fieldset height
Original file line number Diff line number Diff line change
Expand Up @@ -14,111 +14,115 @@ exports[`ComponentForm #render should render a UIForm 1`] = `
Metadata
</legend>
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
<label
class="theme-label"
for="_datasetMetadata_name"
>
Name
</label>
<div
class="theme-inputShell"
>
<input
aria-invalid="false"
class="theme-input"
id="_datasetMetadata_name"
type="text"
value=""
/>
</div>
</div>
<div
aria-busy="false"
class="theme-fieldset-content"
>
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
<label
class="theme-label"
for="_datasetMetadata_type"
for="_datasetMetadata_name"
>
Types
Name
</label>
<div
class="theme-tc-datalist-item"
tabindex="-1"
class="theme-inputShell"
>
<input
aria-invalid="false"
class="theme-input"
id="_datasetMetadata_name"
type="text"
value=""
/>
</div>
</div>
<div
aria-busy="false"
>
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
<label
class="theme-label"
for="_datasetMetadata_type"
>
Types
</label>
<div
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-_datasetMetadata_type"
class="theme-tc-typeahead-container tc-typeahead-container theme-container tc-datalist-container tc-datalist"
role="combobox"
class="theme-tc-datalist-item"
tabindex="-1"
>
<div
class="tc-typeahead-typeahead-input-icon theme-typeahead-input-container theme-typeahead-input-caret"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-_datasetMetadata_type"
class="theme-tc-typeahead-container tc-typeahead-container theme-container tc-datalist-container tc-datalist"
role="combobox"
>
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
class="tc-typeahead-typeahead-input-icon theme-typeahead-input-container theme-typeahead-input-caret"
>
<span
class="theme-hidden"
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
<label
class="theme-label"
for="_datasetMetadata_type"
/>
</span>
<span
class="theme-hidden"
>
<label
class="theme-label"
for="_datasetMetadata_type"
/>
</span>
<div
class="theme-inputShell"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-_datasetMetadata_type"
aria-describedby="_datasetMetadata_type-description _datasetMetadata_type-error"
aria-invalid="false"
autocomplete="off"
class="theme-input theme-typeahead-input tc-typeahead-typeahead-input"
id="_datasetMetadata_type"
type="text"
value=""
/>
</div>
</div>
<div
class="theme-inputShell"
class="icon-cls theme-icon-cls icon-caret theme-icon-caret"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-_datasetMetadata_type"
aria-describedby="_datasetMetadata_type-description _datasetMetadata_type-error"
aria-invalid="false"
autocomplete="off"
class="theme-input theme-typeahead-input tc-typeahead-typeahead-input"
id="_datasetMetadata_type"
type="text"
value=""
<svg
aria-hidden="true"
class="tc-svg-icon tc-icon theme-svg tc-icon-name-talend-caret-down"
focusable="false"
name="talend-caret-down"
pointer-events="none"
shape-rendering="geometricPrecision"
/>
</div>
</div>
<div
class="icon-cls theme-icon-cls icon-caret theme-icon-caret"
>
<svg
aria-hidden="true"
class="tc-svg-icon tc-icon theme-svg tc-icon-name-talend-caret-down"
focusable="false"
name="talend-caret-down"
pointer-events="none"
shape-rendering="geometricPrecision"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
<label
class="theme-label"
for="_datasetMetadata_description"
<div
class="theme-stack theme-justify-start theme-align-stretch theme-nowrap theme-column theme-block theme-height-100 theme-noShrink theme-gap-x-XXS theme-gap-y-XXS"
>
Description
</label>
<textarea
aria-invalid="false"
class="theme-textarea"
id="_datasetMetadata_description"
rows="5"
/>
<label
class="theme-label"
for="_datasetMetadata_description"
>
Description
</label>
<textarea
aria-invalid="false"
class="theme-textarea"
id="_datasetMetadata_description"
rows="5"
/>
</div>
</div>
</fieldset>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
.fieldset {
padding: 0;
border: none;
display: flex;
flex-flow: column;
gap: tokens.$coral-spacing-s;
}

.legend {
Expand All @@ -14,3 +11,9 @@
font: tokens.$coral-heading-m;
margin: 0;
}

.fieldset-content {
display: flex;
flex-flow: column;
gap: tokens.$coral-spacing-s;
}
10 changes: 6 additions & 4 deletions packages/design-system/src/components/Form/Fieldset/Fieldset.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, cloneElement, forwardRef } from 'react';
import type { Ref, FieldsetHTMLAttributes } from 'react';
import type { FieldsetHTMLAttributes, Ref } from 'react';
import { isElement } from 'react-is';

import styles from './Fieldset.module.scss';
Expand Down Expand Up @@ -28,9 +28,11 @@ const Fieldset = forwardRef(
{required && '*'}
</legend>
)}
{Children.toArray(children).map(child =>
isElement(child) ? cloneElement(child, childrenProps) : child,
)}
<div className={styles['fieldset-content']}>
{Children.toArray(children).map(child =>
isElement(child) ? cloneElement(child, childrenProps) : child,
)}
</div>
</fieldset>
);
},
Expand Down
Loading
Loading