Skip to content

Conversation

@simonbs
Copy link
Contributor

@simonbs simonbs commented Aug 13, 2024

Fixes visual alignment issues between project skeletons and actual projects.

Key changes:

  1. Introduced SpacedList: Ensures consistent spacing between items, aligning skeletons with actual projects.
  2. Merged Placeholder into ProjectListItem: Removed ProjectListItemPlaceholder*, consolidating its content into ProjectListItem to avoid updates being missed between the two.
  3. Refactored for Consistency: Renamed ProjectListItemPlaceholder to Skeleton and introduced a Template component for consistent layout between the item and its skeleton.

@simonbs simonbs requested a review from ulrikandersen as a code owner August 13, 2024 08:23
@simonbs simonbs requested a review from mpabarca August 13, 2024 08:27
@mpabarca
Copy link
Contributor

mpabarca commented Aug 13, 2024

I've been reviewing our site's handling of UI loading and skeletons. Typically, modern Next.js projects use Suspense or built-in features for managing loading states, as recommended here.

While using isLoading from SWR is effective, I’ve noticed that our current approach leads to a delay in showing the loading or skeleton screens when navigating through the website. This delay can make it seem like nothing is happening when users interact with the site, which could affect user experience. However, this may not be directly related to the use of this library.

So the solution in this PR may not address this issue directly, we could improve by ensuring consistent loading state handling across the site in the future. This would enhance both performance and user experience, even for our internal project.

For example, Airbnb handles transitions smoothly by showing immediate feedback (like skeletons) during navigation, ensuring users know something is happening.

@simonbs
Copy link
Contributor Author

simonbs commented Aug 13, 2024

@mpabarca I would LOVE if we can go in that direction! I looked into using Suspense in the early days of the project but didn't grasp how we could best take advantage of it.

Can we proceed with the changes in this PR as they seem to improve on our current solution and then setup a discussion about how we can move to using Suspense?

mpabarca
mpabarca previously approved these changes Aug 13, 2024
@mpabarca mpabarca self-requested a review August 13, 2024 14:13
…projects

# Conflicts:
#	src/features/sidebar/view/internal/sidebar/projects/ProjectListItem.tsx
@simonbs simonbs enabled auto-merge (rebase) August 14, 2024 09:08
auto-merge was automatically disabled August 14, 2024 09:21

Rebase failed

@simonbs simonbs merged commit 355cecb into develop Aug 14, 2024
@simonbs simonbs deleted the bugfix/ensure-project-placeholders-match-projects branch August 14, 2024 09:23
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