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

Reorder HEAD elements so that CSS comes before JavaScript #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djowett-ftw
Copy link
Contributor

@djowett-ftw djowett-ftw commented Apr 14, 2020

This is correct and proper and it solves an issue in ftw.colorbox where overlays are not always loaded is in line with colorbox requirements

@busykoala busykoala requested review from a team, busykoala and maethu and removed request for maethu, Nachtalb, busykoala and a team April 15, 2020 15:20
@busykoala
Copy link

@maethu, I looked at it but don't feel confident to review that. Could you please take a look at it?

@Nachtalb
Copy link
Member

I second that. He pushes all scripts beneath the CSS and not only the one that isn't working. This might have other implications though it would be (as he said) the right order. But maybe this is a thing that we want to fix in colorbox? (javascript onload)

Copy link
Member

@maethu maethu left a comment

Choose a reason for hiding this comment

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

Question:

Would it be enough to just swap line 52 and 54? I'm not sure about the impact of the other changes.

docs/HISTORY.txt Outdated
@@ -4,7 +4,8 @@ Changelog
4.0.6 (unreleased)
------------------

- Nothing changed yet.
- Reorder HEAD elements so that CSS comes before JavaScript - which is correct and proper
This solves an issue in ftw.colorbox where overlays are not always loaded. [djowett-ftw]
Copy link
Member

Choose a reason for hiding this comment

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

@djowett-ftw Since I installed the change already on the DEV System, this is not true. The first line is Reorder HEAD elements so that CSS comes before JavaScript - which is correct and proper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Question:

Would it be enough to just swap line 52 and 54? I'm not sure about the impact of the other changes.

There's just one CSS and no JS in #portal-top for izug, so no that wouldn't be enough.
The extraction (and re-ordering) of the new line 47 from 41 is the main bit, but it's proper to put #portal-top script after that too (and that's a no-op for izug I believe)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@djowett-ftw Since I installed the change already on the DEV System, this is not true. The first line is Reorder HEAD elements so that CSS comes before JavaScript - which is correct and proper

Good spot! Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Question:
Would it be enough to just swap line 52 and 54? I'm not sure about the impact of the other changes.

There's just one CSS and no JS in #portal-top for izug, so no that wouldn't be enough.
The extraction (and re-ordering) of the new line 47 from 41 is the main bit, but it's proper to put #portal-top script after that too (and that's a no-op for izug I believe)

@maethu was my argument convincing?

…correct and proper

    This solves an issue in ftw.colorbox where overlays are not always loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants