hackerkid / hackerkid/Mind-Expanding-Books

Implement text clamping and conditional "Show More" button for long descriptions

Open
#494 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi @hackerkid, I have found a minor issue in Mind-Expanding-Books

Currently, the "Show More" button is displayed for all book descriptions, even when the description is short and doesn't require expansion.I would like to use **text clamping** to limit the visible description to a few lines, and only show the button if the content exceeds this limit. Short descriptions will display fully without the button.

![image](https://github.com/user-attachments/assets/8e926b9a-9ddd

It ensures that the interface remains clean and improves the user experience by only showing the "Show More" button when it's actually needed.I would love to contribute and solve this issue if it aligns with the project's goals. Please let me know if I can work on this!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.