-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Add modal overlay opening x,y offset settings. #1833
Conversation
@timodwhit looks like we have a failing test here. Mind taking a look? |
I do not mind taking a look, but I have never dealt with this test suite etc. So I might not be super fruitful in my endeavor. |
@monshan would you be able to look into this? |
Add the ability to offset the modal's overlay opening by an x,y value for elements that are positioned uniquely on the screen. As an example: This is useful for items that are placed inside an iframe that is in a fixed position on the screen.
43bad30
to
eab9777
Compare
@rwwagner90 fixed the tests and rebased with most recent shepherd, should be good to go |
Awesome, thanks @monshan! |
@monshan would it be possible to add some tests for these new options? I don't think new tests were added here right? |
@rwwagner90 no tests added by Tim but sure I could write some that cover the feature, my first thought is some cypress that asserts that it can offset in all 4 directions? |
@monshan yeah, that sounds perfect! Basically just testing at least a couple different values and making sure it moves. |
@monshan any updates on those tests? Would love to merge this soon 😄 |
@timodwhit
Can you confirm that this is the desired behavior? Not that the modal offset will remain the same size as the window with adjusted positioning? |
@monshan I'm sorry. I'm not sure I understand the question or the use case. |
@timodwhit I just want to confirm that the shape of the SVG after offset is what you expected according to this PR? |
@timodwhit @monshan is this issue resolved or are there still lingering questions regarding the tests for this feature? |
I believe @monshan asked a question about the purpose of the PR and was awaiting a response. I found this PR because I was looking for this exact feature. I believe the purpose of this feature is to allow the overlay SVG that is generated to offset from the target element. This is useful in cases where the current CSS does not have margins around them and the overlay is very tight. It allows Shepherd to generate a better looking overlay without needing to rework the website's CSS. |
Sorry for the delay in the response and the long gap. Yes, @monshan I believe your tests are correct. |
This looks to have been added and handled in #2551 |
Add the ability to offset the modal's overlay opening by an x,y value
for elements that are positioned uniquely on the screen. As an example:
This is useful for items that are placed inside an iframe that is in
a fixed position on the screen.