adagios icon indicating copy to clipboard operation
adagios copied to clipboard

Add bower support

Open titilambert opened this issue 10 years ago • 16 comments

Hello ! Here the bower support for Adagios :)

@matthieucan Do you see any error ?

Thanks !

titilambert avatar Oct 21 '14 02:10 titilambert

If bower.json is the same as in savoirfairelinux/adagios, the rest will follow :)

matthieucan avatar Oct 21 '14 10:10 matthieucan

@matthieucan Yes it is :)

titilambert avatar Oct 21 '14 13:10 titilambert

This pull request seems to have some issues. I think the main issue is that there are javascript libarary updates within this pull request. One problem noted is that the objectbrowser (Configure) list table does not render at all. Might have something to do with datatables being upgraded to 1.10.2.

Adagios versions

package master bower notes
bootstrap 2.0.4 2.3.2
chosen 0.9.8 0.9.8
datatables 1.9.2 1.10.2
bootstrap-datepicker unknown 1.3.0 the original doesn't seem to be versioned
jquery 1.9.1 1.9.1
select2 3.2 head Should probably reference a release
datatable None head New, should probably reference a release, belongs in a different pull request?

This needs some more testing before we can merge.

We cannot update each library in independant pull requests since the libraries have versioned dependencies into each other and will not work without updating the others.

tomas-edwardsson avatar Oct 22 '14 10:10 tomas-edwardsson

@matthieucan I hope you can REhelp me with this one

titilambert avatar Oct 22 '14 21:10 titilambert

@titilambert does it work when you downgrade datatables?

matthieucan avatar Oct 23 '14 14:10 matthieucan

We need a test for object browser.configure... It seems to be one of the most fragile things that are currently untested. On Oct 23, 2014 4:04 PM, "Matthieu Caneill" [email protected] wrote:

@titilambert https://github.com/titilambert does it work when you downgrade datatables?

— Reply to this email directly or view it on GitHub https://github.com/opinkerfi/adagios/pull/440#issuecomment-60243236.

palli avatar Oct 23 '14 17:10 palli

@matthieucan In fact, it's only DT_bootstrap which is missing... You already wrote it in the README.bower file ... Could you tell us how to fix ALL what you wrote in the README.bower file ?

Thanks !

titilambert avatar Oct 23 '14 19:10 titilambert

  • html5shim: that's an external dependecy downloaded directly via a CDN, this fact might not suite your free software requirements; if not you'll have to patch Bootstrap and add it in the Bower list.
  • jqplot: maybe have a direct link to the source file; but this library was only used for demos purposes and is not needed at all if you don't use the "plot" template.
  • DT_bootstrap.{css,js}: well you added its source code. If upstream doesn't ship the files anymore, there's barely a better solution!

matthieucan avatar Oct 23 '14 22:10 matthieucan

@tomas-edwardsson I think I resolve the issue with the last commit

titilambert avatar Oct 24 '14 02:10 titilambert

This patch is making me uncomfortably aware of how many (shaky?) javascript dependencies we have.

Does anyone have opinion on the dependencies that are outside bower repositories (like select2 which points to a github repository).

There is a real risk, that 1 or 2 years in the future those links might be gone, effectively breaking adagios.

A workaround could be to fork those repositories and point our links there.

palli avatar Oct 27 '14 21:10 palli

@palli keep in mind most bower repos are github repos!

matthieucan avatar Oct 27 '14 21:10 matthieucan

yes, which helps us partly if (when) any of them updates and breaks backwards compatibility, but not if the projects are removed or renamed.

palli avatar Oct 27 '14 21:10 palli

Sure, the idea of forking them is nice, and doesn't prevent to still linking to the original repos :)

matthieucan avatar Oct 27 '14 22:10 matthieucan

I don't think this is a real issue and we should cross that bridge when we need to. The libraries that we are using are packaged in the rpm/deb packages so if any of them are removed/disappear we can find the source there. I really want to avoid having to maintain forks if it is not needed.

tomas-edwardsson avatar Nov 06 '14 22:11 tomas-edwardsson

Are you still working on this patch ? I noticed a few issues that might block this patch from getting into master, namely:

  • Bootstrap is being updated from 2.0.4 to 2.3.2 and causes styling problems
  • Bootstrap-3.1.1 is removed (was used by contrib/raymii.html)
  • javascript errors happen on page load (at least I noticed DT_bootstrap.js was missing)

Going forward, i'm pretty sure we need something like bower to keep our javascript dependencies maintainable, but maybe this was to big of a change in one point in time. Also I think it is a general problem that we don't have a copy of them locally as well.

I propose the following:

  • Move all external javscripts into a sub-module (already done in #458)
  • Make only a proof-of-concept version of bower.json which has only jquery as a depency.
  • I'm thinking with this new setup bower.json maybe belongs in adagios-dependencies repository instead of adagios.repository.
  • When this is done, we look at bowerising other dependencies as well, making sure not to create any breakage

This way when doing git clone of adagios, we are guaranteed to have a working version of adagios because a downloaded copy of the dependencies exists in media/external

Comments ?

palli avatar Nov 09 '14 13:11 palli

Hello ! I can not work on this patch right now... Maybe in January. I think what you proposed is good for now. So, let go like this ! Thanks !

Do you want I close this issue ?

titilambert avatar Nov 10 '14 21:11 titilambert