Nxt Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client 1.11.7 - NEW RELEASE: Ardor 2.0.3e TestNet IS LAUNCHED!

Pages: [1]

Author Topic: [core] bug bounty 3 - track loading progress before lock screen is displayed  (Read 626 times)

Riker

  • Core Dev
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1693
    • View Profile
  • Karma: +429/-42

Currently when connecting to a remote node for the first time, it's not uncommon to see a Blue screen displayed for 10-20 seconds while the client fetches the necessary resources.
The purpose of the task is to display a moving progress bar when loading the client until the lock screen is displayed.

There is no simple solution for this because of the way the client resources are loaded synchronously using the nrs.sitebuild.js script.
This synchronous loading is necessary in order to initialize the handle bars components and the localization resources.
The solution can utilize any wide spread web development technique, but not rely on any plugin, and has to work both in browser and in the mobile browser and not break the desktop wallet (which is less affected by this problem).

We would like to offer a 20K NXT bounty for this task.
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

n0gard

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
  • Karma: +0/-0

why dont you accept plugins?

Riker

  • Core Dev
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1693
    • View Profile
  • Karma: +429/-42

why dont you accept plugins?

By plugin I mean we don't want to use Java Applet, SilverLight etc.
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

Riker

  • Core Dev
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1693
    • View Profile
  • Karma: +429/-42

This bounty has been implemented by forum member blackbeam.
Thanks blackbeam!

You can see it in action when connecting to https://162.243.242.8:7876/index.html# (ignore the certificate warning and don't use this node for anything else please)
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

MrV777

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 974
    • View Profile
  • Karma: +111/-4
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

schoad

  • Newbie
  • *
  • Offline Offline
  • Posts: 11
    • View Profile
  • Karma: +0/-0

I propose the following minor additions:

index.html file:

Remove:
   <script>
            $('#progress-container').hide();
            $('html, body, #lockscreen').removeClass('loading');
        </script>

Add at the end of index.html (before </body>):
      <script>
         $( document ).ready(function() {
            $('#progress-container').hide();
            $('html, body, #lockscreen').removeClass('loading');
         });
      </script>


The following node is running with the changes:
https://nxtnode002.ddnss.eu:7876/index.html
« Last Edit: July 12, 2017, 07:37:54 pm by schoad »

Riker

  • Core Dev
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1693
    • View Profile
  • Karma: +429/-42

Right, in fact we already implement $(document).ready() in nrs.js and we likely move the hiding of the progress bar to there and perhaps also use it to track few other initialization tasks in the final code.
The main innovation of this solution is to load the same script multiple times and use the loading of the script as a trigger for loading other resources and performing other initialization tasks.
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651
Pages: [1]