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

feat: block layout v2 #1371

Merged

Conversation

Sembauke
Copy link
Member

@Sembauke Sembauke commented Apr 7, 2025

ref #1348

Sembauke added 19 commits March 25, 2025 14:27
…ith corresponding view models; rename BlockViewModel to BlockTemplateViewModel and update references
…odel; update BlockListView and BlockLinkView to accept new parameters
…ust padding and width for better responsiveness
… state; adjust layout for better responsiveness
@Sembauke Sembauke changed the title feat: block layout v2 pr feat: block layout v2 Apr 7, 2025
@Sembauke Sembauke changed the base branch from main to block-layout-branch April 7, 2025 06:58
@Sembauke Sembauke marked this pull request as ready for review April 7, 2025 06:59
@Sembauke Sembauke requested a review from a team as a code owner April 7, 2025 06:59
Copy link
Member

@Nirajn2311 Nirajn2311 left a comment

Choose a reason for hiding this comment

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

Now there are 2 weird behaviours with scrolling:

  1. If there's less than 3 blocks, they're auto opened so when you scroll down to the end and scroll back up there's a jump sometimes. Like in the below video you'll see that while scrolling up from the button halfway through the second block it jumps to the first blocks list.
less-3.mp4
  1. If there's more than 3 blocks, the first block isn't open anymore. Also any open block will get auto-closed the moment it goes out of view
more-3.mp4

@Sembauke
Copy link
Member Author

Sembauke commented Apr 7, 2025

I will see what I can do about the scrolling issue tomorrow.

Thanks for the detailed review. We can change the purple to the blue progressbar color? How does that sound?

@Nirajn2311
Copy link
Member

We can change the purple to the blue progressbar color? How does that sound?

Yea thats better

@Sembauke
Copy link
Member Author

Sembauke commented Apr 8, 2025

It seems like the progressbar color and the white color did not have a good contrast ratio. I have opted for another blue color we use.

@Sembauke
Copy link
Member Author

Sembauke commented Apr 8, 2025

Alright, I think I fixed the issue with the jittering, do we want to keep the "open all" when only 3 or less blocks available.

I have decided to make some minor changes to the dialogue UI, it now also has a hide and open button. Let me know what you think.

This was quite a refactor.

cc: @Nirajn2311 @huyenltnguyen

@Sembauke
Copy link
Member Author

Sembauke commented Apr 8, 2025

The only thing I still need to fix is the FutureBuilder being called every time the state updates. It calls the API everytime that happens.

@Nirajn2311
Copy link
Member

do we want to keep the "open all" when only 3 or less blocks available.

I think it's better if we just leave the first block open by default just like in the website

@Sembauke
Copy link
Member Author

Sembauke commented Apr 8, 2025

Done that should be good now.

@Nirajn2311 Nirajn2311 merged commit d4b9738 into freeCodeCamp:block-layout-branch Apr 8, 2025
1 check passed
@Sembauke Sembauke deleted the feat/block-layout-v2 branch April 8, 2025 18:45
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