Skip to content

Plus Button and Menu #9

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Plus Button and Menu #9

wants to merge 5 commits into from

Conversation

luke992
Copy link
Contributor

@luke992 luke992 commented Jun 1, 2025

Plus Button with expanding menu with button for user settings and placeholders for About CMUMaps and Schedule.

Spacing of menu and darkness of shadows has been adjusted to more closely align with the design in Figma.

Copy link

vercel bot commented Jun 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmumaps-visualizer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 7:57pm

}
})
});
}, [plusButtonMenuState]);
Copy link
Contributor

Choose a reason for hiding this comment

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

React Hook useEffect has missing dependencies

/>
</motion.div>
{plusButtonMenuState == PlusButtonMenuState.QUESTION_MARK_SELECTED && (
<div className="btn-shadow-dark fixed inset-x-[21px] bottom-[227px] top-[21px] bg-white rounded-lg shadow-lg overflow-auto z-50">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use built-in Tailwind classes instead of fixed number of pixels?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for other places we use fixed number of pixels

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe use rem instead of px

Copy link
Contributor

Choose a reason for hiding this comment

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

Okk, I realized what is going on now. Good job on making it "pixel perfect"! But maybe we need to talk to the design team so the spaces are multiples of 4 for the Tailwind classes...

const handleClick = () => {
if (plusButtonMenuState == PlusButtonMenuState.USER_SELECTED) {
setPlusButtonMenuState(PlusButtonMenuState.OPEN);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Return not needed

/>
</motion.div>
{plusButtonMenuState == PlusButtonMenuState.QUESTION_MARK_SELECTED && (
<div className="btn-shadow-dark fixed inset-x-[21px] bottom-[227px] top-[21px] bg-white rounded-lg shadow-lg overflow-auto z-50">
Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe use rem instead of px

@Yuxiang-Huang
Copy link
Contributor

Need to be reformatted with prettier or biome.

@Yuxiang-Huang
Copy link
Contributor

Might be worth it to make an icons-display folder with each render function as an individual component. We would definitely need to do it later when we have more content for courses and question mark button

className={(plusButtonMenuState == PlusButtonMenuState.CLOSED ? "" : "btn-shadow-dark ") + "fixed flex right-3 bottom-3 sm:right-3.5 sm:bottom-3.5 rounded-full z-50"}
>

<div ref={userButtonRef} className="absolute right-[4px] -z-10 opacity-0 pointer-events-none z-50">
Copy link
Contributor

Choose a reason for hiding this comment

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

'-z-10' applies the same CSS properties as 'z-50'.(cssConflict)

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.

2 participants