-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Clone URL no longer displayed without javascript #20558
Comments
More and more Gitea UI elements require JS now. Without JS, you can not merge, can not switch branches, can not comment, can not edit, can not update your settings, etc. I can not imagine a reason why the JS must be disabled in modern days when users want rich features on the UI (instead of just seeing static contents) If the disabling JS is necessary, then it's a totally new topic: how to make Gitea work without JS (I do not think it is the future). |
I mean, it worked in a previous version, and all that would be needed to fix is to give
Not everyone wants to run a botnet or a browser fuzzer when he visits a random webpage, want to greatly expand the fingerprinting capabilities of the sites, or wants to halve their remaining battery capacity because some broken JS code use 100% of their CPU. There are also cases when you have to repair some broken server and all you have is elinks/w3m to download/find some info. And 90%+ of webpages could function perfectly fine without any kind of JS code (no, google analytics is not an essential functionality for site visitors.) |
I've tried it in incognito, that should get rid of any caches. |
Correction, I had blocked js but I had "disable for this url" Basically the <input id="repo-clone-url" ... has been replaced by a small bit of inline js. I guess to offload some of the page rendering. |
I don't really think it has anything to do with offloading rendering, if you look at the template: https://github.com/go-gitea/gitea/blob/main/templates/repo/clone_buttons.tmpl it already adds the url to the HTTPS/SSH buttons as a |
That's a long story about the refactoring of the clone link/buttons (#19028 and #19208) In short, I do not think it's worth to "fix" it for no-JS, because eventually the clone link/buttons will be moved into a popup, just like GitHub.
I think use the "This website doesn't work without JavaScript, welcome to the modern internet." prompt is better. |
We can probably render a default value into DOM. Long-term, I would like this logic to move out of |
Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: go-gitea#20558
Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: go-gitea#20558
Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: #20558 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Clean up and fix clone button script (#20415) The button 'primary' class needs to be set in a synchronous script to prevent flicker of the button which was regressed recently, fixed that. Additionally, reduced the two script tags to just one, the previous scripts were actually initializing the buttons thrice on the empty repo page, now it only initializes once. Finally, removed duplicate code and re-used the inline function in the update code as well. I had to split out the script into a separate template as on the empty repo page, the script needs access to the clone URL span in the example text, which is rendered below the clone buttons, so buttons and script could not be combined. * Add default value for clone URLs Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: #20558
Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: go-gitea#20558 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
The clone url display was changed in 1.17.0, and it no longer works without javascript, in only displays an empty field. In 1.16.x and below at least it displayed the default protocol (it was still impossible to switch between HTTPS and SSH though).
Screenshots
A random project on try.gitea.org, in chromium:
And the same in elinks:
A screenshot from my instance which is still running 1.16.9, also without javascript:
The copy button doesn't work, but at least it's possible to select the url from the text field manually.
Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
Linux
Browser Version
ungoogled-chromium 103.0.5060.134
The text was updated successfully, but these errors were encountered: