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

Wrap around for previous/next review comment buttons #16319

Merged
merged 3 commits into from
Jul 1, 2021

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Jun 30, 2021

Fixes #16317

Wrap around from last to first comment when clicking "Next" on last comment.
Wrap around from first to last comment when clicking "Previous" on first comment.

Fixes go-gitea#16317

Wrap around from last to first comment when clicking "Next" on last comment.
Wrap around from first to last comment when clicking "Previous" on first comment.
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

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

👍 Also tried implementing it, had almost the exact same solution with the only difference being the ternary operator. The good thing is, now I don't even have to test whether mine is correct.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2021

Codecov Report

Merging #16319 (f5c5c61) into main (290f458) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16319      +/-   ##
==========================================
- Coverage   45.42%   45.41%   -0.01%     
==========================================
  Files         709      709              
  Lines       83611    83611              
==========================================
- Hits        37978    37970       -8     
- Misses      39545    39551       +6     
- Partials     6088     6090       +2     
Impacted Files Coverage Δ
services/pull/temp_repo.go 26.59% <0.00%> (-3.20%) ⬇️
services/pull/check.go 25.51% <0.00%> (-2.76%) ⬇️
services/pull/patch.go 54.23% <0.00%> (-1.70%) ⬇️
modules/queue/unique_queue_disk_channel.go 47.26% <0.00%> (-1.37%) ⬇️
services/pull/pull.go 41.99% <0.00%> (-0.44%) ⬇️
modules/queue/workerpool.go 54.96% <0.00%> (+1.14%) ⬆️
modules/util/timer.go 85.71% <0.00%> (+42.85%) ⬆️

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 290f458...f5c5c61. Read the comment docs.

@6543 6543 added type/bug topic/ui Change the appearance of the Gitea UI labels Jul 1, 2021
@6543 6543 added this to the 1.15.0 milestone Jul 1, 2021
@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 Jul 1, 2021
@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 Jul 1, 2021
@6543 6543 merged commit a3476e5 into go-gitea:main Jul 1, 2021
@6543 6543 added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Jul 1, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Jul 31, 2021
There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time
a wiki page is created a 500 is reported because the `master` branch is
not in existence in that wiki yet.

This PR simply checks for this error and returns not found.

Fix go-gitea#16584

Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 pushed a commit that referenced this pull request Aug 1, 2021
* Fix 500 on first wiki page

There is a mistake in #16319 and #16487 which means that the first time
a wiki page is created a 500 is reported because the `master` branch is
not in existence in that wiki yet.

This PR simply checks for this error and returns not found.

Fix #16584

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this pull request Aug 1, 2021
Backport go-gitea#16586

There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time
a wiki page is created a 500 is reported because the `master` branch is
not in existence in that wiki yet.

This PR simply checks for this error and returns not found.

Fix go-gitea#16584

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this pull request Aug 3, 2021
Backport #16586

There is a mistake in #16319 and #16487 which means that the first time
a wiki page is created a 500 is reported because the `master` branch is
not in existence in that wiki yet.

This PR simply checks for this error and returns not found.

Fix #16584

Signed-off-by: Andrew Thornton <art27@cantab.net>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
Fixes go-gitea#16317

Wrap around from last to first comment when clicking "Next" on last comment.
Wrap around from first to last comment when clicking "Previous" on first comment.
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
* Fix 500 on first wiki page

There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time
a wiki page is created a 500 is reported because the `master` branch is
not in existence in that wiki yet.

This PR simply checks for this error and returns not found.

Fix go-gitea#16584

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 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 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let Previous/ Next Button Cycle When There is no Previous/ Next Comment
7 participants