Skip to content

Truncate long descriptions and add "Show More" toggle#148

Merged
tarekio merged 21 commits intomainfrom
BYNT-598-Cap-description-length-in-related-items-add-show-more-button
Aug 21, 2025
Merged

Truncate long descriptions and add "Show More" toggle#148
tarekio merged 21 commits intomainfrom
BYNT-598-Cap-description-length-in-related-items-add-show-more-button

Conversation

@apodacaduron
Copy link
Contributor

@apodacaduron apodacaduron commented Aug 4, 2025

Jira Issue

  1. BYNT-598

Description

This PR introduces a new reusable ReadMore component that truncates long descriptions and adds a "Show More / Show Less" toggle for better readability.

While the original issue was specific to related items cards, the component has been applied more broadly across the project where long text is displayed. This improves the overall consistency and UX in multiple areas.

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • New strings prepared for translations

API Changes (if applicable)

  • Permissions checked
  • Endpoint tests added

Additional Notes

[Any other relevant information]

@apodacaduron apodacaduron requested a review from tarekio August 4, 2025 20:18
@apodacaduron apodacaduron self-assigned this Aug 4, 2025
Copy link
Contributor

@tarekio tarekio left a comment

Choose a reason for hiding this comment

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

  1. Let's triple the length of initial length, and 2. let's stick to current design elements (use load more component in relations).

@tarekio tarekio requested a review from level09 August 8, 2025 12:48
Copy link
Collaborator

@level09 level09 left a comment

Choose a reason for hiding this comment

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

I found another bug but not related to this MR

we are resetting the wrong variable in RelatedIncidentsCard and RelatedActorsCard

this.bulletinPage = 1

So maybe we could also fix it along the way.

@apodacaduron
Copy link
Contributor Author

@tarekio length has been tripled from 5 to 15 lines and updated the style of the Show more button to be similar to the Load more button in relations

@tarekio
Copy link
Contributor

tarekio commented Aug 18, 2025

Let's remove this from data tables please. We should simply truncate titles in the tables so each item appears on one line only.

@apodacaduron
Copy link
Contributor Author

@tarekio removed component from data tables and added a simple class to truncate to 1 line

Copy link
Contributor

@tarekio tarekio left a comment

Choose a reason for hiding this comment

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

Good enough for now. @level09 over to you.

Copy link
Collaborator

@level09 level09 left a comment

Choose a reason for hiding this comment

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

Well Done 👏

@tarekio tarekio merged commit 070e529 into main Aug 21, 2025
6 of 7 checks passed
@tarekio tarekio deleted the BYNT-598-Cap-description-length-in-related-items-add-show-more-button branch August 21, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants