Skip to content
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
6 changes: 6 additions & 0 deletions src/generic/inplace-text-editor/InplaceTextEditor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.inplace-text-editor-label {
display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
9 changes: 4 additions & 5 deletions src/generic/inplace-text-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Form,
Icon,
IconButton,
Truncate,
Stack,
} from '@openedx/paragon';
import { Edit } from '@openedx/paragon/icons';
Expand Down Expand Up @@ -69,9 +68,9 @@ export const InplaceTextEditor: React.FC<InplaceTextEditorProps> = ({
// In that case, we show the new text instead of the original in read-only mode as an optimistic update.
if (readOnly || pendingSaveText) {
return (
<Truncate.Deprecated className={textClassName}>
<div className={`inplace-text-editor-label ${textClassName}`}>
{pendingSaveText || text}
</Truncate.Deprecated>
</div>
);
}

Expand All @@ -93,9 +92,9 @@ export const InplaceTextEditor: React.FC<InplaceTextEditorProps> = ({
)
: (
<>
<Truncate.Deprecated className={textClassName}>
<div className={`inplace-text-editor-label ${textClassName}`}>
{text}
</Truncate.Deprecated>
</div>
<IconButton
src={Edit}
iconAs={Icon}
Expand Down
1 change: 1 addition & 0 deletions src/generic/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
@import "./block-type-utils";
@import "./modal-iframe";
@import "./alert-message";
@import "./inplace-text-editor/InplaceTextEditor";
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface OverflowLinksProps {
const OverflowLinks = ({ children, to }: OverflowLinksProps) => {
if (typeof to === 'string') {
return (
<Link className="link-muted" to={to}>
<Link className="subsection-breadcrumb link-muted" to={to}>
{children}
</Link>
);
Expand Down
8 changes: 8 additions & 0 deletions src/library-authoring/section-subsections/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@
padding: 0;
}
}

.subsection-breadcrumb {
max-width: 700px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}