Skip to content
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

ui: add more message on sidebar menus #10872

Merged
merged 5 commits into from
Apr 4, 2020

Conversation

a1012112796
Copy link
Member

@a1012112796 a1012112796 commented Mar 29, 2020

  • add a title on the menus
  • show some message instead of hide choose bar when have nothing to choose
  • add a simply filter for each menus
  • do same changes in mew_form.tmpl
  • remove some unusefull comments in mew_form.tmpl

screenshots:
jt1


jt1


jt2


jt3


jt4

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 29, 2020
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from comment re: nothing to show looks good

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 29, 2020
@guillep2k guillep2k added the topic/ui Change the appearance of the Gitea UI label Mar 29, 2020
@guillep2k guillep2k added this to the 1.12.0 milestone Mar 29, 2020
@@ -434,6 +434,8 @@ func CompareDiff(ctx *context.Context) {
setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates)
renderAttachmentSettings(ctx)

ctx.Data["IsIssueWriter"] = ctx.Repo.CanWrite(models.UnitTypePullRequests)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rename it as IsPullRequestWriter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, your suggestion is reasonable, but maybe not necessary, the main problem is that the new issue and new Pull Request use same tmpl new_form.tmpl, If change it , the tmpl will become complex. then we have think of Pull Request as issue in many place , so it's not a big problem. Thanks.

https://github.com/a1012112796/gitea/blob/61ceed7442b15b1c63d1cddb83ba706cb498337a/templates/repo/diff/compare.tmpl#L77-L79

https://github.com/a1012112796/gitea/blob/61ceed7442b15b1c63d1cddb83ba706cb498337a/templates/repo/issue/new.tmpl#L8-L10

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be ctx.Data["HasWritePermissions"] too which I think is more clear

IsIssueWriter or IsPullRequesttWriter makes it sound like that user wrote/authored the issue or pull request when really we are just checking if they have write permissions)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be ctx.Data["HasWritePermissions"] too which I think is more clear

IsIssueWriter or IsPullRequesttWriter makes it sound like that user wrote/authored the issue or pull request when really we are just checking if they have write permissions)

that's great but maybe not accurate enough, how about HasIssuesOrPullsWritePermission?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that would work fine too I think

@a1012112796 a1012112796 force-pushed the sidebar_ui branch 2 times, most recently from 6f9947e to 525b123 Compare April 2, 2020 00:48
* add title on the menus
* show some message instead of hide choose bar when have nothing to choose
* add simply filter for each menus
* do same changes in mew_form.tmpl
* remove some unusefull comments in mew_form.tmpl

Signed-off-by: a1012112796 <[email protected]>
@a1012112796
Copy link
Member Author

Hello, How about this change, looking forward for response ...
Thanks

{{if or .Labels .OrgLabels}}
<div class="ui icon search input">
<i class="search icon"></i>
<input type="text" placeholder="...">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should all be translatable strings that say "Filter Label", "Filter Milestone" etc..

@mrsdizzie
Copy link
Member

Other than that looks great to me ty <3

@a1012112796
Copy link
Member Author

Other than that looks great to me ty <3

Hello, I'm sorry, but I can't understand your meaning, Could you please explain it in detail? Thanks.

@mrsdizzie
Copy link
Member

Hello, I'm sorry, but I can't understand your meaning, Could you please explain it in detail? Thanks.

I mean aside from my request to add translated strings to the place holder values the PR looks good and I would approve once those changes are made.

* add filter message  on sidebar filter
* change IsIssueWriter to HasIssuesOrPullsWritePermission
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 3, 2020
@codecov-io
Copy link

Codecov Report

Merging #10872 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10872      +/-   ##
==========================================
+ Coverage   43.61%   43.62%   +0.01%     
==========================================
  Files         597      597              
  Lines       83919    83923       +4     
==========================================
+ Hits        36600    36615      +15     
+ Misses      42808    42798      -10     
+ Partials     4511     4510       -1     
Impacted Files Coverage Δ
routers/repo/compare.go 41.07% <100.00%> (+0.26%) ⬆️
routers/repo/issue.go 37.72% <100.00%> (+0.08%) ⬆️
routers/repo/pull.go 34.43% <100.00%> (ø)
modules/git/command.go 86.95% <0.00%> (-2.61%) ⬇️
modules/log/file.go 75.52% <0.00%> (-2.10%) ⬇️
models/repo_list.go 76.51% <0.00%> (-0.81%) ⬇️
services/pull/check.go 50.00% <0.00%> (-0.61%) ⬇️
modules/git/repo.go 48.11% <0.00%> (+0.83%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.76% <0.00%> (+1.92%) ⬆️
modules/queue/workerpool.go 60.14% <0.00%> (+3.20%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f63f28...44da382. Read the comment docs.

@guillep2k guillep2k merged commit 14c97c0 into go-gitea:master Apr 4, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants