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 CSS load order in Templates #1698

Merged
merged 6 commits into from
Oct 27, 2020
Merged

Fix CSS load order in Templates #1698

merged 6 commits into from
Oct 27, 2020

Conversation

MarcSkovMadsen
Copy link
Collaborator

For some reason the load order of the css had been switched ??

It's very important to first load the external, official framework css from getbootstrap, material design etc.

And then secondly import the customizations done in the templates. Otherwise the customizations will not take effect.

@MarcSkovMadsen
Copy link
Collaborator Author

In order for the templates to be useable this needs to be released @philippjfr .

@MarcSkovMadsen
Copy link
Collaborator Author

I've found the cause ad43110#r43609468

@philippjfr
Copy link
Member

In order for the templates to be useable this needs to be released @philippjfr .

I agree this should be applied but the templates are perfectly usable for me as they are. What exactly isn't working without this change?

@philippjfr
Copy link
Member

Basically not seeing any difference between this PR and master.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Oct 27, 2020

There is a difference right. For example

image

This is an important difference because the order of the css matters.

I described the consequence above

image

You can find more context here https://gitter.im/philippjfr

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Oct 27, 2020

@philippjfr . This is a major issue. Any new user trying out the templates will risk having a bad experience.

And I cannot get awesome-panel.org upgraded to Panel 0.10 before it's fixed and start promoting the new features.

Please ask more questions if this is not obvious to you.

Thanks.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Oct 27, 2020

I will try to explain again why this is important. Let's take a look at

import panel as pn

long_text = "abcde"*10

pn.template.MaterialTemplate(
    title="Hello World",
    sidebar=long_text,
    main=long_text,
).servable()

With Panel 0.10 it looks like

image

It's determined by the material design css file. Thus we have no way in the material.css file to override that unless we use !important which is a really bad practice and shold be avoided. Because it makes it difficult for users later to override the setting if they need it.

The material.css file is not taken into account since it is loaded before the material design framework css!

The consequence is that the templates DOES NOT WORK AS EXPECTED.

@philippjfr
Copy link
Member

I understand your concern here completely, but what I was saying is that I cannot see the issues you are saying are being caused by the wrong CSS ordering, e.g. this is what your example looks like using 0.10 for me:

Screen Shot 2020-10-27 at 12 02 06 PM

which is exactly the same as it looks with this PR, i.e. there is zero difference for me. The same is true for the issues you point out for the Vanilla template. Maybe this is another Windows vs. OSX thing.

I also don't know when the issues with the logos occurred as this was fixed the last time I looked. Let's make sure all of these issues are addressed and then we can push out 0.10.1.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Oct 27, 2020

Thanks. I was also a bit confused here I believe.

FYI @philippjfr . I have now used test_manual.py to go through all templates and fix all visual issues I've seen.

@philippjfr
Copy link
Member

Great work, I'll give it until the end of the day to discover other issues and then I'll release 0.10.1.

@philippjfr philippjfr merged commit b7f023c into master Oct 27, 2020
@philippjfr philippjfr deleted the template-panel010-fixes branch October 27, 2020 12:41
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