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: issues after latest releases #1343

Merged
merged 16 commits into from
Dec 10, 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
1 change: 1 addition & 0 deletions src/components/Dropdown/Dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
box-shadow: var(--space-0) var(--space-25) var(--space-125) var(--space-0)
var(--color-transparent-10020, rgba(0, 0, 0, 0.2));
z-index: 400;
box-sizing: border-box;
}
2 changes: 1 addition & 1 deletion src/components/Input/Input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
align-items: center;
gap: var(--space-50);
padding: var(--space-150);
width: 200px;
width: 100%;

&::placeholder {
color: var(--color-text-subtlest);
Expand Down
8 changes: 4 additions & 4 deletions src/components/Pill/PillButtonEnhanced/PillButtonEnhanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { IconButton } from '../../Buttons';

export interface Props<PriorityItemValue = unknown> extends PillButtonBaseProps {
/** Label/indicator in case of multiple selection, such as `+2` for instance */
additionalContentLabel?: string;
additionalContentLabel?: React.ReactNode;
/** Tooltip content to be shown when multiple selections are shown */
additionalContentTooltip?: React.ReactNode;
/** Props needed for rendering optional priority selector */
Expand Down Expand Up @@ -99,9 +99,9 @@ export const PillButtonEnhanced = React.forwardRef(
{!!content && (
<>
<span {...elem('valueSeparator')}>:</span>
<span {...elem('content')} title={content}>
{content}
</span>
<Tooltip content={content}>
<span {...elem('content')}>{content}</span>
</Tooltip>
</>
)}
{additionalContentLabel && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ exports[`<PillButtonEnhanced> component in active, collapsed state (with content
</span>
<span
class="PillButtonEnhanced__content"
title="This pill is in use"
>
This pill is in use
</span>
Expand Down Expand Up @@ -92,7 +91,6 @@ exports[`<PillButtonEnhanced> component in active, open state (content and isOpe
</span>
<span
class="PillButtonEnhanced__content"
title="This pill is in use"
>
This pill is in use
</span>
Expand Down Expand Up @@ -256,7 +254,6 @@ exports[`<PillButtonEnhanced> component with additional props should render corr
</span>
<span
class="PillButtonEnhanced__content"
title="This pill is in use"
>
This pill is in use
</span>
Expand Down Expand Up @@ -320,7 +317,6 @@ exports[`<PillButtonEnhanced> component with additional props should set style a
</span>
<span
class="PillButtonEnhanced__content"
title="This pill is in use"
>
This pill is in use
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ exports[`<Pill> component with enhanced button variant should open dropdown when
</span>
<span
class="PillButtonEnhanced__content"
title="Pill content"
>
Pill content
</span>
Expand Down Expand Up @@ -276,7 +275,6 @@ exports[`<Pill> component with enhanced button variant should render correctly 1
</span>
<span
class="PillButtonEnhanced__content"
title="Pill content"
>
Pill content
</span>
Expand Down
11 changes: 3 additions & 8 deletions src/components/PrioritySelector/PrioritySelector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ $icon-status-colors: (
disabled: var(--color-icon-success-disabled),
),
important: (
normal: var(--color-icon-caution-default),
disabled: var(--color-icon-caution-disabled),
normal: var(--color-icon-cautious-default),
disabled: var(--color-icon-cautious-disabled),
),
optional: (
normal: var(--color-icon-subtle),
Expand Down Expand Up @@ -106,13 +106,8 @@ $icon-status-colors: (
background-color: white;
z-index: 600;

&--fixedWidth{
&--fixedWidth {
width: 232px;
}
}

}




6 changes: 6 additions & 0 deletions src/components/SelectComponents/Autosuggest/Autosuggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export interface Props<S>
/** render custom list values */
customListRender?: (suggestions) => React.ReactNode;
clearInputAfterSelection?: boolean;
/** determines if the suggestion list should be rendered using a React Portal
* to the dropdown needs to bypass parent element clipping, overflow, or z-index issues.
*/
shouldRenderWithPortal?: boolean;
}

const { elem } = bem('Autosuggest', styles);
Expand Down Expand Up @@ -94,6 +98,7 @@ export function Autosuggest<S>({
iconNode,
customListRender,
clearInputAfterSelection = true,
shouldRenderWithPortal = false,
...rest
}: Props<S>) {
const inputRef = inputRefFromProps || React.createRef<HTMLInputElement>();
Expand Down Expand Up @@ -258,6 +263,7 @@ export function Autosuggest<S>({
initInputValue={initInputValue}
clearInputAfterSelection={clearInputAfterSelection}
autoFocus={isFocused}
shouldRenderWithPortal={shouldRenderWithPortal}
/>
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/SelectComponents/Combobox/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export interface Props<S>
upArrowLabel?: string;
/** enable ListOptimizer component for decreasing render time */
useOptimizeListRender?: boolean;
/** determines if the suggestion list should be rendered using a React Portal
* to the dropdown needs to bypass parent element clipping, overflow, or z-index issues.
*/
shouldRenderWithPortal?: boolean;
}

/**
Expand Down Expand Up @@ -61,6 +65,7 @@ export function Combobox<S>({
upArrowLabel,
downArrowLabel,
useOptimizeListRender,
shouldRenderWithPortal = false,
...rest
}: Props<S>) {
const inputRef = inputRefFromProps || React.createRef<HTMLInputElement>();
Expand Down Expand Up @@ -130,6 +135,7 @@ export function Combobox<S>({
showArrow
downArrowLabel={downArrowLabel}
upArrowLabel={upArrowLabel}
shouldRenderWithPortal={shouldRenderWithPortal}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export interface Props<S> extends BasicSelectProps<S>, SelectInputFieldProps {
downArrowLabel?: string;
/** Up arrow name for ARIA labelling, it is used when the component is focused and options are shown */
upArrowLabel?: string;
/** determines if the suggestion list should be rendered using a React Portal
* to the dropdown needs to bypass parent element clipping, overflow, or z-index issues.
*/
shouldRenderWithPortal?: boolean;
}

/**
Expand Down Expand Up @@ -53,6 +57,7 @@ export function ComboboxMulti<S>({
downArrowLabel,
useOptimizeListRender = false,
inputAttrs = {},
shouldRenderWithPortal = false,
...rest
}: Props<S>) {
const inputRef = inputRefFromProps || React.createRef<HTMLInputElement>();
Expand Down Expand Up @@ -141,6 +146,7 @@ export function ComboboxMulti<S>({
focusedRenderer={renderFocused}
blurredRenderer={renderBlurred}
keepExpandedAfterSelection
shouldRenderWithPortal={shouldRenderWithPortal}
/>
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/SelectComponents/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export interface Props<S> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
rootRef?: React.RefObject<HTMLDivElement>;
/** items list ref */
listRef?: React.RefObject<HTMLUListElement>;
/** determines if the suggestion list should be rendered using a React Portal
* to the dropdown needs to bypass parent element clipping, overflow, or z-index issues.
*/
shouldRenderWithPortal?: boolean;
}

/**
Expand All @@ -67,6 +71,7 @@ export function Select<S>({
onFocus = undefined,
onClear = undefined,
listRef = undefined,
shouldRenderWithPortal = false,
...rest
}: Props<S>) {
const focusElRef = React.useRef();
Expand Down Expand Up @@ -124,6 +129,7 @@ export function Select<S>({
onBlur={onBlur}
onFocus={onFocus}
onClearAllSelected={onClear}
shouldRenderWithPortal={shouldRenderWithPortal}
listRenderer={(listProps) => (
<SuggestionsList
{...listProps}
Expand Down
8 changes: 4 additions & 4 deletions src/components/SelectComponents/SelectBase/SelectBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
}
}

&__field {
padding: 0;
}

&__spacedElem {
margin: var(--space-50);
}
Expand All @@ -42,4 +38,8 @@
&__loaderContainer {
width: 250px;
}

.SelectBase__field {
padding: 0;
}
}
Loading
Loading