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

Consider not compiling jQuery into kiwix-serve? #249

Open
legoktm opened this Issue Dec 21, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@legoktm
Copy link
Member

legoktm commented Dec 21, 2018

After a bit of debugging, I realized that kiwix-serve contains all of the jQuery JS and CSS in the binary itself.

This is somewhat problematic from a Debian packaging perspective, mostly because if we want to change the JS code, it requires recompiling kiwix-serve.

A little background, Debian would prefer it (though it's not a hard requirement) if packages used the packaged version of jQuery and jQuery UI, just like any other library dependency. But if we have to recompile kiwix-serve every time, that's pretty problematic.

Could kiwix-serve look for the JS resources in /usr/share/kiwix-serve/jquery/ or similar? That way those can be updated without requiring recomplication.

If there's a specific reason that the bundled jquery/jquery-ui need to be used, I can figure out a different approach that way as well.

@kelson42

This comment has been minimized.

Copy link
Contributor

kelson42 commented Dec 21, 2018

@legoktm We do that way to propose binaries which "just work", but I understand what you say. @mgautierfr would that be able to have compilation option allowing to deal with external version of jquery?

@legoktm

This comment has been minimized.

Copy link
Member

legoktm commented Dec 21, 2018

Makes sense. A compile-time option would be great if possible.

@mgautierfr

This comment has been minimized.

Copy link
Member

mgautierfr commented Jan 7, 2019

JQuery is only used for its autocomplete function to provide input completion on the searchbar.
I think we could use a different system (a quick search point me to https://github.com/Pixabay/JavaScript-autoComplete) instead of integrating a full jQuery library (outdated by the way)

I'm a bit afraid to be dependent of a files installed outwhere in the system. It would lead to the kiwix-tools package being dependent of jQuery package (and the kiwx-tools project not being dependent of jQuery).
What happen if the files are not present or cannot be read for some reason ?

@kelson42

This comment has been minimized.

Copy link
Contributor

kelson42 commented Jan 8, 2019

To me changing the library is just a workaround. I would stick to JQuery. It is quite clear anyway that this page (and the searchbar) will be rewritten anyway soon. Regarding the dependency to jquery, it is like any other dependence, it has to be there and the packaging system should secure this. That said, I would prefer that we do not touch this for now, IMO this is quite a bit of work, it is not the best moment and it seems not to be 100% mandatory. @legoktm Could you live with the current situation for now?

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