Skip to content

Commit

Permalink
Merge pull request #22 from DevlinRocha/bug/text-overflow
Browse files Browse the repository at this point in the history
Fixed overflow issues throughout app
  • Loading branch information
DevlinRocha authored Jan 13, 2022
2 parents 786d4aa + 650bc97 commit a9d5c64
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/components/MemberProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ const UsernameContainer = tw.div`
`;

const Username = tw.span`
break-all
`;

const Tag = tw(Username)`
const Tag = tw.span`
text-gray-600
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ const StyledImage = tw(Image)`
`;

const Username = tw.span`
ml-3 flex-1 overflow-hidden
ml-3 flex-1 overflow-hidden truncate
`;
21 changes: 16 additions & 5 deletions src/components/channels/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ export default function Channels() {
return (
<Link href={channel.path} key={index} passHref>
<a onClick={() => joinChannel(channel)}>
<Channel channel={channel} path={router.asPath}>
# {channel.name}
</Channel>
<ChannelContainer channel={channel} path={router.asPath}>
<ChannelIcon>
{channel.type === "text" ? "#" : "*"}
</ChannelIcon>
<ChannelName>{channel.name}</ChannelName>
</ChannelContainer>
</a>
</Link>
);
Expand Down Expand Up @@ -139,7 +142,7 @@ const Header = tw.header`
`;

const Heading = tw.h1`
font-semibold
font-semibold truncate
`;

const StyledImage = tw(Image)`
Expand All @@ -148,10 +151,18 @@ const StyledImage = tw(Image)`
const ChannelList = tw.ol`
`;

const Channel = tw.li<ChannelProps>`
const ChannelContainer = tw.li<ChannelProps>`
flex cursor-pointer py-1 pr-2 mx-2 pl-2 rounded-md
${(props) =>
props.path.includes(props.channel.channelID)
? "bg-gray-500/[0.24]"
: "hover:bg-gray-500/[0.08]"}
`;

const ChannelIcon = tw.span`
mr-1.5 text-gray-500 font-bold
`;

const ChannelName = tw.span`
truncate
`;
4 changes: 2 additions & 2 deletions src/components/channels/UserPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ const StyledImage = tw(Image)`
`;

const Username = tw.span`
flex flex-col overflow-hidden select-text cursor-pointer
flex flex-col w-[84px] overflow-hidden select-text cursor-pointer
`;

const DisplayName = tw.span`
text-sm font-semibold
text-sm font-semibold truncate
`;

const Tag = tw.span`
Expand Down
2 changes: 1 addition & 1 deletion src/components/chat/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const MessageInfo = tw.div`
`;

const Username = tw.h2`
mr-1 text-gray-900 font-semibold cursor-pointer
mr-1 text-gray-900 font-semibold cursor-pointer break-all
hover:underline hover:decoration-gray-900
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ export default function MyAccountCard() {
}

const Container = tw.section`
relative flex flex-col bg-gray-200 rounded
relative flex flex-col min-w-[655px] max-w-[660px] bg-gray-200 rounded
`;

const ProfileContainer = tw.section`
flex h-18 pt-4 pr-4 pl-30 rounded-md
flex h-18 pt-4 pr-4 pl-30 rounded-md overflow-clip
`;

const SettingContainer = tw.section`
flex flex-col m-4 mt-2 p-4 bg-gray-100 rounded
`;

const Banner = tw.span`
w-165 h-25 rounded-t-md
w-full h-25 rounded-t-md
`;

const ProfilePicture = tw.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ const UsernameContainer = tw.div`
`;

const Username = tw.span`
break-all
`;

const Tag = tw(Username)`
const Tag = tw.span`
text-gray-600
`;

Expand Down

1 comment on commit a9d5c64

@vercel
Copy link

@vercel vercel bot commented on a9d5c64 Jan 13, 2022

Choose a reason for hiding this comment

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

Please # to comment.