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

Change positioning engine from Tether to Popper.js #176

Merged
merged 6 commits into from
Jun 21, 2018

Conversation

lancegliser
Copy link

The existing tether project has been discontinued as noted on their page. Many projects have begun to move away from tether, to Popper as suggested by Hubspot. My own need was because of Bootstrap 4's migration. I wanted Shepherd, but didn't want to include Tether just for it.

I expect this will have some bugs and use cases missing, but it's a functional start to begin talking about how options, themes, etc might change in a 2.x popper branch.

Conceptually, little has changed:

  • The arrow css depends on a dom element instead of a :before as popper targets it differently

Outstanding issues:

  • Orphan steps using positionFixed in popper's upcoming release

@lancegliser
Copy link
Author

Associating this with #163

Copy link
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

This is intriguing. I would definitely like to hear what everyone at HubSpot has to say about this. If the intent is no one should use tether anymore, I think this could be a very nice refactor.

@FranDias @b-ash @adamschwartz any opinions on whether we should move to popper or not?

@@ -1,5 +1,5 @@
{
"name": "tether-shepherd",
"name": "tether-popper",
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be popper-shepherd?

@@ -1,5 +0,0 @@
.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top.shepherd-target-attached-left .shepherd-content:before,
Copy link
Member

Choose a reason for hiding this comment

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

Is the arrow fix no longer needed?

@RobbieTheWagner
Copy link
Member

@lancegliser I tried this code out and it seems to work pretty well. How should we implement the orphaned steps stuff? Is that supported by popper now?

@RobbieTheWagner RobbieTheWagner changed the base branch from master to 2.0-alpha June 21, 2018 03:45
@RobbieTheWagner
Copy link
Member

I'm going to merge this into the 2.0-alpha branch for now, until I can get the orphaned elements to work.

@RobbieTheWagner RobbieTheWagner merged commit 1e2317b into shipshapecode:2.0-alpha Jun 21, 2018
@lancegliser
Copy link
Author

@rwwagner90 Sorry I've been very bogged down with things. Happy to see this was a pleasing start to 2.x for you. I should have some time in the next month to attempt the orphan code as well if that's soon enough for you.

@RobbieTheWagner
Copy link
Member

@lancegliser I took a stab at it, but was unable to get offsets to work, so the orphaned element is not in the center of the screen. It may be easier to just copy the centered fixed logic from tether and not use popper for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants