From c4bc38f0d75d98946d98fd75f7735aedf356e960 Mon Sep 17 00:00:00 2001 From: Tom Lant Date: Thu, 9 Mar 2017 12:00:54 +0000 Subject: [PATCH 001/107] Fixing triage markdown as per #3382 --- README.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fd6acfd778..a5456c1dcb 100644 --- a/README.md +++ b/README.md @@ -263,21 +263,28 @@ Triaging issues Issues will be triaged by the core team using the following primary set of tags: priority: - P1: top priority; typically blocks releases. - P2: one below that - P3: non-urgent - P4/P5: bluesky some day, who knows. + +* P1: top priority; typically blocks releases +* P2: still need to fix, but lower than P1 +* P3: non-urgent +* P4: intereseting idea - bluesky some day +* P5: recorded for posterity/to avoid duplicates. No intention to resolves right now. bug or feature: - bug severity: - * cosmetic - feature works functionally but UI/UX is broken. - * critical - whole app doesn't work - * major - entire feature doesn't work - * minor - partially broken feature (but still usable) - * release blocker +* bug +* feature - * ui/ux (think of this as cosmetic) +bug severity: + +* cosmetic - feature works functionally but UI/UX is broken +* critical - whole app doesn't work +* major - entire feature doesn't work +* minor - partially broken feature (but still usable) - * network (specific to network conditions) - * platform (platform specific) +additional categories: + +* release blocker +* ui/ux (think of this as cosmetic) +* network (specific to network conditions) +* platform (platform specific) From 99923b7b8f67b3d82df069db032611430443262d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 3 Apr 2017 20:30:05 +0100 Subject: [PATCH 002/107] Escape HTML tags in Notifications (Linux) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index c10f2f83c0..ce14a22e32 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -81,6 +81,15 @@ export default class ElectronPlatform extends VectorBasePlatform { } displayNotification(title: string, msg: string, avatarUrl: string, room: Object): Notification { + + // GNOME notification spec parses HTML tags for styling... + // Electron Docs state all supported linux notification systems follow this markup spec + // https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#linux + // maybe we should pass basic styling (italics, bold, underline) through from MD + if (window.process.platform === 'linux') { + msg = msg.replace(//g, ">"); + } + // Notifications in Electron use the HTML5 notification API const notification = new global.Notification( title, From 8707cca7bcd2d3785c1630a653ca39e10e873ed5 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 4 Apr 2017 16:29:12 +0100 Subject: [PATCH 003/107] Remove rageshake server This is now at https://github.com/matrix-org/rageshake --- scripts/rageshake.go | 146 ------------------------------------------- 1 file changed, 146 deletions(-) delete mode 100644 scripts/rageshake.go diff --git a/scripts/rageshake.go b/scripts/rageshake.go deleted file mode 100644 index a150eab75d..0000000000 --- a/scripts/rageshake.go +++ /dev/null @@ -1,146 +0,0 @@ -// Run a web server capable of dumping bug reports sent by Riot. -// Requires Go 1.5+ -// Usage: BUGS_USER=user BUGS_PASS=password go run rageshake.go PORT -// Example: BUGS_USER=alice BUGS_PASS=secret go run rageshake.go 8080 -package main - -import ( - "bytes" - "compress/gzip" - "crypto/subtle" - "encoding/json" - "fmt" - "io/ioutil" - "log" - "net/http" - "os" - "path/filepath" - "strconv" - "time" -) - -var maxPayloadSize = 1024 * 1024 * 55 // 55 MB - -type LogEntry struct { - ID string `json:"id"` - Lines string `json:"lines"` -} - -type Payload struct { - Text string `json:"text"` - Version string `json:"version"` - UserAgent string `json:"user_agent"` - Logs []LogEntry `json:"logs"` -} - -func respond(code int, w http.ResponseWriter) { - w.WriteHeader(code) - w.Write([]byte("{}")) -} - -func gzipAndSave(data []byte, dirname, fpath string) error { - _ = os.MkdirAll(filepath.Join("bugs", dirname), os.ModePerm) - fpath = filepath.Join("bugs", dirname, fpath) - - if _, err := os.Stat(fpath); err == nil { - return fmt.Errorf("file already exists") // the user can just retry - } - var b bytes.Buffer - gz := gzip.NewWriter(&b) - if _, err := gz.Write(data); err != nil { - return err - } - if err := gz.Flush(); err != nil { - return err - } - if err := gz.Close(); err != nil { - return err - } - if err := ioutil.WriteFile(fpath, b.Bytes(), 0644); err != nil { - return err - } - return nil -} - -func basicAuth(handler http.Handler, username, password, realm string) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - user, pass, ok := r.BasicAuth() // pull creds from the request - - // check user and pass securely - if !ok || subtle.ConstantTimeCompare([]byte(user), []byte(username)) != 1 || subtle.ConstantTimeCompare([]byte(pass), []byte(password)) != 1 { - w.Header().Set("WWW-Authenticate", `Basic realm="`+realm+`"`) - w.WriteHeader(401) - w.Write([]byte("Unauthorised.\n")) - return - } - - handler.ServeHTTP(w, r) - }) -} - -func main() { - http.HandleFunc("/api/submit", func(w http.ResponseWriter, req *http.Request) { - if req.Method != "POST" && req.Method != "OPTIONS" { - respond(405, w) - return - } - // Set CORS - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS") - w.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept") - if req.Method == "OPTIONS" { - respond(200, w) - return - } - if length, err := strconv.Atoi(req.Header.Get("Content-Length")); err != nil || length > maxPayloadSize { - respond(413, w) - return - } - var p Payload - if err := json.NewDecoder(req.Body).Decode(&p); err != nil { - respond(400, w) - return - } - // Dump bug report to disk as form: - // "bugreport-20170115-112233.log.gz" => user text, version, user agent, # logs - // "bugreport-20170115-112233-0.log.gz" => most recent log - // "bugreport-20170115-112233-1.log.gz" => ... - // "bugreport-20170115-112233-N.log.gz" => oldest log - t := time.Now().UTC() - prefix := t.Format("2006-01-02/150405") - summary := fmt.Sprintf( - "%s\n\nNumber of logs: %d\nVersion: %s\nUser-Agent: %s\n", p.Text, len(p.Logs), p.Version, p.UserAgent, - ) - if err := gzipAndSave([]byte(summary), prefix, "details.log.gz"); err != nil { - respond(500, w) - return - } - for i, log := range p.Logs { - if err := gzipAndSave([]byte(log.Lines), prefix, fmt.Sprintf("logs-%d.log.gz", i)); err != nil { - respond(500, w) - return // TODO: Rollback? - } - } - respond(200, w) - }) - - // Make sure bugs directory exists - _ = os.Mkdir("bugs", os.ModePerm) - - // serve files under "bugs" - fs := http.FileServer(http.Dir("bugs")) - fs = http.StripPrefix("/api/listing/", fs) - - // set auth if env vars exist - usr := os.Getenv("BUGS_USER") - pass := os.Getenv("BUGS_PASS") - if usr == "" || pass == "" { - fmt.Println("BUGS_USER and BUGS_PASS env vars not found. No authentication is running for /api/listing") - } else { - fs = basicAuth(fs, usr, pass, "Riot bug reports") - } - http.Handle("/api/listing/", fs) - - port := os.Args[1] - log.Fatal(http.ListenAndServe(":"+port, nil)) -} From 3407f66e8262f9a05cee6addbb2a7bf842c4746e Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 4 Apr 2017 16:36:05 +0100 Subject: [PATCH 004/107] Adjust CSS for matrix-org/matrix-react-sdk#789 --- .../matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss index 7bbafcbe41..6b0c8863d4 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss @@ -20,11 +20,17 @@ limitations under the License. padding-top: 5px; padding-bottom: 5px; border-bottom: 1px solid $primary-hairline-color; + + /* in absence of img */ + height: 24px; } .mx_TopUnreadMessagesBar_scrollUp { display: inline; cursor: pointer; + + /* in absence of img */ + padding-left: 65px; } .mx_TopUnreadMessagesBar_scrollUp img { From f187a359e6e7349bc627a12f11fd0238a3e4d1b5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 6 Apr 2017 11:15:14 +0100 Subject: [PATCH 005/107] Add support for indexeddb sync in webworker --- src/vector/index.html | 15 +++++++++++++-- src/vector/index.js | 4 ++++ src/vector/indexedbd-worker.js | 26 ++++++++++++++++++++++++++ webpack.config.js | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/vector/indexedbd-worker.js diff --git a/src/vector/index.html b/src/vector/index.html index e86f299647..fa6c6e19f5 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -37,8 +37,19 @@
- <% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) {%> - + <% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) { + // Not a particularly graceful way of not putting the indexeddb worker script + // into the main page + if (htmlWebpackPlugin.files.js[i].endsWith('indexeddb-worker.js')) { + %> + + <% + continue; + } + %> + <% } %>