arvgta / ajaxify

Ajaxify - An Ajax Plugin
https://4nf.org/
275 stars 124 forks source link

create a bower Register file #138

Closed ghost closed 6 years ago

arvgta commented 6 years ago

Hi @mojeb-smile ,

thanks very much for the suggestion and all your effort - much appreciated!

I would have just a few questions before merging this pull request:

1) Can I still use

npm publish

... in order to publish new versions with npm?

2) Are there any known disadvantages when using Bower?

3) What does this message mean on here:

..psst! While Bower is maintained, we recommend using Yarn and Webpack for front-end projects read how to migrate!

Thanks again!

ghost commented 6 years ago

Hi Arvind,

yes you are right i did not see this message, the problem is we still work with Bower in many projects until now like http://www.beinsports.com. that will be awesome if you can adapt your projet for this new and old features like Bower,i already Register your project en Bower with this name "ajaxify-4nf" and the install cmd is "bower install ajaxify-4nf"

Thanks,

arvgta commented 6 years ago

Hi Mohammed,

thanks very much for your answer and please excuse the delay.

I understand the benefits of employing Bower, but again my question:

Does it have any disadvantages to use Bower?

and

Can I still use:

npm publish

?

I agree with you, that it would otherwise be awesome to use Bower... (all that needs to be done is to merge this pull request, right?)

Thanks!

ghost commented 6 years ago

Hi Arvind,

Answering your question in this article https://www.viget.com/articles/publishing-packages-to-npm-and-bower there is no disadvantage to use npm and bower in same project .

you can see this project as an example https://github.com/rstacruz/nprogress

Thanks!

arvgta commented 6 years ago

Hi Mohammed,

Thanks for the link to viget.com - I read it. It actually seems very similar to publish modules with Bower as it is with npm. There seems to be a little bit of initial overhead, but the updates work automatically?

At a GitHub level, all that needs to be done seems to be merging this pull request, right? I'll do that right now, because you said, your team needs it in order to proceed...

Maybe, we can continue our chat after merging the pull request!

Thanks!

arvgta commented 6 years ago

Hi Mohammed,

I've merged the pull request. What's next? Maybe, we can continue our conversation in here? If you really use Ajaxify at beinsports.com, I'll do anything you like - lol!

Thanks a bunch!

ghost commented 6 years ago

Hi Arvind,

Thanks for the merge and i will inform you when we deploy the Ajaxify in prod, the plugin will be used specifically in this page http://www.beinsports.com/en/videos

Thanks!

arvgta commented 6 years ago

Hi Mohammed,

Great stuff! So nothing more has to be done, as far as the Bower installation is concerned... I'm at your disposal, should you run into difficulties!

Thanks!

arvgta commented 6 years ago

Hi Mohammed,

are you still planning to procure Ajaxify on beinsports?

Thanks!

ghost commented 6 years ago

Hi Arvind, Yec of course, we stand waiting that our bein sports client to validate the Ajaxify functionality before to delivery it in prod.

i do not now if you can access to the test environment: http://front-uat.beinsports.com/france/videos

Cordially,

ghost commented 6 years ago

The js cod use it is: the url of nprogress plugin is https://github.com/rstacruz/nprogress. function bindVideoCentralClick() { $('.video-central .content-videolist a,' + '.video-central .content-videoitem a,' + '.video-central .cluster_video__article a').unbind('click'); if ($('#main_gallery').length) { $('#main_gallery').ajaxify({ selector: '.video-central .cluster_videoarticle a,' + '.video-central .content-videolist a,' + '.video-central .content-video__item a', requestDelay: 0, fade: 0, pop: 0, squeeze: 0, verbosity: 0, deltas: true, inline: false, inlinehints: false, style: false, forms: false, prefetch: false, turbo: false, previewoff: true, memoryoff: true, canonical: true, scrolltop: false, cb: function () { //scroll to video player $('html, body').animate({ scrollTop: ($('.video-central:first').offset().top), }, 500); //hide progress bar window.NProgress.done(); }, pluginon: true, }); } $(window).on('pronto.request', function () { //start progress bar window.NProgress.start(); //get the current event var event = $.rq('e'); //change the ajax request url by the data-url attribute value $.rq('h', $($.rq('l')).data('url')); //show a clean url in the browser event.currentTarget.href = $.rq('l').href; //set the current event $.rq('e', event); });

  $(window).on('pronto.render', function () {
    //change the header meta
    if (jQuery.getPage()) {
      var canonicalUrl    = $.getPage('head').find('.ajy-link[rel="canonical"]').attr('href');
      var metaDescription = jQuery.getPage('head').find('meta[name="description"]').attr('content');
      if (canonicalUrl && canonicalUrl !== '') {
        $('link[rel="canonical"]').attr('href', canonicalUrl);
      }
      if (metaDescription && metaDescription !== '') {
        $('meta[name="description"]').attr('content', metaDescription);
      }
    }
    //scroll to video player
    $('html, body').animate({
      scrollTop: ($('.video-central:first').offset().top),
    }, 500);
    //hide progress bar
    window.NProgress.done();
  });
}
arvgta commented 6 years ago

Hi Mohammed,

absolutely awesome! Thanks very much for posting back! All the best for the sign-off procedure!

Just as a word of caution - which version are you using?

Because I'm just seeing, that you're using "delta-loading" - the policy has changed with the last version, and that last version is registered now in the "bower" file (7.2.0).

If you're using an older version, I could change the bower file for you? (e.g. 7.1.0)

Or did you perform tests against the latest version?

Apart from that, everything looks brillliant!

Regards, Arvind

ghost commented 6 years ago

Hi, we use this bower version "ajaxify-4nf": "7.1.0".

you now It difficult for us to do an upgrade of a js plugin already deployed in teste environment ,it need to start all tests from the beginning.

Thank you anyway to inform me about the existence of a new version.

Regards,

arvgta commented 6 years ago

Hi Mohammed,

so version 7.1.0 is the one you're using and it works alright?

Please, by no means upgrade straight away - there is a major change in "delta loading".

So you've deployed version 7.1.0 - right? That's a nice, stable and clean version!

Thanks again and Regards

arvgta commented 6 years ago

Hi Mohammed,

am delighted to see, that you've employed Ajaxify in your live environment! Thanks very much once again!

Is there anything else, I can do for you?

Do you mind, if I list the Beinsports Videos section on my demo page?

If you feel like it, maybe you could tell me your opinion on the new "simple" delta-loading? (it affects you, if you would like to use future versions of Ajaxify)

Thanks and Regards, Arvind