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: SpotlightPopoverTour bugs #1826

Merged
merged 18 commits into from
Nov 28, 2023
Merged

fix: SpotlightPopoverTour bugs #1826

merged 18 commits into from
Nov 28, 2023

Conversation

anuraghazra
Copy link
Member

@anuraghazra anuraghazra commented Nov 20, 2023

Fixes 3 bugs:

  • Safari body-scroll-lock causing the page to get clipped because storybook doesn't set width/height on body - fixed by setting width/height
  • Initial delay of opening the mask - fixed by immediately updating the mask size on initial render
  • Delay of transitioning between steps which occurs because we need to wait for the animation to finish before scrolling otherwise the scroll gets interrupted - fixed by reduced this to 100ms

Copy link

changeset-bot bot commented Nov 20, 2023

🦋 Changeset detected

Latest commit: 3522f22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@razorpay/blade Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

bundlemon bot commented Nov 20, 2023

BundleMon

Files updated (1)
Status Path Size Limits
Web Components
build/components/index.production.web.js
330.31KB (+304B +0.09%) -
Unchanged files (13)
Status Path Size Limits
React Native Components
build/components/index.native.js
186.97KB -
Web Tokens
build/tokens/index.production.web.js
42.24KB -
React Native Tokens
build/tokens/index.native.js
38.35KB -
CSS Theme Tokens
build/css/paymentThemeDarkDesktop.css
4.55KB -
CSS Theme Tokens
build/css/paymentThemeDarkMobile.css
4.54KB -
CSS Theme Tokens
build/css/bankingThemeLightDesktop.css
4.53KB -
CSS Theme Tokens
build/css/bankingThemeLightMobile.css
4.52KB -
CSS Theme Tokens
build/css/bankingThemeDarkDesktop.css
4.52KB -
CSS Theme Tokens
build/css/paymentThemeLightDesktop.css
4.52KB -
CSS Theme Tokens
build/css/bankingThemeDarkMobile.css
4.51KB -
CSS Theme Tokens
build/css/paymentThemeLightMobile.css
4.51KB -
Web Utils
build/utils/index.production.web.js
3.38KB -
React Native Utils
build/utils/index.native.js
2.27KB -

Total files change +303B +0.05%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

codesandbox-ci bot commented Nov 20, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3522f22:

Sandbox Source
razorpay/blade: basic Configuration

Copy link
Contributor

github-actions bot commented Nov 21, 2023

✅ PR title follows Conventional Commits specification.

@kamleshchandnani
Copy link
Collaborator

@anuraghazra when i close the tour say at 2/3 then it shall restart right from 1/3? Right now on storybook it resumes from 2/3

@kamleshchandnani
Copy link
Collaborator

also, when I click on a story and then click stories tab for the first time on iOS it shows blank after refreshing the story appears

image

@@ -45,6 +45,20 @@ function AppWrapper(): JSX.Element {
export default AppWrapper;
```

## iOS Safari Specific Setup
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add this to Bottmsheet and Popover's docs as well in on top of the page something that is highlighted?

@anuraghazra
Copy link
Member Author

@anuraghazra when i close the tour say at 2/3 then it shall restart right from 1/3? Right now on storybook it resumes from 2/3

Tour is a controlled component, so this behaviour is entirely upon the product usecase. We just give them the ability to change the activeStep, if consumer wants the can reset the activeStep when onFinish callback is fired.

@anuraghazra
Copy link
Member Author

also, when I click on a story and then click stories tab for the first time on iOS it shows blank after refreshing the story appears

Not able to reproduce this with iOS simulator can you provide a video?

Copy link
Member

@saurabhdaware saurabhdaware left a comment

Choose a reason for hiding this comment

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

Looks good to me. Added the exit animation delay thing in slack thread

When using BottomSheet or SpotlightPopoverTour,
Make sure to set a width/height to the `body` otherwise when they open, the page will get clipped.

This happens due to a bug in iOS safari where it won't compute the height of the body correctly.
Copy link
Member

Choose a reason for hiding this comment

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

is there any link to this issue that we can add here?

Copy link
Member Author

@anuraghazra anuraghazra Nov 28, 2023

Choose a reason for hiding this comment

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

I observed this weird bug on computed properties of safari dev tools, but don't have exact webkit bug reference.

There are multiple issues with safari's height calculations:

https://developer.apple.com/forums/thread/128949
https://stackoverflow.com/questions/68705153/height-100-stopped-working-when-run-in-safari
chakra-ui/chakra-ui#6027

@@ -28,7 +28,7 @@ export const parameters = {
},
// on development setting it to undefined so that on 'live reload' it won't switch
// to docs panel while developing the component
viewMode: process.env.NODE_ENV === 'development' ? undefined : 'docs',
viewMode: process.env.NODE_ENV === 'development' ? 'docs' : 'docs',
Copy link
Member

Choose a reason for hiding this comment

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

condition ? docs : docs 😸 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops.

Comment on lines +145 to +150
{`
body {
width: 100%;
height: 100%;
}
`}
Copy link
Member

Choose a reason for hiding this comment

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

nit: This won't get highlighted since in SandboxHighlighter I had kept .ts file as default. Might have to add option to set .css file there

@kamleshchandnani kamleshchandnani merged commit 0d0e72e into master Nov 28, 2023
14 of 15 checks passed
@kamleshchandnani kamleshchandnani deleted the anu/tour-fixes branch November 28, 2023 11:34
anuraghazra added a commit that referenced this pull request Apr 9, 2024
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.

3 participants