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

Configure resources (plugin/css,etc) loading order #5327

Open
matiasamail opened this issue Aug 9, 2023 · 10 comments
Open

Configure resources (plugin/css,etc) loading order #5327

matiasamail opened this issue Aug 9, 2023 · 10 comments

Comments

@matiasamail
Copy link

It would be really helpfull to be able to set loading order of css, js, plugins...
I was trying to override some CSS (from theme and plugins), and I saw that my css gets loaded before the plugin with the CSS I need to override, so it could get really messy trying to override some rules of the styles loaded after my custom CSS.

I may help to complete the feature, I know the basis of PHP.

@aljawaid
Copy link
Contributor

Hello, I'm not sure if this is possible to resolve the issues you have.

Which plugins are you trying to override? Maybe there is a different way... if you cannot access the css file of the particular plugin.

@matiasamail
Copy link
Author

Hi, thanks for answering. ApplicationBranding is one of them.
Right now what I did is modify the "layout.php" file, adding a link at the bottom of to a custom stylesheet.
It solves the issue. It's just a bit nasty.

@aljawaid
Copy link
Contributor

Hi, thanks for answering. ApplicationBranding is one of them.
Right now what I did is modify the "layout.php" file, adding a link at the bottom of to a custom stylesheet.
It solves the issue. It's just a bit nasty.

ApplicationBranding is a plugin that I created. Create an issue in that repository and show a few details or screenshots/examples and I will see if I can adjust the plugin.

@matiasamail
Copy link
Author

Thanks for your help.
I don't think that modifying the plugin will do it. I mean, probably the best thing would be for kanboard to have by default (via the UI) a way to add custom css/js that gets loaded after all plugins are loaded.
So unless such functionality can be done in the plugin, I'll still have to modify the "layout.php" to load custom css.
I have to tweak the styling of various items (made by more than one plugin).

@aljawaid
Copy link
Contributor

Thanks for your help.
I don't think that modifying the plugin will do it. I mean, probably the best thing would be for kanboard to have by default (via the UI) a way to add custom css/js that gets loaded after all plugins are loaded.
So unless such functionality can be done in the plugin, I'll still have to modify the "layout.php" to load custom css.
I have to tweak the styling of various items (made by more than one plugin).

So as a thought...
There is a hook at the bottom of the layout. I can use that to resolve this I think.

@matiasamail
Copy link
Author

matiasamail commented Aug 12, 2023

You mean the bottom of the < body > section? It would be a weird place, but it may work.

@aljawaid
Copy link
Contributor

You mean the bottom of the < body > section? It would be a weird place, but it may work.

It would load as inline CSS so it would work

A file, however, without testing, I'm not sure. Although for JS it usually is the most recommended location.

I'll have a play with the plugin, star that repository to keep an eye on the developments.

@matiasamail
Copy link
Author

Thanks!

@aljawaid
Copy link
Contributor

@matiasamail I have added this feature in the plugin and it seems to work well. You can close this issue if you wish.

@matiasamail
Copy link
Author

Thanks for your kind work!

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

No branches or pull requests

2 participants