Bunyod16 / 42-on_campus_stats

A tool to provide live feedback on a 42 campus
https://42-on-campus-stats.vercel.app
MIT License
14 stars 8 forks source link

Dynamic view #52

Closed sirhcofe closed 9 months ago

sirhcofe commented 9 months ago

Changes

This pull request introduces several enhancements to the existing layout and visual elements, with a focus on improving the overall user interface and responsiveness.

1. Layout

sample-grid

Grid layout

2. ActiveUserProjects

3. CurrentActiveUsers

4. MostActiveUser/TopFarmers

vercel[bot] commented 9 months ago

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

Name Status Preview Comments Updated (UTC)
42-on-campus-stats ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 8:35am
Bunyod16 commented 9 months ago

Hey Zer, thank you for the contributions!

I'm getting an uloaded, white page in vercel when viewing this deployment. Seems like its related to these errors in the console.

image

Jachokoreto commented 9 months ago

@Bunyod16 do you remember if the vercel preview for pr worked in the past? I suspect that it may be due to the wrong api call thats causing the frontend to not work right now. Can maybe check the env for deployment, make sure it uses the same as the master branch (the correct backend url). Also is it possible to add me into this vercel project?

Screenshot 2023-12-31 at 1 51 24 AM
Bunyod16 commented 9 months ago

@Jachokoreto the pulling seems fine on local, but somehow the alignment on my mac Chrome is off? i tested with LT Browser and it seems fine there on other screens.

Screenshot 2023-12-31 at 21 53 47
jasonkwm commented 9 months ago

It is off for my PC as well. May I know what screen size this is made for? I think size could be relative.

for like this. image

and this. image

I believe these are in their own respective boxes and could be resized according to their relative parent sizes.

sirhcofe commented 9 months ago

Ok, I think I found the problem, will push a fix soon

sirhcofe commented 9 months ago

Good day @Bunyod16 @Jachokoreto @jasonkwm. A fix has been pushed. Here's a breakdown on what has been changed:

Feel free to review the changes, and let me know if any further adjustments are needed. Thank you!

ps: The state in App.tsx is used for d3 charts in ActiveUserProject

Edit: To answer Jason's question: The image sizes are dynamically adjusted to the card's width or height (Figure 1). The card itself adapts its dimensions based on the screen resolution, with a minimum height determined in the parent div (Figure 2). Meanwhile, text sizes are responsive and scale according to the tailwind's responsive design.

figure 1

Figure 1: An example of setting image height in `MostActiveUser`, either based on 0.14*card-width or 0.5*card-height, whichever is smaller

figure 1

Figure 2: An example of setting text sizes based on tailwind's breakpoints, now taking custom 3xl (min-width: 2560px) prop instead of default 2xl (min-width: 1536px)