Skip to content

Commit

Permalink
fix(ui): fix overflowing text (#4879)
Browse files Browse the repository at this point in the history
* fix: limit username max length

* fix: break works to prevent content spilling outside the box

* fix: prevent long username to overflow its container

* fix: do not shrink the copy address button to prevent multiline button
  • Loading branch information
wa0x6e committed Sep 18, 2024
1 parent da349c4 commit 071f4aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/BaseBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const isCollapsed = ref(true);
<div
v-if="!loading && (!isCollapsed || !isCollapsable)"
:class="!slim && 'p-4'"
class="leading-5 sm:leading-6"
class="leading-5 sm:leading-6 break-words"
>
<slot />
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavbarAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ watch(
/>
<span
v-if="profile?.name || profile?.ens"
class="hidden sm:block"
class="hidden sm:block max-w-[120px] truncate"
v-text="profile.name || profile.ens"
/>
<span v-else class="hidden sm:block" v-text="shorten(web3Account)" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileAddressCopy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const { copyToClipboard } = useCopy();
</div>
</button>
<button
class="flex cursor-pointer items-center rounded border px-1 text-xs"
class="flex cursor-pointer items-center rounded border px-1 text-xs shrink-0"
@click="copyToClipboard(userAddress)"
>
{{ shorten(userAddress) }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/SpaceDelegate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ onBeforeRouteLeave(async () => {
<div>
<AvatarUser :address="address" size="40" />
</div>
<div class="ml-2">
<div class="ml-2 truncate">
<ProfileName
:profile="getProfile(address)"
:address="address"
Expand Down

0 comments on commit 071f4aa

Please sign in to comment.