Skip to content
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

Fix performance, SEO, and accessibility issues #157

Open
BurkusCat opened this issue Mar 7, 2020 · 1 comment
Open

Fix performance, SEO, and accessibility issues #157

BurkusCat opened this issue Mar 7, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@BurkusCat
Copy link
Owner

Describe the bug
Site analysis tools like Google Chrome Audit report problems with the website. Most are simple to fix.

To Reproduce
Use an analysis tool to generate a report on r6counters.com (build processes and caching remove a lot of errors you may see locally).

Expected behavior
Simple site issues reported by these tools are resolved.

Screenshots

Device (please complete the following information):

  • Device type: [e.g. iPhone6, Laptop]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
@BurkusCat BurkusCat added the bug Something isn't working label Mar 7, 2020
@BurkusCat BurkusCat self-assigned this Mar 7, 2020
@Mr-Martinez
Copy link
Collaborator

Mr-Martinez commented Mar 7, 2020

I'm not sure if this is the same bug, but I noticed that the website https://r6counters.com is not displaying anything. The problem I see on the debug console on the web browser debugging tools is the click events not registering and that nejsd3.js file is not found. It helps if the website was able to pull the current main/html/index.html file "replace click events with event listeners" and to make sure that the website has the correct .js file that the html file links to.

Here is a small snippet of last few lines of code of the the index.html the server is displaying:

...
var startButton = document.getElementById("startButton"); 
            var stopButton = document.getElementById("stopButton"); 
 
            function init() {
                startButton.style.display = "none"; 
                stopButton.style.display = "block"; 

                neo4jd3Options.counters = [document.querySelector('#hardCounters').checked, document.querySelector('#softCounters').checked, 
                        document.querySelector('#minorCounters').checked]; 
                neo4jd3 = new Neo4jd3('#neo4jd3', neo4jd3Options); 
            } 
 
            function unfreezeAllNodes() { 
                startButton.style.display = "none"; 
                stopButton.style.display = "block"; 
                neo4jd3.unfreezeAllNodes(); 
            } 

            function freezeAllNodes() { 
                stopButton.style.display = "none"; 
                startButton.style.display = "block"; 
                neo4jd3.freezeAllNodes(); 
            } 
 
            window.onload = init; 
...

Here is a small snippet of code that is missing from the small snippet above:

//event listeners to handle clicks, module is not global scoped
            document.getElementById('hardCounters').addEventListener('click', init);
            document.getElementById('softCounters').addEventListener('click', init);
            document.getElementById('minorCounters').addEventListener('click', init);
            document.getElementById('startButton').addEventListener('click', unfreezeAllNodes);
            document.getElementById('stopButton').addEventListener('click', freezeAllNodes);

I believe that not all of the code that was written in the html and js files got transferred over to the web server. The error codes I see is are the same ones I had when working on the update for gulp. The fix was to rewrite some of the html and js files in the src/main folder

There is more that is missing as well in the html file on the server that I did not how in the snippets above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants