GHC 2018-12-10

5 comments.

, https://git.io/fpQLj in transmission/transmission
> If it is on a menu item then the context menu stays, otherwise ...

Not exactly, I can make the context menu stay even when my finger is outside the context menu.

Edit: The trick is to move your finger a little bit while holding. Probably breaks the touch event in some way (not a web dev, especially not on mobile, so not sure).

, https://git.io/fpQJi in transmission/transmission
Oh, the patch goes into the PR too, since it's about enabling context menu on mobile, not just iPads.

, https://git.io/fpQJP in transmission/transmission
Good catch. Kinda funny that it works on the iPad because the user agent test for mobile devices is incomplete.

Anyway, here's the patch to enable context menus on all mobile devices:

```diff
diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js
index 4b560ccb3..c3cdedf29 100644
--- a/web/javascript/transmission.js
+++ b/web/javascript/transmission.js
@@ -84,9 +84,10 @@ Transmission.prototype = {
             $('#inspector_link').click($.proxy(this.toggleInspector, this));
 
             this.setupSearchBox();
-            this.createContextMenu();
         };
 
+        this.createContextMenu();
+
         if (this.isMenuEnabled) {
             this.createSettingsMenu();
         };
```

I guess the rationale to not enable this on mobile ~is~ was viewport size, but mainstream phones are so big these days it shouldn't be an issue anymore.

Anyway, I briefly tested this on my iPhone (XS Max, viewport is plenty big for sure), and tap & hold for context menu is hit-and-miss — often enough the info pane is opened when I release my finger. Someone else could look into what mobile-only shenanigans is causing this; the patch is working well enough on my iPad as is, and that's all I ask for.

, https://git.io/fpHhK in isaacs/github
Back button on user profile page
================================

Not sure if this is a dupe (I made my best effort to search for it before posting, but there are many possible ways to phrase this).

Starting from a couple months ago (?), GitHub started automatically adding query params to the overview tab of the user profile page, and the params change as you scroll. So if you visit https://github.com/isaacs, the URL automatically becomes https://github.com/isaacs?tab=overview&from=2018-11-01&to=2018-11-30, and as you scroll down to view past activities, you get https://github.com/isaacs?tab=overview&from=2018-10-01&to=2018-10-31, https://github.com/isaacs?tab=overview&from=2018-09-01&to=2018-09-30, etc. Sometimes you open the profile of a not-so-active user, and the URL might change a couple of times before you even initiate a single interaction. Now, the usability of the back button is totally destroyed: back, back, back, back, back... and you finally escape that damned profile page. Makes you never want to view a profile again. This has been annoying me to no end.

Apart from this "feature" being totally pointless, it's incredibly easy to fix: using `history.replaceState` would get rid of all those duplicate entries (I'm no web developer, but I once built a single page app for a side project with the `history` API, including using `history.replaceState` to change the hash when the user scrolls; it works seamlessly). Not sure why they never thought of that.

, https://git.io/fpHPc in transmission/transmission
Okay, yeah.