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

prevented overflow in expression #13014

Merged
Show file tree
Hide file tree
Changes from 13 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.code {
flex: 1;
background-color: var(--fds-semantic-surface-neutral-subtle);
border: 1px solid var(--fds-semantic-border-neutral-subtle);
border-radius: var(--fds-border_radius-small);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type StudioCodeFragmentProps = HTMLAttributes<HTMLElement>;
const StudioCodeFragment = forwardRef<HTMLElement, StudioCodeFragmentProps>(
({ children, className: givenClass, ...rest }, ref) => {
const className = cn(classes.code, givenClass);

return (
<code className={className} {...rest} ref={ref}>
{children}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.fieldsetContent {
align-items: stretch;
box-sizing: border-box;
display: flex;
flex-direction: column;
display: grid;
gap: var(--studio-expression-spacing);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
gap: var(--fds-spacing-1);
justify-content: flex-start;
}

.codeFragment {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ const DataModelLookupValue = ({
return (
<Binding
name={texts.readonlyDataModelPath}
binding={<StudioCodeFragment>{value.path}</StudioCodeFragment>}
binding={
<StudioCodeFragment title={value.path} className={classes.codeFragment}>
{value.path}
</StudioCodeFragment>
}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
display: flex;
align-items: center;
color: var(--fds-semantic-text-neutral-default);
width: 100%;
}

.editIconWrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
padding: var(--fds-spacing-5);
}

.ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 245px;
standeren marked this conversation as resolved.
Show resolved Hide resolved
}

.duplicatedIdField {
background-color: var(--fds-semantic-surface-danger-subtle) !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export const EditComponentIdRow = ({
propertyPath='definitions/component/properties/id'
key={component.id}
viewProps={{
children: <Trans i18nKey={'ux_editor.id_identifier'} values={{ item: component.id }} />,
children: (
<span className={classes.ellipsis} title={component.id}>
<Trans i18nKey={'ux_editor.id_identifier'} values={{ item: component.id }} />
</span>
),
variant: 'tertiary',
fullWidth: true,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

.legendContent {
margin-left: var(--studio-expression-spacing);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.deleteButton {
Expand Down