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

Remove object-assign-deep, refactor setting popper options #516

Merged

Conversation

genadis
Copy link
Contributor

@genadis genadis commented Aug 15, 2019

Following #488

using 1K object-assign-deep seems overkill.

especially since their readme starts with: "Caution! Danger of Death!"
It introduces unnecessary risk fo user error.

@RobbieTheWagner
Copy link
Member

@genadis removing would be great! Can you add some tests to ensure the deeply nested objects are merged?

@RobbieTheWagner
Copy link
Member

@genadis I can add the tests real quick, never mind, but in the future please add tests for all new PRs 😃

@RobbieTheWagner
Copy link
Member

@genadis I made some changes and added tests. Any issues with the changes? If not, I will merge.

@RobbieTheWagner RobbieTheWagner changed the title remove object-assign-deep dependency Remove object-assign-deep, refactor setting popper options Aug 15, 2019
@RobbieTheWagner RobbieTheWagner merged commit b28444c into shipshapecode:master Aug 15, 2019
@RobbieTheWagner
Copy link
Member

Went ahead and merged with my changes. If you have any issues. Please let me know!

@genadis
Copy link
Contributor Author

genadis commented Aug 15, 2019

@rwwagner90 I believe your changes have a number of issues, I've added comments inline

@genadis
Copy link
Contributor Author

genadis commented Aug 15, 2019

this: #486 was the original issue

@RobbieTheWagner
Copy link
Member

@genadis what are the issues? I do not see any comments and the issue you referenced where the shepherd class is not added is no longer an issue.

@RobbieTheWagner
Copy link
Member

@genadis I see the issue now, but I don't see your inline comments. Will work toward a fix. We probably should have kept deep assign.

@RobbieTheWagner
Copy link
Member

@genadis I just pushed the fix to master. Please let me know if you are still seeing issues or have suggestions.

};

const tippyOptions = makeAttachedTippyOptions(attachToOpts, stepOptions);
expect(tippyOptions.popperOptions.modifiers.foo).toBe('bar');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue was that if you have custom modifiers, shepherd poper modifiers get removed.
The tests does not check it


popperOptions = {
...popperOptions,
...tippyOptions.popperOptions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if tippyOptions.popperOptions has modifiers they will override the tippy modifiers, which was the issue in the first place.
please look at my original Pull request that solves the issue.

if (step.options.tippyOptions && step.options.tippyOptions.popperOptions) {
popperOptions = {
...popperOptions,
...step.options.tippyOptions.popperOptions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if step.options.tippyOptions.popperOptions has modifiers they will override the tippy modifiers, which was the issue in the first place.
please look at my original Pull request that solves the issue.

@genadis
Copy link
Contributor Author

genadis commented Aug 16, 2019

@genadis I see the issue now, but I don't see your inline comments. Will work toward a fix. We probably should have kept deep assign.

yes, sorry, didn't submit it. now submitted

@genadis
Copy link
Contributor Author

genadis commented Aug 16, 2019

@genadis I just pushed the fix to master. Please let me know if you are still seeing issues or have suggestions.

looks good, thanks

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