Skip to content

Commit

Permalink
Merge pull request #4122 from DaleMcGrew/Dale_WebApp_Oct17-2024
Browse files Browse the repository at this point in the history
Fixed "Ballot for..." display bug. Fixed styling format errors. Gave a little more spacing for Challenges footer text.
  • Loading branch information
DaleMcGrew authored Oct 17, 2024
2 parents a8edb80 + 6f3a746 commit 3844dee
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
26 changes: 12 additions & 14 deletions src/js/common/components/Navigation/ChallengeInviteSteps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,21 @@ const HeaderContainer = styled('div')`
width: 100%;
`;

const LearnMoreButton = styled('button')`{
background: none;
border: none;
color: ${DesignTokenColors.primary500};
font-size: 13px;
font-weight: 500;
text-decoration: none;
}
const LearnMoreButton = styled('button')`
background: none;
border: none;
color: ${DesignTokenColors.primary500};
font-size: 13px;
font-weight: 500;
text-decoration: none;
`;

const TitleH2 = styled('h2')`
color: ${DesignTokenColors.neutral900};
font-size: 20px;
font-weight: 600;
line-height: 25px;
margin: 0 10px;
}
color: ${DesignTokenColors.neutral900};
font-size: 20px;
font-weight: 600;
line-height: 25px;
margin: 0 10px;
`;
const Wrapper = styled('div')`
align-items: center;
Expand Down
19 changes: 10 additions & 9 deletions src/js/components/Ballot/BallotTitleHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,20 @@ class BallotTitleHeader extends Component {
<BallotAddress
allowTextWrap={allowTextWrap}
centerText={centerText}
className={linksOff ? '' : 'u-cursor--pointer'}
id="ballotTitleBallotAddress"
onClick={this.showSelectBallotModalEditAddress}
>
Ballot for
{' '}
<button style={{ backgroundColor: 'transparent', border: 'none', padding: '0' }} type="button">
<span
className={linksOff ? '' : 'u-cursor--pointer u-link-color u-link-underline-on-hover'}
onClick={this.showSelectBallotModalEditAddress}
>
<span
className={linksOff ? '' : 'u-link-color u-link-underline-on-hover'}
>
<span>
{(textForMapSearch && textForMapSearch !== '') ? textForMapSearch : originalTextAddress}
</span>
{linksOff ? <></> : editIconStyled}
</button>
</span>
</BallotAddress>
) : (
<>
Expand All @@ -223,7 +224,7 @@ class BallotTitleHeader extends Component {
>
Ballot for
{' '}
<span className={linksOff ? '' : 'u-link-color'}>
<span className={linksOff ? '' : 'u-link-color u-link-underline-on-hover'}>
{substitutedAddress}
</span>
{linksOff ? <></> : editIconStyled}
Expand All @@ -236,7 +237,7 @@ class BallotTitleHeader extends Component {
id="ballotTitleBallotAddress"
onClick={this.showSelectBallotModalEditAddress}
>
<span className={linksOff ? '' : 'u-link-color'}>
<span className={linksOff ? '' : 'u-link-color u-link-underline-on-hover'}>
Click to enter your address
</span>
{linksOff ? <></> : editIconStyled}
Expand Down Expand Up @@ -271,7 +272,7 @@ class BallotTitleHeader extends Component {
</ElectionNameScrollContent>
</OverflowContent>
</OverflowContainer>
{electionDayTextObject && (
{(!turnOffVoteByBelow && electionDayTextObject) && (
<VoteByRightWrapper electionDateBelow={electionDateBelow}>
<VoteByRightLabel>
{daysUntilElection > 0 ? (
Expand Down
10 changes: 6 additions & 4 deletions src/js/components/Navigation/FooterBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class FooterBar extends React.Component {
},
'& .MuiBottomNavigationAction-label': {
fontSize: 16,
marginBottom: '-4px',
},
};
const groupsIconStyles = {
Expand All @@ -214,7 +215,7 @@ class FooterBar extends React.Component {
},
'& .MuiBottomNavigationAction-label': {
fontSize: 16,
marginBottom: '4px',
marginBottom: '3px',
marginTop: '-5px',
},
};
Expand Down Expand Up @@ -271,7 +272,8 @@ class FooterBar extends React.Component {
showLabel
sx={defaultIconStyles}
style={{
paddingLeft: '0px',
marginLeft: '-4px',
paddingLeft: 0,
}}
/>
<BottomNavigationAction
Expand Down Expand Up @@ -300,7 +302,7 @@ class FooterBar extends React.Component {
)}
label="Candidates"
style={{
marginLeft: '2px',
marginLeft: '-4px',
}}
showLabel
sx={defaultIconStyles}
Expand Down Expand Up @@ -341,7 +343,7 @@ class FooterBar extends React.Component {
label="Challenges"
showLabel
style={{
marginLeft: '8px',
marginLeft: '4px',
}}
sx={groupsIconStyles}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/js/components/Style/BallotTitleHeaderStyles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export const VoteByBelowWrapper = styled('div', {
display: flex;
${centerText ? 'justify-content: center;' : 'justify-content: start;'}
margin: -2px 0 0 2px;
${theme.breakpoints.up('md')} {
${electionDateBelow ? '' : 'display: none;'}
}
// ${theme.breakpoints.up('md')} {
// ${electionDateBelow ? '' : 'display: none;'}
// }
`));

export const VoteByRightLabel = styled('div')`
Expand All @@ -123,7 +123,7 @@ export const VoteByRightLabel = styled('div')`
export const VoteByRightWrapper = styled('div', {
shouldForwardProp: (prop) => !['electionDateBelow'].includes(prop),
})(({ electionDateBelow, theme }) => (`
${electionDateBelow ? 'display: none;' : 'display: block;'}
// ${electionDateBelow ? 'display: none;' : 'display: block;'}
margin-left: 8px;
margin-top: 4px;
${theme.breakpoints.down('md')} {
Expand Down
1 change: 1 addition & 0 deletions src/js/pages/Ballot/Ballot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,7 @@ class Ballot extends Component {
<header className="ballot__header__group">
<BallotTitleHeaderContainer marginTopOffset={this.marginTopOffset()}>
<BallotTitleHeader
electionDateBelow
showShareButton
toggleSelectBallotModal={this.toggleSelectBallotModal}
/>
Expand Down

0 comments on commit 3844dee

Please sign in to comment.