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

Re-enable listing of forks when logged out #14992

Merged
merged 2 commits into from Mar 14, 2021

Conversation

CL-Jeremy
Copy link
Contributor

This PR addresses point 1 of #14926 further by further aligning the look-and-feel of the fork button to that of the other buttons.

When hovering above the fork button, a guest user will still be prompted to log in, but no action is performed on mouse click, exactly like the other two buttons. The user will still be able to list forks when logged out.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 14, 2021
@CL-Jeremy
Copy link
Contributor Author

CanSignedUserFork gives false when User is nil, so the or clause is redundant. The naming of the property confused me a little.

@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 Mar 14, 2021
@CL-Jeremy CL-Jeremy marked this pull request as draft March 14, 2021 13:08
@CL-Jeremy CL-Jeremy marked this pull request as ready for review March 14, 2021 13:29
@CL-Jeremy CL-Jeremy requested review from zeripath and 6543 March 14, 2021 13:29
@codecov-io
Copy link

Codecov Report

Merging #14992 (26d5028) into master (487f2ee) will increase coverage by 0.04%.
The diff coverage is 40.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14992      +/-   ##
==========================================
+ Coverage   42.21%   42.25%   +0.04%     
==========================================
  Files         767      774       +7     
  Lines       81624    82994    +1370     
==========================================
+ Hits        34458    35073     +615     
- Misses      41531    42224     +693     
- Partials     5635     5697      +62     
Impacted Files Coverage Δ
cmd/dump.go 0.93% <0.00%> (-0.01%) ⬇️
cmd/serv.go 2.61% <0.00%> (-0.02%) ⬇️
cmd/web.go 0.00% <0.00%> (ø)
cmd/web_graceful.go 0.00% <0.00%> (ø)
cmd/web_letsencrypt.go 0.00% <0.00%> (ø)
models/action.go 48.52% <0.00%> (-2.42%) ⬇️
models/migrations/migrations.go 2.59% <ø> (ø)
models/migrations/v130.go 0.00% <0.00%> (ø)
models/migrations/v166.go 0.00% <0.00%> (ø)
models/migrations/v172.go 0.00% <0.00%> (ø)
... and 190 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 f5aaa74...9a623e5. Read the comment docs.

@CL-Jeremy
Copy link
Contributor Author

The second commit is admittedly a bit hacky, for enabling cursor events from outside (div.labeled.button) while disabling from inside (button/a.basic.button, the former is done by Semantic UI).

This revision would ensure that:

  • pop-ups always come from outer element
  • disabled elements show an arrow as cursor
  • disabled elements do not react to mouse events (previously, a disabled .labeled.button > .button reacts to double-click and the inner text gets selected - very fine detail, but annoyed me a bit)
  • a non-reactive button is always disabled (wasn't the case when logged in and unforkable, i. e. own repo)

I personally find the low opacity a bit intimidating, but probably that's just me.

@6543 6543 added the topic/ui Change the appearance of the Gitea UI label Mar 14, 2021
@6543 6543 added this to the 1.14.0 milestone Mar 14, 2021
@zeripath zeripath merged commit 9566c9f into go-gitea:master Mar 14, 2021
@CL-Jeremy CL-Jeremy deleted the fix-fork-button-logged-out branch March 14, 2021 15:04
@noerw noerw added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 18, 2021
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants