git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[gsoc2012 wiki PATCH] "Use JavaScript library / framework in gitweb" project

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 8, 2012, 21:18 UTC
Message-ID
<1331241493-17188-1-git-send-email-jnareb@gmail.com>
In-Reply-To
<20120302091114.GA3984@sigill.intra.peff.net>

--- Inspied by problems with timezone changing JavaScript that Ramsay Jones had.

 SoC-2012-Ideas.md |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/SoC-2012-Ideas.md b/SoC-2012-Ideas.md
index 6f543f6..8c3b266 100644
--- a/SoC-2012-Ideas.md
+++ b/SoC-2012-Ideas.md
@@ -264,6 +264,60 @@ Programming language: Perl
 Proposed by: Jakub Narębski  
 Possible mentor(s): Jakub Narębski (?)
 
+Use JavaScript library / framework in gitweb
+--------------------------------------------
+
+Gitweb (git web interface) includes some *optional* client-side
+scripting using JavaScript.  This includes checking if JavaScript is
+available and remembering this information so gitweb can choose
+JavaScript-only version of a view (javascript-detection), selecting
+common timezone to use when showing dates (adjust-timezone), and
+AJAX-y incremental blame view (blame_incremental).
+
+Currently all this is done using hand-written JavaScript.  This means
+that gitweb scripting includes handling cookies, formatting output,
+processing dates, and smoothing out incompatibilities between browsers
+(like e.g. XmlHttpRequest creation).
+
+This is redoing work which JavaScript libraries, such as jQuery,
+MooTools or YUI already did.  Moreover, if we want to add new features
+(e.g. table sorted using JavaScript), or improve existing ones, we
+would have to re-implement existing JavaScript code.  Also our
+hand-crafted code is not as well tested as widely used JavaScript
+libraries.
+
+The goal of this project is to move gitweb client side scripting to
+use some JavaScript library / JavaScript framework.
+
+The project would consist of the following steps:
+
+ * Add support for configuring and loading external JavaScript library
+   to `gitweb/gitweb.perl` and `gitweb/Makefile`.  It would be nice
+   (though not necessary) to be able to use local version of library,
+   and have such feature well documented.
+
+ * Remove gitweb's JavaScript mini-library in `gitweb/static/js/lib`
+   and replace it part by part by appropriate JavaScript library
+   functions (methods).
+
+ * Replace DOM selectors by library version, if applicable.
+
+ * Optional: emulate 'onprogress' in XmlHttpRequest using native
+   JavaScript library mechanism (creating a class, or whatever).
+
+ * Optional: better deferring of repainting in incremental blame.
+
+Note that we require that client-side scripting in gitweb follow
+[progressive enhancement] strategy; gitweb should work correctly,
+perhaps with reduced functionality, even if JavaScript is turned off,
+or external JavaScript library cannot be loaded.
+
+[progressive enhancement]: http://en.wikipedia.org/wiki/Progressive_enhancement
+
+Programming language: JavaScript  
+Proposed by: Jakub Narębski  
+Possible mentor(s): Jakub Narębski
+
 Finishing network support for libgit2
 -------------------------------------
 
-- 
1.7.9
Previous: Shawn PearceNext: Jeff King
Message 17 of 20 in “GSoC 2012 application process”
  1. Jeff KingMar 2, 2012
  2. Nguyen Thai Ngoc DuyMar 2, 2012
  3. Junio C HamanoMar 2, 2012
  4. Jeff KingMar 3, 2012
  5. "Modernizing and expanding Git.pm" projectJakub Narebski, Mar 3, 2012
  6. Jeff KingMar 3, 2012
  7. Teaching "--3way" to "git apply"Junio C Hamano, Mar 4, 2012
  8. Jeff KingMar 5, 2012
  9. Thomas RastMar 5, 2012
  10. Jeff KingMar 5, 2012
  11. Matthieu MoyMar 5, 2012
  12. Jeff KingMar 5, 2012
  13. Matthieu MoyMar 5, 2012
  14. Jeff KingMar 5, 2012
  15. GSoC backup adminJeff King, Mar 7, 2012
  16. Shawn PearceMar 7, 2012
  17. "Use JavaScript library / framework in gitweb" projectJakub Narebski, Mar 8, 2012
  18. Jeff KingMar 9, 2012
  19. "`git instaweb --serve`" projectJakub Narebski, Mar 10, 2012
  20. "Graphical diff in git-gui" projectJakub Narebski, Mar 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.