Skip to content

Commit

Permalink
Merge pull request #4194 from DaleMcGrew/Dale_WebApp_Dec3-2024
Browse files Browse the repository at this point in the history
Turning off new ballot address section of profile while we add some new pre-launch fixes. Added some ids needed by QA Automation team.
  • Loading branch information
DaleMcGrew authored Dec 3, 2024
2 parents c390d12 + 9511b60 commit 16961ab
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/js/common/pages/Challenge/ChallengeLeaderboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ const ChallengeLeaderboard = ({ classes, challengeWeVoteId, clearSearchFunction,
</ButtonAndSearchWrapper>
<LeaderboardInfoWrapper>
{!!(rankOfVoter) && (
<YourRankOutOf rankOfVoter={rankOfVoter} participantsCount={participantsCount} />
)}
<YourRankOutOf rankOfVoter={rankOfVoter} participantsCount={participantsCount} />
)}
</LeaderboardInfoWrapper>
<LeaderboardTableHeader>
<div style={{display: 'flex', gap: '32px'}}>
Expand Down
3 changes: 2 additions & 1 deletion src/js/common/utils/textFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function calculateBallotBaseUrl (incomingBallotBaseUrl, incomingPathname)
ballotBaseUrl = `${temp4}/ballot`;
// console.log("ballotBaseUrl:", ballotBaseUrl);
} else {
ballotBaseUrl = incomingPathname || '/ballot';
// ballotBaseUrl = incomingPathname || '/ballot'; // Changed for WV-676 but needs review
ballotBaseUrl = incomingBallotBaseUrl || '/ballot';
}
return ballotBaseUrl;
}
Expand Down
5 changes: 3 additions & 2 deletions src/js/components/Navigation/SettingsPersonalSideBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ export default class SettingsPersonalSideBar extends Component {
renderLog('SettingsPersonalSideBar'); // Set LOG_RENDER_EVENTS to log all renders
// console.log("SettingsPersonalSideBar, isOrganization: ", this.state.isOrganization);
const { editMode } = this.props;
const { isOnPartnerUrl, isSignedIn, isOrganization, showPremiumFeatures, voterIsAdminForThisUrl } = this.state;
const { isOnPartnerUrl, isSignedIn, isOrganization, showPremiumFeatures, voterIsAdminForThisUrl } = this.state;
const showSettingsInDevelopment = false; // If developing any of the new settings, change this to true
const isOnPartnerUrlAndNotAdmin = isOnPartnerUrl && !voterIsAdminForThisUrl;
const alwaysTrue = true; // A temp fix for https://wevoteusa.atlassian.net/browse/WV-168
const pigsCanFly = false;

return (
<div className="card">
Expand All @@ -110,7 +111,7 @@ export default class SettingsPersonalSideBar extends Component {
</div>
)}

{(isSignedIn) && (
{(isSignedIn && pigsCanFly) && ( // Turning this off until we can work on it more
<div className={String(editMode) === 'address' ?
'SettingsItem__summary__item-container SettingsItem__summary__item-container--selected' :
'SettingsItem__summary__item-container'}
Expand Down
6 changes: 3 additions & 3 deletions src/js/components/Widgets/AnnotatedSlideshow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class AnnotatedSlideshow extends PureComponent {
const { slides, selectedStepIndex, classes, inModal = false } = this.props;
const data = Object.values(slides);
const { length } = data;
const { title, description, imgSrc } = data.find((slide) => slide.index === selectedStepIndex);
const { title, titleId, description, descriptionId, imgSrc } = data.find((slide) => slide.index === selectedStepIndex);
// console.log('AnnotatedSlideshow selectedStepIndex:', selectedStepIndex, 'length:', length);
return (
<Wrapper inModal={inModal}>
<InnerWrapperAboveButtons>
<SlideShowTitle inModal={inModal}>{title}</SlideShowTitle>
<Description>{description}</Description>
<SlideShowTitle id={titleId} inModal={inModal}>{title}</SlideShowTitle>
<Description id={descriptionId}>{description}</Description>
<Slide>
{!inModal && (
<Nav disabled={selectedStepIndex === 0} id="howItWorksLeftArrow" onClick={() => this.handleChangeSlide(false)}>
Expand Down
28 changes: 28 additions & 0 deletions src/js/pages/HowItWorks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,41 @@ class HowItWorks extends Component {
forCampaignsSteps: {
Claim: {
title: '1. Claim your campaign profile',
titleId: 'claimYourCampaignProfile',
description: 'Sign in & verify your account using your official X account or other secure method. WeVote takes verification very seriously. (No trolls allowed!)',
descriptionId: 'claimYourCampaignProfileDescription',
imgSrc: '/img/how-it-works/HowItWorksForCampaigns-Claim-20190516.gif?',
index: 0,
},
Import: {
title: '2. Import your endorsements',
titleId: 'importEndorsements',
description: 'We are here to help you get your opinions in front of voters, whether you have 5 endorsements, or 1,005. WeVote\'s unique tech instamagically captures endorsement data from your website, spreadsheets, or text lists of candidates. No formatting overhauls required.',
descriptionId: 'importEndorsementsDescription',
imgSrc: '/img/how-it-works/HowItWorksForCampaigns-Import-20190425.gif?',
index: 1,
},
Customize: {
title: '3. Add more customizations for your supporters',
titleId: 'addMoreCustomizations',
description: 'Want all the bells and whistles? WeVote offers a lot for free, but has paid premium features that include the endorsements from your chapters and partners, and give you deeper analytics.',
descriptionId: 'addMoreCustomizationsDescription',
imgSrc: '/img/how-it-works/HowItWorksForCampaigns-Customize-20190425.gif?',
index: 2,
},
Launch: {
title: '4. Launch to your people',
titleId: 'launchToYourPeople',
description: 'Promote your unique url over your email, text, and social media channels. Add the WeVote widget directly to your campaign website.',
descriptionId: 'launchToYourPeopleDescription',
imgSrc: '/img/how-it-works/HowItWorksForCampaigns-Launch-20190506.gif?',
index: 3,
},
SocialLift: {
title: '5. Social lift',
titleId: 'socialLift',
description: 'Let your people share with their friends. Watch your social lift in real time.',
descriptionId: 'socialLiftDescription',
imgSrc: '/img/how-it-works/HowItWorksForCampaigns-SocialLift-20190506.gif?',
index: 4,
},
Expand All @@ -61,25 +71,33 @@ class HowItWorks extends Component {
forOrganizationsSteps: {
Claim: {
title: '1. Claim your organization profile',
titleId: 'claimYourOrganizationProfile',
description: 'Sign in & verify your organization using your official X account or other secure method. WeVote takes verification very seriously. (No trolls allowed!)',
descriptionId: 'claimYourOrganizationProfileDescription',
imgSrc: '/img/how-it-works/HowItWorksForOrgs-Claim-20190506.gif?',
index: 0,
},
Customize: {
title: '2. Customize your Election Center',
titleId: 'customizeYourElectionCenter',
description: 'Want all the bells and whistles? WeVote offers a lot for free, but has paid premium features to help you further customize branding and messaging, and give you deeper analytics.',
descriptionId: 'customizeYourElectionCenterDescription',
imgSrc: '/img/how-it-works/HowItWorksForOrgs-Customize-20190507.gif?',
index: 1,
},
Launch: {
title: '3. Launch',
titleId: 'launch',
description: 'Share your unique url over your email, text, and social media channels. Add the WeVote widget directly to your website.',
descriptionId: 'launchDescription',
imgSrc: '/img/how-it-works/HowItWorksForOrgs-Launch-20190506.gif?',
index: 2,
},
SocialLift: {
title: '4. Social lift',
titleId: 'socialLift',
description: 'Let your people share with their friends. Watch your social lift in real time.',
descriptionId: 'socialLiftDescription',
imgSrc: '/img/how-it-works/HowItWorksForOrgs-SocialLift-20190506.gif?',
index: 3,
},
Expand All @@ -88,31 +106,41 @@ class HowItWorks extends Component {
forVoterSteps: {
Choose: {
title: '1. Choose your interests',
titleId: 'chooseYourInterests',
description: 'Follow topics that interest you. We will suggest endorsements based on your interests.',
descriptionId: 'chooseYourInterestsDescription',
imgSrc: '/img/how-it-works/HowItWorksForVoters-Choose-20190507.gif?',
index: 0,
},
Follow: {
title: '2. Follow organizations and people you trust',
titleId: 'followOrganizationsAndPeople',
description: 'Learn from the people you trust. Their recommendations are highlighted on your ballot.',
descriptionId: 'followOrganizationsAndPeopleDescription',
imgSrc: '/img/how-it-works/HowItWorksForVoters-Follow-20190507.gif?',
index: 1,
},
Review: {
title: '3. See who endorsed each choice on your ballot',
titleId:'seeWhoEndorsedEachChoice',
description: 'Your personalized score for a candidate is the number of people who support the candidate, from among the people you follow.',
descriptionId:'seeWhoEndorsedEachChoiceDescription',
imgSrc: '/img/how-it-works/HowItWorksForVoters-Review-20190401.gif?',
index: 2,
},
Decide: {
title: '4. Complete your ballot with confidence',
titleId: 'completeYourBallotWithConfidence',
description: 'WeVote is fast, mobile, and helps you decide on the go. Vote with confidence!',
descriptionId: 'completeYourBallotWithConfidenceDescription',
imgSrc: '/img/how-it-works/HowItWorksForVoters-Decide-20190401.gif?',
index: 3,
},
Friends: {
title: '5. Share with friends who could use a guide',
titleId: 'friends',
description: 'Are your family and friends feeling lost when it\'s time to vote? Be their hero, no matter which state they vote in.',
descriptionId: 'friendsDescription',
imgSrc: '/img/how-it-works/HowItWorksForVoters-Friends-20190401.gif?',
index: 4,
},
Expand Down
3 changes: 2 additions & 1 deletion src/js/pages/Settings/HamburgerMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default class HamburgerMenu extends Component {
const nextReleaseFeaturesEnabled = webAppConfig.ENABLE_NEXT_RELEASE_FEATURES === undefined ? false : webAppConfig.ENABLE_NEXT_RELEASE_FEATURES;
console.log(`Hamburger menu this.state.showDeviceDialog ${this.state.showDeviceDialog}`);
const version = getCordovaBuildVersion();
const pigsCanFly = false;

return (
<PageContentContainer>
Expand Down Expand Up @@ -170,7 +171,7 @@ export default class HamburgerMenu extends Component {
/>
)}

{isSignedIn && (
{(isSignedIn && pigsCanFly) && (
<HamburgerMenuRow
icon="fa fa-address-card"
iconStyle={{ fontSize: 28, color: '#1c2f4b' }}
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function $ajax (options) {
clearInterval(waitForJQuery);
innerAjax(options);
}
if (loop++ > 400) {
if (loop++ > 400 && loop < 405) {
throw new Error('$ajax could not load jQuery within 20 seconds');
}
}, 10);
Expand Down

0 comments on commit 16961ab

Please sign in to comment.