-
Notifications
You must be signed in to change notification settings - Fork 942
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: Slick card look #2531
feat: Slick card look #2531
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Dhruwang
thanks for this, looks really slick already :) We'll have to do a bit of tweaking to get to the look & feel that we want for the cards and overall UX:
Settings UX
- Only display relevant settings:
![image](https://private-user-images.githubusercontent.com/72809645/326383883-a6e5584f-58f2-4468-9861-b4156b50e039.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzODM4ODMtYTZlNTU4NGYtNThmMi00NDY4LTk4NjEtYjQxNTZiNTBlMDM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThiNjdjYmVlZmZhMTI5NTg5Mzk3YzhlNzBjZDc0YTE1MjA1OGNlNjExY2Q4Mzg4MTQwNmJjYTAyZGZmMmQzNDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8OsDQSLo_Rm_ITHNSjhxCMcxmOOlXIgVrZIdl1nj0tE)
We know here what survey type this survey is so pls only display the relevant setting.
- Backwards compatibility: My existing survey was rendered with "casual".
![image](https://private-user-images.githubusercontent.com/72809645/326384411-0970fed8-29cf-4c26-8f14-72ee1a6f656f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzODQ0MTEtMDk3MGZlZDgtMjljZi00YzI2LThmMTQtNzJlZTFhNmY2NTZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxZDJlYzgyYzI3MzA3YmUzZjZmMmU5NjRhYmJiN2U2MTkwYTI1YjQ1NmJkMDM0MmE4MjI4ZDBlMTZjMjhiOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sFACmH6WtyPvUjnrPw27RGx2LOFpPDxwNoQYB_9HHyk)
I think we should set all existing surveys to straight
or simple
(I prefer straight
to get the look out there :) )
Highlight border clashes:
![image](https://private-user-images.githubusercontent.com/72809645/326390921-2fe57e73-df3d-45ca-9c9b-7a15258788c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzOTA5MjEtMmZlNTdlNzMtZGYzZC00NWNhLTljOWItN2ExNTI1ODc4OGM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2Y2UwN2RkNmJhNThmOGM2Y2FkNmY5ZTM2MmUzMjA3MmQ2MjdiNjg2M2JjYmE5MDU0MDI5NzRlMjRjYjc4OGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ngP2lkKwANBUtHWpq1gXX9K5BWeLPgZGS5suCW0bt4U)
(looks like a 🦓 )
Date Picker and Cal Embed not working
![image](https://private-user-images.githubusercontent.com/72809645/326392559-f3f49a0b-26e8-42e0-9192-a1a638348e29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzOTI1NTktZjNmNDlhMGItMjZlOC00MmUwLTkxOTItYTFhNjM4MzQ4ZTI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzYmJjODkxNDg0ZDU5MmI2OWE2NzRhNzQ3N2M1NGZhZjQ1NDI1YTI5MzI1YjNmODU0YzNiNzU3MjRiYzliYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HWhU7UW2iOatfYoR0fGekWqWp6UDPMKKCoH28HWQMcM)
Cards Look and Feel
- The cards don't get smaller the further they are away:
![image](https://private-user-images.githubusercontent.com/72809645/326385239-92f04c43-df91-44cd-bcc4-30f22a5a3732.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzODUyMzktOTJmMDRjNDMtZGY5MS00NGNkLWJjYzQtMzBmMjJhNWEzNzMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5NWZjZjA1M2JiYzE1YjFlM2JhNjJiZmRjOGI0YjllYjRjN2E0MjU1NzljOWYxOTY0MWUyZmQ2OWZiMmMwYjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KZJmeKgI-si-r4Wc5rOLTiUxK1hNznbPlfBjshZzW0A)
Now that I looked for where I designed that I couldn't even find it 🙈 Pls scale them down a bit and the further they are away the smaller they get.
This also means that the cards need to get scaled up when they go from the stack to become the main question card. This will give the whole look more depth 🤓
- Corner border weak: The border is inconsistent. Please make sure it doesnt fade out on the corners:
![image](https://private-user-images.githubusercontent.com/72809645/326388898-b8e1cc63-c561-4a55-89f8-6ff7fc8249b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzODg4OTgtYjhlMWNjNjMtYzU2MS00YTU1LTg5ZjgtNmZmN2ZjODI0OWIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdmYjY0MmFmZTUxZWZlODYzZGM1ZmFkOGE2NGEzNGU1NTIyMjRiZTYyMWM5MmMzMWNmNDg2MGQxY2IzMWFlNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Xfsm7O7rvmEJpVuPpG8h89SG4RMSYytoR68QZjyaUlM)
- Animation issue: You can see the content of the Thank You card while the second card fades in with opacity.
fade-issue.mp4
- It seems like there is an additional empty card somewhere. You can see it best when the Thank You card fades in
additional-card.mp4
- The hover effect is a bit too slow / delayed. Please have a look at what I built for the
Verify Email
screen and use this animation: The scale up is snappy / immediately and the cards in the back are slightly delayed and slower.
- The progress bar looks broken. We should hide it on the cards which are staked behind:
![image](https://private-user-images.githubusercontent.com/72809645/326395431-4aa1bec8-79a9-44c3-b7fe-5aac3eb9baef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwNTI0NDAsIm5iZiI6MTcxOTA1MjE0MCwicGF0aCI6Ii83MjgwOTY0NS8zMjYzOTU0MzEtNGFhMWJlYzgtNzlhOS00NGMzLWI3ZmUtNWFhYzNlYjliYWVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDEwMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVmOWFiM2U4ZTE2OTMxMjQ5OTJjNjI0Y2RlOTg5ZjVmMDhiMGZlZmI5NWFhMDFkMzVmZDE0OTZkMDAwMTI4NDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DCJpXwUSCmvHi3ppX_TQU2okVOfw0FiKqllVHENtcuE)
- The animate out and in is too "much"
animate.out.mp4
Status quo: The card slides to the left end of the screen and is visible the whole time
What we need: The card slides a bit (~15% screen width) to the right and then fades out
Big elements flying long distances never looks good. We want to have a subtle movement.
- OPTIONAL (do last): Change the direction of "Animate out" for
straight
card style:
Currently, the card always moves to the right.
For the card "Straight" I'd love the cards to move down and fade out. Since the card stack are clearly positioned above the main visible question card, it will feel more intuitive that the card fades down and out and the next card comes from above.
- Assure that easing is added to all animations: https://tailwindcss.com/docs/transition-timing-function#controlling-the-easing-curve
- Card height issue:
height-change.mp4
Status: As soon as we click "Next" the height of the current card snaps to the height of the following card.
Solution: This shouldn't happen (or it should be slower and animated). It doesn't feel natural that the height of the card changes because the content of it doesn't change (from a logical point of view, not from a technical point of view).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dhruwang smaller things I saw while scrolling through the code. Please fix before the merge :-)
packages/surveys/src/components/wrappers/StackedCardsContainer.tsx
Outdated
Show resolved
Hide resolved
packages/surveys/src/components/wrappers/StackedCardsContainer.tsx
Outdated
Show resolved
Hide resolved
hey @Dhruwang here are some more things I noticed:
slick-next-btn.mp4
slick-down-right.mp4
slick-thank-you-flicker.mp4Any non-hacky idea to solve this?
![]()
slick-close-icon.mp4
The height change is much smoother for links surveys compared to in-app. Any idea why? 🤔 Uploading slick-smoothness.mp4…
Don't see it for link surveys. Pls look into it. I think that's it ;) |
What does this PR do?
Fixes https://github.com/formbricks/internal/issues/74
Screen-Recording-2024-04-25-at-4.05.23.PM.mp4
Screen-Recording-2024-04-25-at-4.05.00.PM.mp4
How should this be tested?
Go to card settings
Choose among the available card arrangements
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated