Skip to content

feat: scroll to selected story#684

Merged
dannyhw merged 6 commits intonextfrom
feat/scroll-to-selected-story
Feb 13, 2025
Merged

feat: scroll to selected story#684
dannyhw merged 6 commits intonextfrom
feat/scroll-to-selected-story

Conversation

@dannyhw
Copy link
Member

@dannyhw dannyhw commented Feb 12, 2025

Issue:

What I did

scolltornsb.mp4

How to test

Please explain how to test your changes and consider the following questions

  • Does this need a new example in examples/expo-example?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@dannyhw dannyhw marked this pull request as ready for review February 12, 2025 15:31
@alcpereira
Copy link
Contributor

Amazing feature 🚀
Works on my machine, tested on both Android and iOS.
There is a small flickering but not sure if this is related to this change (imo non-blocker)

Screen.Recording.2025-02-13.at.10.16.04.mov

@dannyhw
Copy link
Member Author

dannyhw commented Feb 13, 2025

@alcpereira thanks for testing, much appreciated 🙇

struggling to find the flicker you are referring to, where is that happening?

@alcpereira
Copy link
Contributor

struggling to find the flicker you are referring to, where is that happening?

You can see it on the video at 0:04, when the drawer opens there is a slight flicker.

@dannyhw
Copy link
Member Author

dannyhw commented Feb 13, 2025

@alcpereira I just had an idea on how to make it work when selecting from search

could you give 8.5.5-alpha.4 a try?

scrollonsearch.mp4

@alcpereira
Copy link
Contributor

Tested on Android + iOS on my Storybook at work (almost 1k stories) ✅

Discussing with my colleague @fabioatcorreia , we have 2 additional ideas:

  • Keep the SearchBar as "sticky" in the Bottom Sheet, so wherever you are down the ScrollView you can quickly search for another story. This feature does not exist in Storybook Web (Mobile version) - Should we open it in the main Storybook repo first?
  • On click, center the ScrollView with the selected one. This behaviour already exists in Storybook Web. Do you want me to open a feature request here? (Please release this PR, we all love it 😍 )

@dannyhw
Copy link
Member Author

dannyhw commented Feb 13, 2025

@alcpereira those seem like reasonable suggestions to me 👍

will move ahead with releasing this pr but please do create issue/feature request regarding your suggestions with as much detail as possible, happy to make it happen if I can :)

@dannyhw dannyhw merged commit bf05573 into next Feb 13, 2025
1 check passed
@dannyhw
Copy link
Member Author

dannyhw commented Feb 13, 2025

@alcpereira 8.5.5 is out with these changes :)

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