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

fix: support dynamically added components #8016 #10947

Closed
wants to merge 2 commits into from
Closed

fix: support dynamically added components #8016 #10947

wants to merge 2 commits into from

Conversation

DanielRuf
Copy link
Contributor

We have to check for document.readyState === "complete" when the window and content is already loaded and more content is loaded afterwards that is needed for the magellan and sticky solution.

@DanielRuf
Copy link
Contributor Author

Working codepen: https://codepen.io/DanielRuf/pen/LQOWmE

@ncoden
Copy link
Contributor

ncoden commented Feb 17, 2018

I just found the same issue with Magellan. There is probably others issues like this across all components. :/

@DanielRuf
Copy link
Contributor Author

Right, we may have to add this to some more components.

@DanielRuf
Copy link
Contributor Author

DanielRuf commented Feb 17, 2018

I'll check the other components, prepare an issue and collect them there and link the PRs then (I would rather go step for step or component for component to have better and more atomic changes which is easier for bisecting and regression testing imo).

@ncoden
Copy link
Contributor

ncoden commented Feb 17, 2018

I was going to take care of this and open a PR but ok, have fun ;)
However I don't think that opening several PR is really useful. We can always revert singular commits, and keeping everything in one PR is easier to manage.

@DanielRuf
Copy link
Contributor Author

DanielRuf commented Feb 17, 2018

keeping everything in one PR is easier to manage.

Agreed. I'll prepare the other commits then. If you want you can also push to my branch. Or do we already have some PRs for the other components?

@ncoden
Copy link
Contributor

ncoden commented Feb 17, 2018

Or do we already have some PRs for the other components?

I don't think. There was PRs before that resolved some cases manually (and sometimes badly), but everything is merged by now.

@ncoden ncoden added this to the 6.4.4 milestone Feb 18, 2018
@ncoden ncoden changed the title fix: initialize sticky elements for dynamically loaded DOM, fixes #8016 fix: support dynamically added components #8016 Feb 21, 2018
@ncoden ncoden self-assigned this Feb 21, 2018
@DanielRuf
Copy link
Contributor Author

Also see #9047

@ncoden
Copy link
Contributor

ncoden commented Mar 6, 2018

Thanks.

@DanielRuf DanielRuf requested a review from ncoden March 16, 2018 21:10
@DanielRuf
Copy link
Contributor Author

DanielRuf commented Mar 17, 2018

Pushed a new commit. Did not find more occurences where we wait for the load event.

@ncoden
Copy link
Contributor

ncoden commented Mar 17, 2018

@DanielRuf Seen. LGTM but require some cleaning as said at #10988 (comment), maybe in an other PR (that or in that PR but with a squash after). Do you want to take care of this or should I ?

@DanielRuf
Copy link
Contributor Author

DanielRuf commented Mar 17, 2018

LGTM but require some cleaning as said at #10988 (comment), maybe in an other PR (that or in that PR but with a squash after). Do you want to take care of this or should I ?

Would be glad if I could get some assistance here so feel free to prepare a PR with the needed changes to make them all consistent then.

_this.calcPoints();
_this._updateActive();
});
}
Copy link
Contributor

@ncoden ncoden Mar 18, 2018

Choose a reason for hiding this comment

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

When a Magellan component is dynamically created, the window DO NOT scroll to the target corresponding to the location hash as the magellan did not created the target and should appear without effects on it after the page already loaded.

-- #11077 (comment)

@DanielRuf What do you think ?

@ncoden
Copy link
Contributor

ncoden commented Mar 18, 2018

Closing in favor of #11077

@ncoden ncoden closed this Mar 18, 2018
@DanielRuf DanielRuf deleted the patch/sticky-magellan-init branch March 18, 2018 21:08
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