Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-19662: Enforce Height Limit on Thumbnail and Character Limit on Description in Template Card #1752

Merged
merged 4 commits into from
Oct 22, 2024
Merged
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
10 changes: 9 additions & 1 deletion src/components/ScreenTemplateCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="template-details">
<span class="template-name d-block pt-1">{{ template.name }}</span>
<span class="template-description d-block">{{
template.description
truncateText(template.description, 100)
}}</span>
</div>
<b-collapse v-model="isApplyOptionsActive">
Expand Down Expand Up @@ -178,6 +178,10 @@ export default {
} else {
this.selected.splice(index, 1);
}
},
truncateText(text, limit) {
if (!text) return "";
return text.length > limit ? `${text.substring(0, limit)}...` : text;
}
}
};
Expand Down Expand Up @@ -213,10 +217,14 @@ export default {

.thumbnail-image {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px 8px 0px 0px;
}

.thumbnail-image-container {
width: 100%;
height: 107px;
border-radius: 8px;
padding: 0px !important;
background-size: contain;
Expand Down
Loading