Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

fix(discover): add line limits to recommendations over character limits [MS-59] #59

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

anthony-liddle
Copy link

Goal

Update text limits from character limits to line limits

To Do:

  • Remove limit from title
  • Update limit on excerpt from character based to line based

Implementation Decisions

The request was to remove all limits from the Title, as that is automatically truncated on the server to 255 characters.

The description needs to be clamped to a maximum of 3 lines.

@anthony-liddle anthony-liddle requested a review from a team as a code owner October 11, 2023 18:39
return str
return `${str.slice(0, str.lastIndexOf(' ', maxLen))}...`
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this anymore

bye

display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting all this CSS here instead of using UnoCSS for readability.

All these pieces are needed for clamping the line, so instead of breaking it up into different locations it felt best to colocate it all here.

The p tag had an existing line-height of 1.6, so I'm explicitly declaring it here so it makes sense with the max-height.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call

@anthony-liddle anthony-liddle merged commit 22e9645 into main Oct 11, 2023
3 checks passed
@anthony-liddle anthony-liddle deleted the fix/discover-line-limits branch October 11, 2023 21:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants