Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less intrusive anon modal #495

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Less intrusive anon modal #495

merged 4 commits into from
Jan 15, 2025

Conversation

mjaydenkim
Copy link
Contributor

@mjaydenkim mjaydenkim commented Dec 24, 2024

Summary

This PR works on streamlining the semi-intrusive anon modal.

PR Type

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Mobile + Desktop Screenshots & Recordings

image
image

QA - Test Plan

Tested on a variety of sizes and with logging in/out repeatedly.

Breaking Changes & Notes

Kept the modal around but changed its name from AnonymousWarning to LoginModal. Its only purpose is now to tell the user to log in after submitting a review without first having done so. All uses of the class should have been modified. I'm using Jaeyoung's adorable bear emoji for this class, if that's ok!

Now, there's text above the submit button informing users of their anonymity. Unlike the modal, this notice is always present, no matter how many reviews the user has written.

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ notion
  • πŸ• ...
  • πŸ“• ...
  • πŸ™… no documentation needed

What GIF represents this PR?

gif

@mjaydenkim mjaydenkim requested a review from a team as a code owner December 24, 2024 07:08
@CLAassistant
Copy link

CLAassistant commented Dec 24, 2024

CLA assistant check
All committers have signed the CLA.

@dti-github-bot
Copy link
Member

dti-github-bot commented Dec 24, 2024

[diff-counting] Significant lines: 94.

Copy link
Contributor

@qiandrewj qiandrewj left a comment

Choose a reason for hiding this comment

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

This looks great, Matt! Left a few comments about styling and code style, but otherwise it worked well on my end :)

client/src/modules/Course/Components/LoginModal.tsx Outdated Show resolved Hide resolved
client/src/modules/Course/Styles/ReviewModal.module.css Outdated Show resolved Hide resolved
client/src/modules/Course/Components/LoginModal.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@jacquelinecai jacquelinecai left a comment

Choose a reason for hiding this comment

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

Great work Matthew! This looks a lot more intuitive on the user side.

One thing about the emoji used--could you add it to the codebase as an svg instead to maintain consistency? There should be examples of this within Cornellians Say and Similar Courses features already!

setNoReviews(res.result === 0);
}
}

function onProfessorChange(newSelectedProfessors: string[]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be part of a codebase cleanup PR, but it'd be nicer if these functions were all arrow functions (i.e. const onProfessorChange = (newSelectedProfessors: string[]) => {...}).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only converted the four onXChange methods -- should I convert the other functions as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that would be great!

Copy link
Contributor

@jacquelinecai jacquelinecai left a comment

Choose a reason for hiding this comment

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

Thanks for all the changes, Matt. Looks great!

@mjaydenkim mjaydenkim merged commit 85eac31 into main Jan 15, 2025
4 checks passed
@mjaydenkim mjaydenkim deleted the matt/less-intrusive-anon-modal branch January 15, 2025 09:00
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.

5 participants