Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Is there plans to introduce D8 version of this module?
We would like to help you with development of this version or to implement it from scratch.
Thanks,
Snap_x
Comment | File | Size | Author |
---|---|---|---|
#24 | interdiff-2147973-22-24.txt | 4.02 KB | gvso |
#24 | scroll_to_top-port-to-drupal-8-2147973-24.patch | 20.18 KB | gvso |
#22 | interdiff-2147973-20-22.txt | 4.52 KB | gvso |
#22 | scroll_to_top-port-to-drupal-8-2147973-22.patch | 20.09 KB | gvso |
#20 | scroll_to_top-port-to-top-2147973-20.patch | 20.09 KB | gvso |
Comments
Comment #1
kolya-me CreditAttribution: kolya-me commentedWe (@InternetDevels team) have no answer in this issue for a long time, so we start working on it.
Comment #2
tarekdj CreditAttribution: tarekdj commentedHi id.webik, sorry to be late. Thank you for your initiative. I'm currently planning to launch a local sprint to upgrade the module. This will be an opportunity to noobs to learn. I apreciate your help.
Comment #3
kolya-me CreditAttribution: kolya-me commentedHere is patch that porting the module to Drupal 8.
We are keen on further development of scroll_to_top module. So, we would like to be part of the story in future.
Is there any chance of me (@InternetDevels team) joining the project as the maintainers?
Development sponsored by InternetDevels.
Comment #4
tarekdj CreditAttribution: tarekdj commentedComment #5
tarekdj CreditAttribution: tarekdj commentedPatch works fine. But needs more coding standards improvement.
Comment #6
tarekdj CreditAttribution: tarekdj commentedSince _drupal_add_js is deprectaed use hook_library_info() and #attached.
use #attached instead
Comment #7
tarekdj CreditAttribution: tarekdj commentedIssue marked for Tunisian local sprint next week!
Comment #8
tarekdj CreditAttribution: tarekdj commentedComment #9
mykolay CreditAttribution: mykolay commentedWe have seen that work on fixing the patch stopped so we decided to help.
Here is patch that porting the module to Drupal 8 with fixes conversion of which were listed in the comments #5, #6.
We want to continue development of version for Drupal 8. Can you please add me (@InternetDevels team) as a (co-) maintainers?
Comment #10
tarekdj CreditAttribution: tarekdj commentedHi id_matvey,
I appreciate your involvement and your interest. But I consider this little module as an opportunity for novices especially for my local community to learn drupal. I don't think for now that I need a co-maintainer. Thank you again.
Comment #11
mykolay CreditAttribution: mykolay commentedDrupal 8 is changing rapidly and so we can keep the branch fast updated we need maintainers accsess.
Comment #12
shkiper CreditAttribution: shkiper commentedHi, I made a version of this module that works with Drupal 8 beta
Here is my patch
Comment #13
gvsoHi!, Here is patch that porting the module to Drupal 8. This works with the current Drupal 8 beta 3.
Comment #14
naveenvalechaThanks! Awesome patch. Needs minor modifications. :)
White space issues.
Also at lot of places in the file.
No need to do IE6 hack becuase drupal 8 does not provide supports of IE6.
Need to use window object as well.
(function ($, window) {
and use the window instead of $(window)
I guess it should be like that I have specified.
Lot of white space issues in the whole file.
Add the dependencies here.under js path.
dependencies:
- core/jquery
We should use #attached instead of these deprecated functions.
Its not a issue but I prefer this one. Get the form state values using $form_state->getValues in a variable and then set them in configuration.
For interdiff : https://docs.google.com/presentation/d/1EcsQ88tlNwi3lGh2u-5SYz06_3i9fcc5...
Comment #15
naveenvalechaBetter to keep the background image inside the images directory in module.
Comment #16
gvsoHere is my revision. The (function ( $, window) { and just window instead $(window) make the module not work...
Comment #17
gvsoComment #18
naveenvalechaSeems half patch. new patch missed the .settings.yml,.libraries.yml,
Comment #19
gvsoI realized that you gave me suggestions minutes before I submitted my last patch. Here is going again. I hope this is ok.
Comment #20
gvsoIn this patch I solve the white spaces issues. The interdiff doesn't show differences and give me an empty file, so I just submit the patch. Sorry, I am learning how to do these stuff, but now I am understanding how it works :)
Comment #21
tarekdj CreditAttribution: tarekdj commentedThe patch doesn't apply correctly due to binary file issue in arrow.png. Good work basically with fiew changes:
This becomes:
see: https://www.drupal.org/node/1793334
use:
$("body").append("<p id='back-top'><a href='#top'><span id='button'></span><span id='link'>" + drupalSettings.label + "</span></a></p>");
Change by:
change by :
use:
use:
I also noticed that there is a problem with color forms in scroll to top settings (needs confirmation)
Comment #22
gvsoThank you very much for reviewing. Here is my patch again. I noticed that without the ready handle the button isn't appended in the body, also I changed all $(element).handle(function(){}); by $(element).on('handle', function(){});. Furthermore, with that the correct way for the preview is $('scroll-to-top').on('change', 'input', function(){});.
Comment #23
tarekdj CreditAttribution: tarekdj commentedAlmost there :-)!
It's Ok for using .on() but you have to keep Drupal.behaviors. You can see some example in core module js files that would help you.
A last little thing: see https://www.drupal.org/node/1955232 ;-)
Good job
Comment #24
gvsoI've done what you told me. Thanks again. Here is the patch
Comment #25
naveenvalechaAwesome Job!
Patch seems Ready to go!
+1 for RTBC
Comment #26
tarekdj CreditAttribution: tarekdj commentedGreat work! Patch will be committed to new branch tomorrow.
Comment #27
gvsoI'm so glad for this. Thank you very much for the help!
Comment #28
naveenvalecha@tarekdj,
A minor change.Would you please apply it while commmitting.
Remove this package key because the package is already other if we not specify.
Also Add the configure key.
configure: scroll_to_top.form
@gvso,
Nice contribution!
If you wanna write up your experiance for other students then It would be very good if you write your experiance how did you port this module to Drupal 8.
I have just prepared a single slide for you to just show you the sample example.See the presentation below
https://docs.google.com/presentation/d/1FkFJqkg4M3g3TBUHQRxUzeJB8hEPzkEZ...
Comment #30
tarekdj CreditAttribution: tarekdj commentedThank you all for the awesome work!
Comment #31
naveenvalechaCool :) Thanks @tarekdj!
Closing the issue with right status.
Comment #32
gvso@naveenvalecha I'm gonna do it. I am also going to do a video explaining how to port this module from scratch :)
Comment #33
naveenvalechaCool :)
Comment #35
gvsoI absolutely forgot to copy the link. Here is the series where I explain how to port a module using this as an example https://conocimientoplus.wordpress.com/2014/12/10/porting-a-drupal-7-mod...
Comment #36
naveenvalechaAwesome!