Skip to content

Commit

Permalink
fix: truncate proposal title (#875)
Browse files Browse the repository at this point in the history
* fix: truncate proposal title

* feat: use multi-line text
  • Loading branch information
Sekhmet authored Oct 16, 2024
1 parent e20edfe commit 5e4fc01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
16 changes: 8 additions & 8 deletions apps/ui/src/components/ProposalLabels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ watch(
);
</script>
<template>
<div v-if="inline" class="contents">
<div
v-for="label in validLabels"
:key="label.id"
class="inline-flex mr-2 mb-2"
>
<UiProposalLabel :label="label.name" :color="label.color" />
<template v-if="inline">
<div v-for="label in validLabels" :key="label.id" class="inline-flex mr-2">
<UiProposalLabel
:label="label.name"
:color="label.color"
class="text-sm mb-1 max-w-[160px]"
/>
</div>
</div>
</template>
<div v-else>
<div class="flex justify-between mb-3">
<h4 class="eyebrow" v-text="'Labels'" />
Expand Down
7 changes: 3 additions & 4 deletions apps/ui/src/components/ProposalsListItemHeading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const space = computed(() =>
<ProposalIconStatus size="17" :state="proposal.state" class="top-1.5" />
</AppLink>

<div class="md:min-w-0 my-1 items-center leading-6">
<div class="min-w-0 my-1 items-center leading-6">
<AppLink
v-if="showSpace"
:to="{
Expand All @@ -66,10 +66,9 @@ const space = computed(() =>
space: `${proposal.network}:${proposal.space.id}`
}
}"
class="md:min-w-0"
>
<h3
class="text-[21px] inline [overflow-wrap:anywhere] md:truncate mr-2"
class="text-[21px] inline [overflow-wrap:anywhere] mr-2 min-w-0"
v-text="proposal.title || `Proposal #${proposal.proposal_id}`"
/>
<ProposalLabels
Expand All @@ -82,7 +81,7 @@ const space = computed(() =>
v-if="
showVotedIndicator && votes[`${proposal.network}:${proposal.id}`]
"
class="text-skin-success inline-block shrink-0 relative top-[-1px] md:top-0.5"
class="text-skin-success inline-block shrink-0 relative"
/>
</AppLink>
</div>
Expand Down

0 comments on commit 5e4fc01

Please sign in to comment.