Closed Bug 1081074 Opened 11 years ago Closed 9 years ago

treeherder should remember the last repo I used and load that by default

Categories

(Tree Management :: Treeherder, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: davidwalsh)

References

Details

(Keywords: outreachy)

Attachments

(2 files)

The default for treeherder is mozilla-central, but 99% of the time I want to see mozilla-inbound. I think treeherder should remember the last repo I looked at and load that from the main page.
Yeah a pinned set of favourites that are stored against the logged in user would be great. We currently don't have prefs by user, but is something we'll need for other features in the future too.
Priority: -- → P4
Doesn't even need to be tied to my user account, just saving it in a cookie/localStorage/whatever would be fine.
Keywords: outreachy
Possibly not everyone would want this. Maybe make a button to "set as default" or something? Yet another use for a "Pin" button. :)
Attachment #8820858 - Flags: review?(cdawson)
I suspect there may be as many opinions about this as there are people using Treeherder... :) Will's point about discover-ability is a good one. For "default" perhaps just the last one you visited would be good. Though personally, I'd prefer a pin icon next to (to the left of) the current repo name. The old TBPL used to have links for the last 2 or 3 repos you visited next to the one you're currently on. Those could exist just to the right of the current repo on the that same line and look just like links. Thoughts, anyone?
Comment on attachment 8820858 [details] [review] [treeherder] darkwing:1081074 > mozilla:master David-- Clearning the review flag for now. Sounds like we're not actually in consensus for the right way to fix this. I added a few thoughts above.
Attachment #8820858 - Flags: review?(cdawson)
Flags: needinfo?(cdawson)
David-- How about we go with the way TBPL had it? Add links to the last 2 repos the user has visited that are NOT mozilla-inbound. Keep the default load as mozilla-inbound. Would that work for you?
Flags: needinfo?(cdawson) → needinfo?(dwalsh)
Can I ask the significance of saving just the last 2-3 repos? For the sake of UI integrity and consistency, wouldn't it make more sense to keep open each repo? Much like browser tabs? One issue with trimming the repo list is that we need to reverse the order of the repos as they open, and thus the initial load and tab selection appears in one order, but after the reverse (to keep the latest opened repos), the tabs will display in a different order. For example: Original Page Load ================== 1. Page loads, "mozilla-inbound" the only repo picked 2. User clicks "autoland", then "elm", then "date" 3. Repo tab display order: [mozilla-inbound, autoland, elm, date] 4. Saved to localStorage as [mozilla-inbound, date, elm] (m-i first because we force that, autoland gone because we only want to save 3 repos Next Page Load (refresh the page or new session ================== 1. Page loads, tab display order: [mozilla-inbound, date, elm] You can see that the "elm" and "date" items display in reverse order than their original selection, and autoland is gone. IMO this is confusing due to the 3 repo limit -- things disappear and appear in different orders. I recommend we don't impose this arbitrary repo limit and we simply save the user's repo list as they've specified; it's easy enough for them to toggle watch via the "Repos" list or "close" the repo with the "x" icon. Let me know your thoughts; I'm not a Treeherder user, much less power user, so let me know if I'm missing something.
Flags: needinfo?(dwalsh) → needinfo?(cdawson)
So, as opposed to browser tabs, the links we're talking about adding here are not really "open". They won't have any data associated with them. They're more like a browser history (repo history) than tabs. I envision this flow: (forgive the ascii art) ===================== 1. Page load with no repos on localstorage - "o mozilla-inbound (i)" showing as it currently does 2. User chooses "mozilla-central" from the repo menu - Shows "o mozilla-central (i) - mozilla-inbound" 3. User chooses "try" from the repo menu - Shows "o try (i) - mozilla-central, mozilla-inbound" 4. User chooses "elm" from the repo menu - Shows "o elm (i) - try, mozilla-central" 5. User loads treeherder.mozilla.org fresh again (no url params stating a repo) - Shows "o mozilla-inbound (i) - elm, try" I don't care if it's 2 or 3 repos we show, tbh. Whatever may fit in a small screen without adding unnecessary clutter, I guess. :) And, of course, use whatever styling you think is best to delimit the repo links. They should be real links that someone can cmd-click or ctrl-click to open in a new browser tab. So you would store them as a comma-delimited string. Then read and parse it back into an array and reverse order, remove the current repo, etc. We can always chat on vidyo if I'm not making any sense. :)
Flags: needinfo?(cdawson)
Hey Cam! I've created a new pull request (https://github.com/mozilla/treeherder/pull/2105) for which I'd like feedback on the functionality. Commit 2's code is ... special ... using CSS to display the repo list in reverse order (yuck); It would be good pick your brain via Vidyo when you have time to discuss sorting via: ``` <th-watched-repo ng-repeat="(name, repoData) in repoModel.watchedRepos"></th-watched-repo> ``` Thank you!
Assignee: nobody → dwalsh
Attachment #8830424 - Flags: review?(cdawson)
Comment on attachment 8830424 [details] [review] [treeherder] darkwing:1081074-save-repos > mozilla:master Clearing the review for now till you make the changes we talked about. I.e.: making watchedRepos into an array or set.
Attachment #8830424 - Flags: review?(cdawson)
Comment on attachment 8830424 [details] [review] [treeherder] darkwing:1081074-save-repos > mozilla:master My apologies at this dragging on, Cam -- loading one way, displaying another way, and then storing another way is ... hard. So `orderBy|reverse` isn't going to work; when the user clicks the first new repo checkbox, that repo is added before "mozilla-inbound", but subsequent items are added *after* that first new item. Really odd and disappointing. Instead of pushing onto the end of the array, I'm shifting to the beginning of the array; it makes clipping to 3 easier and it better represents the data, as well as Angular laying it out properly without hacks.
Attachment #8830424 - Flags: feedback?(cdawson)
Comment on attachment 8830424 [details] [review] [treeherder] darkwing:1081074-save-repos > mozilla:master I left a comment in the PR for how to fix part of the treestatus. But you'll also need the "message of the day" displayed when you click the (i) button. Take a look at the "gaia" repo, for an example. Not all repos have MOTDs. We're very close! :)
Attachment #8830424 - Flags: feedback?(cdawson) → feedback-
Attachment #8830424 - Flags: review?(cdawson)
Attachment #8830424 - Flags: feedback-
Comment on attachment 8830424 [details] [review] [treeherder] darkwing:1081074-save-repos > mozilla:master Awesome! Thanks for your patience and the fixes! :)
Attachment #8830424 - Flags: review?(cdawson) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: