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

Create leaderboard info component #606

Merged
merged 28 commits into from
May 11, 2024

Conversation

zysim
Copy link
Contributor

@zysim zysim commented May 5, 2024

What

Adds the LeaderboardInfo component (really two components, one for desktop and mobile):

Link to Issue

Closes #546

Acceptance

Steps for testing

pnpm test

Images

Desktop Mobile
Desktop screenshot of LeaderboardInfo Mobile screenshot of LeaderboardInfo

Copy link

netlify bot commented May 5, 2024

‼️ Deploy request for lbgg rejected.

Name Link
🔨 Latest commit 40c2a83

@zysim zysim self-assigned this May 5, 2024
@zysim zysim force-pushed the createLeaderboardInfoComponent branch from 6ff7fe1 to 1e46496 Compare May 5, 2024 13:29
.vscode/launch.json Outdated Show resolved Hide resolved
lib/api/Users.ts Outdated Show resolved Hide resolved
lib/api/Runs.ts Outdated Show resolved Hide resolved
lib/api/Leaderboards.ts Outdated Show resolved Hide resolved
lib/api/Categories.ts Outdated Show resolved Hide resolved
composables/api/useGetLeaderboardDetail/index.ts Outdated Show resolved Hide resolved

const isMobile =
window.innerWidth <=
parseInt(resolveConfig(tailwindConfig).theme.screens.sm.replace('px', ''), 10)
Copy link
Member

Choose a reason for hiding this comment

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

Quick note: parseInt() default is supposed to be 10 however ya you want to explicitly do it because sometimes it isn't for some reason.

Copy link
Contributor Author

@zysim zysim May 10, 2024

Choose a reason for hiding this comment

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

Yeah, and that's why I wrote that, because I remember reading about that years ago. Anyway; this okay with you? I figured we don't need to worry about users changing their browser sizes after loading the page, so.

Copy link
Member

Choose a reason for hiding this comment

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

Oh ya this doesn't change. We want to have the site be responsive, like for myself i may open it up on one monitor in half the size (snapped to half the screen) then oh i need to really look, let me maximize (or vice versa). Mobile first responsive design is the way to go.

Copy link
Contributor Author

@zysim zysim May 10, 2024

Choose a reason for hiding this comment

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

Should be reactive now. Took a while to figure out, because it wasn't watchThrottled that I could use, as watching window.innerWidth doesn't trigger anything. Turns out there's useThrottleFn, which even gives our exact use case as the example, lmao

components/blocks/LeaderboardInfo/LeaderboardInfo.vue Outdated Show resolved Hide resolved
components/elements/buttons/Dropdown/Dropdown.vue Outdated Show resolved Hide resolved
components/elements/buttons/Dropdown/Dropdown.test.ts Outdated Show resolved Hide resolved
@zysim zysim force-pushed the createLeaderboardInfoComponent branch from 89fef39 to 0517c5b Compare May 10, 2024 14:23
@zysim zysim force-pushed the createLeaderboardInfoComponent branch from 9739ef6 to 40c2a83 Compare May 10, 2024 17:47
@zysim zysim requested a review from buffet-time May 10, 2024 17:51
@zysim zysim merged commit cbdae41 into leaderboardsgg:main May 11, 2024
9 checks passed
@zysim zysim deleted the createLeaderboardInfoComponent branch May 11, 2024 17:41
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.

Feature Request: Create Leaderboard Info Component
3 participants