kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Long name of the lesson overlaps the other items in the "lessons" block on the *Class home* page

Open ghost opened this issue 5 years ago • 2 comments

Environment; Raspberry Pi 3B+ OS: Kolibri 0.14.3 tested on Mac mini (Mid 2011) Browser: Google Chrome latest

Severity; minor

Preconditions; user is logged in as a coach, Class home page is opened;

Steps to reproduce;

  1. Proceed to the Plan>Lessons page
  2. Create a new lesson with 50 characters in the title
  3. Come back to the Class home page
  4. Pay attention to displaying the created lesson block

Actual result: Long name of the lesson overlaps the other items in the "lessons" block on the Class home page Expected result: Long name of the lesson doesn't overlap the other items in the "lessons" block on the Class home page Attachment: http://e.pc.cd/PFbotalK

ghost avatar Oct 19 '20 13:10 ghost

Just noting that "long names" here means "long unbroken string" like the example in the video. Names with many individual words like "a b c d e f..." won't display in a single long line.

What makes fixing this issue difficult is that there is no linguistically sound way break up or hyphenate words in general to avoid this layout issue.

jonboiser avatar Oct 19 '20 17:10 jonboiser

This should be resolved by wrapping the text in our CSSTextTruncator component.

rtibbles avatar Jul 28 '22 20:07 rtibbles

Is this issue still open? I would like to work on this.

nikkuAg avatar Feb 09 '24 16:02 nikkuAg

Hi @nikkuAg, yes I will assign you, thank you

MisRob avatar Feb 12 '24 07:02 MisRob

Hi, I have looked for the bug, and to solve this, I was thinking of implementing one of the below methods, either to hide the complete name and show ... when the text overflows:

image

Or to break the word:

image

Also, to make any of these changes, should I add a new class in the Lessons component and the functionality in the design system repository or add the CSS change in the existing class?

nikkuAg avatar Feb 12 '24 11:02 nikkuAg

Hi @nikkuAg, let's go with the text truncation, since we can't really say if it will be two or three or more lines. Please use the existing TextTruncatorCss component.

MisRob avatar Feb 13 '24 17:02 MisRob

@MisRob I have added a PR for this issue

nikkuAg avatar Feb 14 '24 11:02 nikkuAg

Thansk @nikkuAg! I will review, most likely some time next week.

MisRob avatar Feb 15 '24 12:02 MisRob

Closed by https://github.com/learningequality/kolibri/pull/11874

MisRob avatar Feb 15 '24 14:02 MisRob