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

feat(interaction): make scroll interaction configurable #1235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

damonpam
Copy link
Contributor

now it is possible to set where to place the element to be scrolled within the visible area

@damonpam damonpam marked this pull request as draft June 21, 2022 13:04
@damonpam damonpam force-pushed the main branch 3 times, most recently from 310d1fd to 4539392 Compare June 21, 2022 13:42
@damonpam damonpam marked this pull request as ready for review June 21, 2022 14:12
now it is possible to set where to place the element to be scrolled within the visible area
@damonpam
Copy link
Contributor Author

@jan-molak @viper3400 feel free to suggest, reword, etc. this is ready for review.

@jan-molak jan-molak self-assigned this Jun 22, 2022
@jan-molak jan-molak added the @serenity-js/web Screenplay Pattern APIs for interacting with the Web label Jun 22, 2022
@jan-molak
Copy link
Member

jan-molak commented Jun 22, 2022

Thanks @damonpam! We'll need to think about how this should work with the upcoming Playwright integration; Playwright's scroll function doesn't take any arguments, because it seems to be smarter than what WDIO and Selenium do - check out scrollIntoViewIfNeeded

From what I understand, they rely on the Intersection Observer API to figure out if scrolling is necessary.

I wonder if what we should do is to make our Scroll.to configurable and ignore this configuration for Playwright, or instead make our Scroll.to use the Intersection Observer API and improve on how WDIO and Selenium behave out of the box 🤔

I'll be in this area of code later on today/tomorrow so will have a think and let you know if that's OK?

By the way, I need to see if we can use the Intersection Observer API to perform visibility checks, maybe it could help to simplify this logic.

@jan-molak jan-molak removed their assignment Dec 12, 2022
@jan-molak jan-molak added the developer experience Improvements to the developer experience of using Serenity/JS label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Improvements to the developer experience of using Serenity/JS @serenity-js/web Screenplay Pattern APIs for interacting with the Web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants