Skip to content

Commit

Permalink
Merge pull request #3774 from ivanko22/develop
Browse files Browse the repository at this point in the history
Fix CSS for a candidate according to the wv-135 ticket
  • Loading branch information
DaleMcGrew committed Nov 10, 2023
2 parents 9729628 + 2883114 commit 9624693
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/js/common/components/Widgets/OfficeNameText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const PartyAndYearWrapper = styled('span')`

const PartyAndOfficeWrapper = styled('div')`
line-height: 1.2;
font-size: 14px;
`;

const YearStateWrapper = styled('div', {
Expand Down
43 changes: 22 additions & 21 deletions src/js/components/Ballot/CandidateItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,28 @@ class CandidateItem extends Component {
<>
{candidateNameRow}
</>
<BallotItemSupportOpposeCountDisplayWrapper isClickable={!blockOnClickShowOrganizationModalWithPositions}>
<Suspense fallback={<></>}>
<BallotItemSupportOpposeScoreDisplay
ballotItemWeVoteId={candidateWeVoteId}
blockOnClickShowOrganizationModalWithPositions={blockOnClickShowOrganizationModalWithPositions}
closeSupportOpposeCountDisplayModal={closeSupportOpposeCountDisplayModal}
controlAdviserMaterialUIPopoverFromProp={controlAdviserMaterialUIPopoverFromProp}
showAllPositions={this.props.goToBallotItem}
handleLeaveCandidateCard={forDesktop ? this.handleLeave : null}
handleEnterCandidateCard={forDesktop ? this.handleEnter : null}
hideEndorsementsOverview={this.props.hideEndorsementsOverview}
hideShowMoreLink={!linkToBallotItemPage}
openAdviserMaterialUIPopover={openAdviserMaterialUIPopover}
openSupportOpposeCountDisplayModal={openSupportOpposeCountDisplayModal}
supportOpposeCountDisplayModalTutorialOn={supportOpposeCountDisplayModalTutorialOn}
supportOpposeCountDisplayModalTutorialText={supportOpposeCountDisplayModalTutorialText}
showDownArrow={showDownArrow}
showUpArrow={showUpArrow}
/>
</Suspense>
</BallotItemSupportOpposeCountDisplayWrapper>

{ contestOfficeName && (
<div
className={linkToBallotItemPage && largeAreaHoverColorOnNow && showHover ? 'card__blue' : ''}
Expand Down Expand Up @@ -418,27 +440,6 @@ class CandidateItem extends Component {
</CandidateLinksWrapper>
</Candidate>
</CandidateInfo>
<BallotItemSupportOpposeCountDisplayWrapper isClickable={!blockOnClickShowOrganizationModalWithPositions}>
<Suspense fallback={<></>}>
<BallotItemSupportOpposeScoreDisplay
ballotItemWeVoteId={candidateWeVoteId}
blockOnClickShowOrganizationModalWithPositions={blockOnClickShowOrganizationModalWithPositions}
closeSupportOpposeCountDisplayModal={closeSupportOpposeCountDisplayModal}
controlAdviserMaterialUIPopoverFromProp={controlAdviserMaterialUIPopoverFromProp}
showAllPositions={this.props.goToBallotItem}
handleLeaveCandidateCard={forDesktop ? this.handleLeave : null}
handleEnterCandidateCard={forDesktop ? this.handleEnter : null}
hideEndorsementsOverview={this.props.hideEndorsementsOverview}
hideShowMoreLink={!linkToBallotItemPage}
openAdviserMaterialUIPopover={openAdviserMaterialUIPopover}
openSupportOpposeCountDisplayModal={openSupportOpposeCountDisplayModal}
supportOpposeCountDisplayModalTutorialOn={supportOpposeCountDisplayModalTutorialOn}
supportOpposeCountDisplayModalTutorialText={supportOpposeCountDisplayModalTutorialText}
showDownArrow={showDownArrow}
showUpArrow={showUpArrow}
/>
</Suspense>
</BallotItemSupportOpposeCountDisplayWrapper>
</CandidateWrapper>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const ActionBarWrapper = styled('div', {
shouldForwardProp: (prop) => !['isCrunched'].includes(prop),
})(({ isCrunched }) => (`
padding: 0;
margin-bottom: ${isCrunched ? '3px' : '12px'};
margin-bottom: ${isCrunched ? '3px' : '2px'};
`));

const CommentDisplayWrapper = styled('div', {
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/Widgets/ItemActionBar/ItemActionBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1021,8 +1021,10 @@ const ButtonGroup = styled('div', {
// border-width: 1 px;
flex-wrap: nowrap;
height: fit-content;
height: 40px;
justify-content: center;
margin-left: 0;
margin-right: 8px;
${positionPublicToggleWrapAllowed ? 'width: 100%;' : ''};
`));

Expand Down
7 changes: 5 additions & 2 deletions src/js/components/Widgets/PositionPublicToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ PositionPublicToggle.propTypes = {
const styles = (theme) => ({
radioPrimary: {
padding: '.1rem',
margin: '.1rem .1rem .6rem .6rem',
marginRight: '4px',
[theme.breakpoints.down('md')]: {
marginLeft: 0,
},
Expand All @@ -297,7 +297,7 @@ const styles = (theme) => ({
// bottom: '4px',
position: 'relative',
[theme.breakpoints.down('sm')]: {
fontSize: '11px',
fontSize: '13px',
},
marginRight: isAndroidSizeMD() ? '2px' : '',
},
Expand All @@ -309,6 +309,7 @@ const styles = (theme) => ({
const PositionPublicToggleOuterWrapper = styled('div')`
// margin-left: auto;
width: fit-content;
//padding-top: 12px;
`;

const PositionPublicToggleInnerWrapper = styled('div')(({ theme }) => (`
Expand All @@ -326,6 +327,7 @@ const RadioItem = styled('div', {
// width: 100% !important;
// min-width: 100% !important;
// margin-bottom: -6px;
padding-right: 6px;
`) : ''}
`));

Expand All @@ -335,6 +337,7 @@ const RadioGroup = styled('div', {
display: flex;
flex-flow: row nowrap;
width: 100%;
height: 40px;
${theme.breakpoints.down('md')} {
margin-bottom: -10px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/Widgets/TwitterAccountStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ const TwitterAccountStatsOuterWrapper = styled('div')`

const TwitterFollowersWrapper = styled('div')`
color: #000;
font-size: 16px;
font-size: 14px;
height: 24px;
padding: 0 !important;
`;

const TwitterHandleWrapper = styled('div')`
color: #000;
font-size: 16px;
font-size: 14px;
height: 24px;
margin-right: 5px;
padding: 0 !important;
Expand Down

0 comments on commit 9624693

Please sign in to comment.