-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix and improve dashboard repo UI #2285
Conversation
@lunny I think it does not fixes nor replaces your mentioned issue/PR it just improves Dashboard UI |
What do you think about Vue components? I've created |
public/js/index.js
Outdated
$.getJSON(this.searchURL(), function(result) { | ||
self.repos = result.data; | ||
this.isLoading = true; | ||
let searchedQuery = this.searchQuery; |
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.
let
-> var
to not break on older browsers, since this is not being preprocessed.
LGTM |
Changed to Vue component. What about full client rendering of component? That means no mirrors or organizations rendering on server, remains only localization. Next posible upgrades (of this PR):
Edit: Changes will be added in future PR(s), not this one. |
@Morlinest I think these changes should be made in future PRs. We prefer small PRs when possible. |
@andreynering OK, I'll create new branch(es) and send new PR(s) :) |
@lunny @andreynering Should not be "mirror" tab removed? I've just created mirror and they are also shown in "My Repositories" tab. I can only add new filter. Or you want to have them on both tabs ( |
@Morlinest I agree to add a mirrors filter and remove the tab mirror. @andreynering any idea? |
@lunny @Morlinest 👍 I agree with that. |
@lunny @andreynering Great, it is done (few hours ago :D, will update PR tomorrow). But this creates new question :). Now there is only 1 or 2 tabs (1 for "org user", 2 for "normal user"). What about this? I see two options:
|
faa3875
to
9e7f761
Compare
At first I want to thank you all for you hard and great work! In my opinion the tab panel for the org user is redundant and should be removed. |
@daviian Thanks (from all). I agree with you that solo tab panel for "org user" is redundant. Another question is, what to for "normal user" page - show 2 tabs or show 2 panels (one above other). |
@Morlinest I think there should be 2 panels. The collaborative repositories panel is gone. So why not use this freed space. And because of the pagination in the repositories panel they shouldn't take too much vertical space anyway. |
OK, I've done some practical tests... If you have only few orgs, its no problem to have 2 panels visible at the same time. But if you have for example 20 orgs, there is not enough space on screen to show both panels without scrolling... Also orgs does not have any pagination, so everythink is shown in one list. I wanted to use 2 panels at first, but now I think "two tabs" for "normal user" and "no tab" for "org user" will fit best. Also i want to add some kind of settings later to give user option to increase/decrease pagination limit (REST api for "repo/search" has limit of min 10 and max 50 records). @lunny @andreynering Any idea? |
@Morlinest I thought about it and why not use something like accordions? So if a user clicks on My Organizations the repository panel is collapsing and vice versa. |
@Morlinest I don't like @daviian 's idea. Because I have hundreds of repositories and twenties of orgnizations on one of my Gitea instance. I think keep two tab is better. |
@Morlinest A problem is you should put |
@Morlinest maybe you can add |
@lunny If you mean "add to docs", sure I can. As feature, has to be in this PR, because it is the only (fastest) way I know how many repos user has. |
templates/vue/repo-search.tmpl
Outdated
@@ -0,0 +1,81 @@ | |||
<script type="text/x-template" id="repo-search-template"> |
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.
I don't think the file should be in templates/vue
dir. We classify the templates according features not the front-end framework it used.
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.
Where should I put it then? It's here for 2 (temporary) reasons:
- There are part rendered by server
- You can include it on any page as template for component (can't be included in js for reason 1)
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.
Or you want me just to rename the folder like templates/components
?
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.
Just put it in user/dashboard/
? an other page reference it?
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.
Not now, but can be referenced later. I just wanted to make it more universal.
068fbcf
to
569b1bf
Compare
Rebased on master and changed |
Missing key that is used in #2285
Missing key that is used in #2285
This change broke Go 1.7 support, please make sure #2331 is fixed before 1.2.0 is closed |
This commit contains one fix and few UI improvements:
X-Total-Count
All
,Sources
,Forks
andCollaborative
_search_limit
, filled by server)Screenshots and animated gifs are in #2278 (scroll down; showing max 10 repos, this commit version is with default filled by server = 15).
First time working with Vue + new to Semantic UI so any advice is welcome.