You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a html message to GUI when javascript is disabled #7099
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionuiIssues related to the graphical user interface
If the browser loading the syncthing web GUI has something like noscript blocking javascript, the user is presented with a blank page. It would be helpful if a fallback html message stated that javascript is required for the page to load correctly.
Aside from the scenario of simply not connecting the dots that JS is being blocked, if the user is using a text-based browser like links the lack of JS results in a far more cryptic view (see attached screen shot).
Is there anyone with Javascript disabled who is actually surprised by this though?
I think that this is useful maybe not necessarily for those that disable JavaScript on purpose, but there are cases where a non-tech-savvy person fiddles around with browser settings (or extensions) ending up disabling JS by mistake 😅. This is one way to make them aware of that.
Aside from the scenario of simply not connecting the dots that JS is being blocked, if the user is using a text-based browser like links the lack of JS results in a far more cryptic view (see attached screen shot).
In order for a Web site to be nicely displayed in text-based browsers, you would have to start with a clean and semantic HTML code that needs neither CSS nor JS to work. CSS should only be used to decorate the site or arrange its structure, and everything that relies on JS should also only be added with JS. This is called progressive enhancement.
However, such an approach is impossible for an interactive Web application like Syncthing's Web GUI that cannot work without JS. While technically you could have a HTML stub and only add the JS-dependent code dynamically later, it would require a complete rewrite of the GUI as it is right now.
I have added the no-JS warning in a way that it would be displayed at the very top, so your text-based browser should at least clearly show it first. It will still print the non-functional code seen in your screenshot, but I do not think that anything can be done about it.
@tomasz1986 that makes perfect sense to me. I definitely didn't mean to imply reworking the entire page. I think the message at the top will make it clear that the current environment is not adequate for a functional experience. Thanks!
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionuiIssues related to the graphical user interface
Activity
calmh commentedon Nov 8, 2020
Is there anyone with Javascript disabled who is actually surprised by this though?
markmcb commentedon Nov 8, 2020
Yes
markmcb commentedon Nov 8, 2020
Aside from the scenario of simply not connecting the dots that JS is being blocked, if the user is using a text-based browser like links the lack of JS results in a far more cryptic view (see attached screen shot).
tomasz1986 commentedon Nov 9, 2020
I think that this is useful maybe not necessarily for those that disable JavaScript on purpose, but there are cases where a non-tech-savvy person fiddles around with browser settings (or extensions) ending up disabling JS by mistake 😅. This is one way to make them aware of that.
I will try to push a fix for this issue shortly.
gui: Add warning when JavaScript is disabled in Web browser (fixes sy…
gui: Add warning when JavaScript is disabled in Web browser (fixes sy…
gui: Add warning when JavaScript is disabled in Web browser (fixes sy…
gui: Add warning when JavaScript is disabled in Web browser (fixes sy…
gui: Add warning when JavaScript is unavailable (fixes syncthing#7099)
tomasz1986 commentedon Nov 9, 2020
@markmcb
In order for a Web site to be nicely displayed in text-based browsers, you would have to start with a clean and semantic HTML code that needs neither CSS nor JS to work. CSS should only be used to decorate the site or arrange its structure, and everything that relies on JS should also only be added with JS. This is called progressive enhancement.
However, such an approach is impossible for an interactive Web application like Syncthing's Web GUI that cannot work without JS. While technically you could have a HTML stub and only add the JS-dependent code dynamically later, it would require a complete rewrite of the GUI as it is right now.
I have added the no-JS warning in a way that it would be displayed at the very top, so your text-based browser should at least clearly show it first. It will still print the non-functional code seen in your screenshot, but I do not think that anything can be done about it.
Merge branch 'main' into encryption-featureflag
markmcb commentedon Nov 9, 2020
@tomasz1986 that makes perfect sense to me. I definitely didn't mean to imply reworking the entire page. I think the message at the top will make it clear that the current environment is not adequate for a functional experience. Thanks!
Merge branch 'main' into cdc
Merge tag 'v1.12.0' into ios_try_syncthing-1.12