-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add paging and archive/private repository filtering to dashboard list #11321
Add paging and archive/private repository filtering to dashboard list #11321
Conversation
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
// We should be able to see all non-private repositories that | ||
// isn't in a private or limited organisation. | ||
cond = cond.And( | ||
builder.Eq{"is_private": false}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should cache this kind of flag in the repo itself at some future time. These queries are impossible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah they're too expensive and fiddly.
It's so error prone.
Really we just need your accessibility table...
Should we have an |
that's what the indeterminate state does. The filters will iterate between Indeterminate for both, unchecked for No private/archived, checked for only private/archived. Unfortunately the screenshot has the tooltip for the filter button displayed - if you mouseover the checkbox/label you'll get a tooltip for the checkbox which states "Both archived and unarchived" and similar for private. It's difficult because there's still no really sensible tri-state for html and two checkboxes would be even more confusing. |
Since this won't remember settings across page refresh I think having the archive option unchecked would be a better default option. If not, you'd have to remember to click it each time to filter archived repos and I bet most people would rather archived repos not shown by default if they can't set their own preferences. Would that seem reasonable? |
I didn't want to break existing behaviour - it would be a breaking change to make that happen. I guess to handle persistence we could just start adding to the window url query component? done |
have not looked deeper int this but can we hide the pagination element when there is only one page? |
@6543 it already only appears if there is more than one page. |
Signed-off-by: Andrew Thornton <[email protected]>
OK @mrsdizzie it now updates the search params as you select things and change them. |
Codecov Report
@@ Coverage Diff @@
## master #11321 +/- ##
==========================================
+ Coverage 43.94% 43.95% +0.01%
==========================================
Files 614 614
Lines 87428 87483 +55
==========================================
+ Hits 38423 38456 +33
- Misses 44264 44289 +25
+ Partials 4741 4738 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeripath That change was not totally what I was talking about but is nice : )
Right now every time you leave the dashboard page and come back, the option to include archived repos is set to 'on' even if you previously checked it to off. So for the case of the linked issue, this doesn't necessarily hide them as you have to manually re-hide them each time you visit the dashboard page. I think having it unchecked by default would be a desirable default even if it changes how it works now. I feel its only half breaking because it isn't going to stop something that currently works just by upgrading, it just moves the task of clicking the archive button to people who want to show and search archived repos which I imagine is a smaller subset of users (perhaps im wrong though).
just a small preference anyway, lgtm : )
@mrsdizzie oh I see!! I think we could do more about saving options in general. I'll have a think |
It would make more sense to make this an account option. So that the hiding of the archived projects could take place at a more global level. For example, if I have the option set to hide archived repos, and I go to explore an org that has several archived repos, I will not see them. Just a thought. But thanks for this feature! |
Why don't we open an issue, or better a pr to set it as unarchived as default so we can change it for 1.12... |
@bkraul @mrsdizzie see #11440 |
@zeripath From what I can see it still applies only to the dashboard, and not to the explorer. |
OK sorry I missed that - that'll be have to be another PR. Please open an issue. |
…go-gitea#11321) * Add archived options to SearchRepository Signed-off-by: Andrew Thornton <[email protected]> * Add only-private search Signed-off-by: Andrew Thornton <[email protected]> * Add filter options and paging to dashboard repository page Signed-off-by: Andrew Thornton <[email protected]> * swagger generate Signed-off-by: Andrew Thornton <[email protected]> * fix-swagger-again Signed-off-by: Andrew Thornton <[email protected]> * as per @mrsdizzie also remember state Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]>
Add paging to the dashboard repository list and additional filters for archived and private repositories.
Also fixes the tooltips and dropdowns from within the vue application.
Also updates the url as you change things so that on window reload you restore state.
Fix #11268
Closes #10674