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

fix: Calendar transition bug #195

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

lovlyx
Copy link
Contributor

@lovlyx lovlyx commented Nov 29, 2023

Added classes from VCalendar styles to fix transition glitch.

@lovlyx lovlyx changed the title Fix Calendar transition bug fix: Calendar transition bug Nov 29, 2023
@sadeghbarati
Copy link
Collaborator

Can you share a video of your fix? Thanks 🫡🙌

@sadeghbarati
Copy link
Collaborator

The Glitch partially goes away but,
Main shadcn-ui Calendar has no transition


Screen.Recording.2023-11-30.at.5.53.47.PM.mov

@lovlyx
Copy link
Contributor Author

lovlyx commented Nov 30, 2023

@sadeghbarati

Old Calendar Transition:
https://github.com/radix-vue/shadcn-vue/assets/110987585/6e7030a4-fad0-4e20-8c99-ea4ecd0f22ac

Fixed Calendar Transition:
https://github.com/radix-vue/shadcn-vue/assets/110987585/f38a1735-d95f-4798-b7b6-2000c3f8798c

I've noticed on the new version there is still a trail that shows on the horizontal axis, but that could probably fixed with overflow-hidden.

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Nov 30, 2023

Other maintainers should decide: "Keep transition for Calendar or make it like the main shadcn-ui"

IMO let's follow the main shadcn-ui, no transition
If other maintainer decide to keep transition I will rebase and drop my commit 🙏

@lovlyx
Copy link
Contributor Author

lovlyx commented Nov 30, 2023

Yeah, but we would have to find a fix for the glitches when moving pages.

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Nov 30, 2023

find a way you can append these to style section

.vc-pane-container {
  width: 100%;
  position: relative;
}

.vc-pane-container.in-transition {
  overflow: hidden;
}

.vc-slide-left-leave-active,
.vc-slide-right-leave-active {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.vc-slide-left-enter-from,
.vc-slide-left-leave-to,
.vc-slide-right-enter-from,
.vc-slide-right-leave-to {
  opacity: 0;
}

and add z-10 to the div that contains this classes absolute flex justify-between w-full px-4 top-3

@sadeghbarati
Copy link
Collaborator

Can I push? @lovlyx

@sadeghbarati
Copy link
Collaborator

Screen.Recording.2023-11-30.at.6.56.23.PM.mov

@lovlyx
Copy link
Contributor Author

lovlyx commented Nov 30, 2023

Oh Perfect!

@zernonia
Copy link
Member

Personally I would prefer the transition (although original shadcn doesn't). I felt smoother and keep consistent as most of the components with entry/exit component has transition.

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Nov 30, 2023

@lovlyx

I can't access to my computer right now can you drop my commit?

If you not familiar with vim, change git editor to VSCode

git config --global core.editor "code --wait"
  • git rebase -i HEAD~2 (interactive rebase last two commits)

  • select drop

  • git push --force-with-lease

Also, don't forget about overflow-hidden

Thanks 🫡

@lovlyx lovlyx force-pushed the patch-calendar-bug branch from f224270 to c58a708 Compare November 30, 2023 17:03
Added overflow hidden + z-index to the buttons
@lovlyx
Copy link
Contributor Author

lovlyx commented Nov 30, 2023

Okay @zernonia it should all be good now.

Copy link
Member

@zernonia zernonia left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @lovlyx @sadeghbarati

@zernonia zernonia merged commit e2d9e04 into unovue:dev Dec 1, 2023
1 check failed
@lovlyx lovlyx deleted the patch-calendar-bug branch December 4, 2023 11:22
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.

[Bug]: Calendar & Date picker: glitch/flickering when jumping through months
3 participants