-
Notifications
You must be signed in to change notification settings - Fork 193
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
Build global issues view #266
Comments
Just brain dumping/storming here: We have API endpoints for untriaged, needs diagnosis, ready for outreach and site contacted at: https://github.com/webcompat/webcompat.com/blob/master/webcompat/api/endpoints.py#L86-L148 We could easily make another one for "closed". It would also be nice to grab all issues and just do the filtering on the clientside-- OK, scratch that. GitHub will actually paginate this for us, even if we ask for
|
ooooh. ❤️
|
Ditching "Team" for now, #288. |
So we've got two API sources for this: issues API and the search API. I'm going to attempt to get all the non-search data from the Issues API and leave the search API for user-initiated search. (It's probably possible to do everything via the search API, but the rate limit would kill us.) |
@miketaylr when I was working on optimizing the code for #294 I realized that Trying to understand a bit more below.
We never really have access to all issues.
Tell me if I'm wrong. In our current UI, how do we navigate older issues than the recent ones. Currently the home page is showing only the most recent ones. Luckily, we do not really offer the option to show the oldest ones first. We could not do it in the current design of the API. Not sure there's an easy solution though. Question:
|
Not from the home page. As it's designed, it's just a "bite-sized" preview of our issues.
From the homepage we don't. On the Not a reflection of the final product, but should give you an idea: |
Sorry, very vague language on my part. In my mind the /issues page does three things: 1) filter issues 2) search issues 3) sort issues. 3 is probably just an operation on the results of 1 and 2. So non-search data is the result from a "filter" operation--clicking on "Needs Diagnosis", for example. The point of my comment was just me thinking out loud--we can get all the same results from the Issues API with the Seach API. But it's way more expensive to do so. Probably OK if we could force all users to login, but not possible for the proxied "anonymous" approach. |
For the Issues page, aka,
Sorting issue is orthogonal to search and filter in my understanding and it is where the difficulty is without a local dump of all issues (all of that if I'm not making a fool of myself 🌵 living dangerously). Let's say you displayed all the untriaged. Untriaged is a reduced version of the paginated all issues case. It's a list with holes. It also means that if you sort them by oldest, for example, you can't fech the last paginated link because it might contain no untriaged issues at all. You could go fetch one by one links starting from the oldest until you build up the 10 links you need for displaying in the UI, but that would be consuming resources. It's one of the issues. Or Maybe for untriaged we need to use github search all the time. I wonder if we have similar issues for the contactready/sitewait/etc cases. Need to think about it. Also background thought, I wonder if it would be expensive to store all of that on the client side in one storage bucket so we could play with the data. Like how long does it take to fetch the 8 current pages of all issues compared to all the subsequent requests to create the searches, etc. :/ I guess it depends on the type of user. |
Hmm, apparently my comment I wrote a while back (yesterday?) didn't stick.
I think so.
Shouldn't be a problem. We can ask the Issues API to only return (paginated) issues filtered by a single label.
Would be a cool experiment. I considered this a few months back, https://github.com/pamelafox/lscache |
OK, coming back to this after a week or travel and hacking on other things. Question for @calexity and @magsout: If you check out staging, when you load the page you get all open issues loaded into the issues view. If you click on a filter button (untriaged, ready for outreach, etc. buttons) it will re-render the issues view with those categories. How does the user get back to "all"? Should we click on the selected button to toggle it off and go back that way? Right now it only toggles if you click a different category. |
(note: untriaged doesn't work yet--need to hook that up via the search API tomorrow). |
Great question @miketaylr! It actually might make sense to have all the filters selected by default and then you would deselect any you didn't want to see. I was thinking you would just select (or click) View all open issues again and it would reset, but that might be more trouble than it's worth for a user. |
I like that suggestion. I think for now I'm going to add the "toggle" behavior, and we can tweak it after we launch. |
yes, I see it like that too |
Just deployed arbitary search over issues to http://staging.webcompat.com/issues Next up: sorting, etc. |
@miketaylr You think it is possible to automatically search after typing ~3 letters. And just as like to reset automatically when the inuput empty? |
@magsout I was thinking about that... it's also related to the question of needing a "search" button. Right now it just searches on "enter"/submit/whatever. I think it wouldn't be an issue for logged in users, but for anonymous people it will be too many requests for @webcompat-bot. The Search API rate limit is very limited (docs say 20 searches a minute, HTTP response says 30 a minute). Thinking out loud... would it be super terrible to disable search for non-logged in users and have a "Log in to search" placeholder? |
Ping @calexity for thoughts on previous comment about restricting search to logged in users. For comparison, we do require users to log in to set labels or comment on and close issues. |
I'd rather have search open but if it's going to cause an issue with Also, I forgot to call out that I used "Reported Bugs" because we use the
|
Thanks for the feedback Alexa. The other option is to just be smart about rate limits and show a message if we do run into them saying "hang on for N seconds before searching again." Or something. :) We might ship the first version requiring login, then work our way up to it, depending on how much effort it would be (I think @karlcow put in most of the plumbing for that already). |
Excellent - a limit would be a solid solution. A regular user (not a bot) On Fri, Oct 24, 2014 at 1:09 PM, Mike Taylor [email protected]
|
This will allow us to traverse pagination.
Related ticket: #309 |
We're pulling the page number out for next, prev, and last relations to be used by the View for requesting the correct set of issues for pagination.
some extra comments). I expect this to be rewritten pretty soon--it will probably need to change once we add the extra complexity of sorting.
This breaks pagination for some reason I don't understand yet. But we're doing conditional requests now so it should probably be OK.
Need to investigate: 27482c7#commitcomment-8359530 |
Oh, maybe https://twitter.com/githubstatus/status/527583627123912704.
Just don't tell @karlcow. ^_^ |
Before assumed some other kind of param (hence &), but it can also just be ?page.
Nope, just me writing bugs. Fixed now. |
This could happen after clicking a filter again, to untoggle it.
Also get rid of a lot of the stringy formatting stuff here and just pass along params as a dict.
(not very elegant, but it gets the job done for now)
OK, #312 is out the door. Will file smaller bugs to track enabling the rest of the features. We should probably figure out our milestone process--seems like it would be useful to help us ship the rest of this feature. |
yes.. agree |
I've created a Milestone "Ship full issues page" to track the smaller parts. |
But let's close this issue. The milestone will serve as the "meta". |
Essentially the Flask/Backbone guts of whatever gets designed in #169
pull in "team"Figure out best way to work with "Team" metadata for issue on issue list #288make filter dropdown interactivemake filter dropdown update search querymake clicking filter button update search querymake sort dropdown update search queryLink
header with XHR responsesrel=next
,rel=previous
, etc. from clientThe text was updated successfully, but these errors were encountered: