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

Post card UI improvement #88

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Conversation

iitzIrFan
Copy link
Contributor

#40 Add optimistic UI updates for create new post :-

  • Added shadow-md for depth with respect to themes.
  • Used loading="lazy" for image optimization.
  • Increased text size for better legibility.
  • Improved padding/margin consistency.
  • Optimized spacing between the elements wherever required.
  • Added object-cover to the post image to ensure proper aspect ratio handling on different screen sizes.

This PR is ready for Review ... Changes are always welcome :)

@harshmangalam
Copy link
Owner

I like your improvements but this is not optimistic ui. This is UI improvements.

Optimistic UI is a technique to improve responsive user experience by reducing the perceived latency. Suppoose in this case you created a new post but first it will interact with api in backend and resturn response and user have to wait for that .
When you have post data instead of waiting for api response after submit button click you can just create post card with colllected data from user input. And when api response will come it will validate the current post card and swap with api post details.

You can look into Remix example for more context
https://remix.run/docs/en/main/discussion/pending-ui

But we are using Qwik you can transform the same idea in qwik also.

Thanks for your contributions 🫡

@iitzIrFan
Copy link
Contributor Author

@harshmangalam Actually I am new to TypeScript so I will try my best to optimize it ! Also will surely take help from you if needed to learn from you about OPTIMISTIC UI.

@harshmangalam harshmangalam changed the title Added optimistic UI for create new post Post card UI improvement Oct 18, 2024
@harshmangalam harshmangalam self-requested a review October 18, 2024 06:53
@harshmangalam harshmangalam merged commit 6b55c9b into harshmangalam:main Oct 18, 2024
1 check passed
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