Skip to content

UI/UX Updates for Voting Window#85

Merged
jmanhart merged 8 commits into
masterfrom
feature/voting-ui-prep
Aug 24, 2025
Merged

UI/UX Updates for Voting Window#85
jmanhart merged 8 commits into
masterfrom
feature/voting-ui-prep

Conversation

@jmanhart

@jmanhart jmanhart commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

UI/UX Updates for Voting Window

CHANGES MADE
Screenshot 2025-08-24 at 1 54 04 PM

Before
Screenshot 2025-08-24 at 1 54 07 PM

Changes Made

  • Added Region Toggle Filter: New region-based project filtering with West Coast, East Coast, Europe, and My Votes options
  • Updated Vote Tags: Added "You Voted {Category}" tags to project rows showing the users votes
  • Fixed Navigation: Updated header navigation to default to "All Projects" tab
  • REMOVED - The filter for ideas. No one needs to see ideas
  • REMOVED - The Project creation button. No one should be making projects now anyways

TODO

  • - we need to check how this works on previous years [DONE]

@jmanhart
jmanhart requested a review from nikolovlazar August 24, 2025 21:01
Comment thread src/pages/ProjectList.js
Comment on lines +568 to +572
// Filter for projects the user has voted on
const userVotes = year ? getAuthUserVotes(auth.uid, year.votes) : [];
projects = projects.filter((project) =>
userVotes.some((vote) => vote.project === project.key)
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential bug: The "My Votes" filter in renderClosedYear will crash due to undefined variables year and myVotedProjects, preventing users from viewing their votes on closed years.
  • Description: The renderClosedYear method attempts to use variables year and myVotedProjects which are not defined within its scope. This occurs when a user filters by "My Votes" on a year with closed submissions. The code first accesses an undefined year variable when calculating userVotes. If that were fixed, it would then access an undefined myVotedProjects variable when trying to render the list. Either access will cause a ReferenceError, crashing the component and preventing the page from rendering.

  • Suggested fix: In renderClosedYear, access the year object from props using this.props.year instead of the undefined local variable year. Additionally, define the myVotedProjects variable using the same filtering logic found in the renderBody method before it is referenced.
    severity: 0.9, confidence: 1.0

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good stuff. Thanks Seer!

@jmanhart
jmanhart merged commit e7015d2 into master Aug 24, 2025
7 checks passed
@jmanhart
jmanhart deleted the feature/voting-ui-prep branch August 24, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant