-
Notifications
You must be signed in to change notification settings - Fork 418
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(canvas): add #scrollToElement function #545
Conversation
ea472c5
to
883a4f2
Compare
Hint: It would have been nice to separate this PR into two commits, one that adds the new canvas method and one that adds the new scroll behavior. 😉 |
That makes sense, I followed the "one commit per PR" rule to closely 😄 EDIT: we do not have this rule, I just misunderstood the definition of done :D |
When I was onboarded I had the same confusion because of the sentence Since we both had that confusion I propose to re-formulate it to say I will create a PR: https://github.com/bpmn-io/internal-docs/pull/268 |
883a4f2
to
9171f4f
Compare
Thank you for the hints 👍 I made the scrolling zoom-aware and added 400px top-padding when used in the search box |
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.
One last remark (and I hope we'll be done after this):
As you can see in the following screen capture the functionality is not stable (indempotent, whatever). If an element scrolled into origin once I'd assume further scrolling invocations to not scroll somewhere else.
This is an issue in the search case. Is it possible to address this?
What would be the expected behavior when the element is to big to fit into view (with padding)? I would focus on the middle-top, as less get's hidden by UI elements and Sub-Process have the label there |
9171f4f
to
833313e
Compare
I'd say, either center-center or top-left. |
We need to keep in mind that this is not bpmn-js specific. Therefore I'd ignore the participant case and vote for top-center. |
I'd go for the very generic top-left, which always gives you a corner. |
833313e
to
5b2e714
Compare
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.
Overall very good with nice test coverage. I've got a few remarks.
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.
Looks good from my perspective.
5b2e714
to
06c1751
Compare
* scroll auto-placed elements into view * use centralized method in SearchPad related to camunda/camunda-modeler#1249
06c1751
to
7863247
Compare
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.
👏🏻
related to camunda/camunda-modeler#1249
replaces bpmn-io/bpmn-js#1437