Skip to content

Commit

Permalink
Fix/UI bugs (#439)
Browse files Browse the repository at this point in the history
* fix spacing issue with header links

* fix spacing on executive card

* move polls to single column at bpi 2

* dont wrap footer links columns at larger bpi
  • Loading branch information
b-pmcg authored Apr 28, 2022
1 parent 6b79a24 commit 3484633
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
5 changes: 3 additions & 2 deletions modules/app/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const Header = (): JSX.Element => {
title="View delegates page"
p={0}
sx={{
display: ['none', 'block'],
display: ['none', 'flex'],
ml: [0, 4, 4, 5],
color: router?.asPath?.startsWith('/delegates') ? 'primary' : undefined
}}
Expand All @@ -258,7 +258,8 @@ const Header = (): JSX.Element => {
title="View emergency shutdown module page"
p={0}
sx={{
display: ['none', 'block'],
flexShrink: 0,
display: ['none', 'flex'],
ml: [0, 4, 4, 5],
mr: [0, 'auto', 4, 5],
color: router?.asPath?.startsWith('/esmodule') ? 'primary' : undefined
Expand Down
19 changes: 15 additions & 4 deletions modules/executive/components/ExecutiveOverviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,20 @@ export default function ExecutiveOverviewCard({
)}
</Box>
<Flex
sx={{ alignItems: ['flex-end', 'center'], justifyContent: 'space-between', height: ['auto', 74] }}
sx={{
alignItems: ['flex-end', 'center'],
justifyContent: 'space-between',
height: ['auto', 'auto', 'auto', 74]
}}
>
<Flex sx={{ flexDirection: ['column-reverse', 'row'], width: '50%' }}>
<Flex
sx={{
flexDirection: ['column-reverse', 'row'],
flexWrap: 'wrap-reverse',
width: ['auto', 'auto', 'auto', 'auto', '55%'],
gap: [0, 3]
}}
>
<InternalLink href={`/executive/${proposal.key}`} title="View executive details">
<Button
variant="outline"
Expand All @@ -135,7 +146,7 @@ export default function ExecutiveOverviewCard({
{!hasVotedFor && canVote && (
<Button
variant="primaryOutline"
sx={{ ml: [0, 3], width: 122 }}
sx={{ width: 122 }}
disabled={hasVotedFor && votedProposals && votedProposals.length === 1}
onClick={ev => {
trackButtonClick('openExecVoteModal');
Expand Down Expand Up @@ -167,7 +178,7 @@ export default function ExecutiveOverviewCard({
</Badge>
)}
</Flex>
<Flex>
<Flex sx={{ flexShrink: 0 }}>
{spellData?.mkrSupport === undefined ? (
<Box sx={{ width: 6, ml: 'auto', height: '100%' }}>
<Skeleton />
Expand Down
2 changes: 1 addition & 1 deletion modules/home/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default function Footer({ locale = 'en' }: { locale?: string }): React.Re
justifyContent: 'space-between',
gap: [4, 2, 5],
width: ['100%', '100%', 'initial'],
flexWrap: 'wrap'
flexWrap: ['wrap', 'nowrap']
}}
>
{links.map(group => {
Expand Down
2 changes: 1 addition & 1 deletion modules/home/components/PollsOverviewLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const PollsOverviewLanding = ({ activePolls, allPolls }: Props): JSX.Elem
</Flex>
<Flex>
<ErrorBoundary componentName="Active Polls">
<Grid gap={4} columns={[1, 1, 2]}>
<Grid gap={4} columns={[1, 1, 1, 2]}>
{pollsToDisplay.map(poll => (
<PollOverviewCard key={poll.pollId} poll={poll} reviewPage={false} showVoting={false} />
))}
Expand Down

0 comments on commit 3484633

Please sign in to comment.