Skip to content

Fix footnote jump behavior on the issue page. #34621

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

Merged
merged 8 commits into from
Jun 9, 2025

Conversation

charles7668
Copy link
Contributor

@charles7668 charles7668 commented Jun 6, 2025

Close #34511
Close #34590

Add comment ID to the footnote item's id attribute to ensure uniqueness.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 6, 2025
@charles7668 charles7668 marked this pull request as draft June 6, 2025 15:29
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jun 6, 2025
@charles7668 charles7668 force-pushed the fix/issue_footnote branch from 11b5171 to a322a88 Compare June 6, 2025 15:43
@charles7668 charles7668 marked this pull request as ready for review June 6, 2025 16:16
@lunny
Copy link
Member

lunny commented Jun 6, 2025

It's better to have a test.

@charles7668 charles7668 marked this pull request as draft June 6, 2025 17:12
@lunny
Copy link
Member

lunny commented Jun 6, 2025

Related to #34590

@charles7668 charles7668 force-pushed the fix/issue_footnote branch from a322a88 to 98eb32c Compare June 7, 2025 02:11
@charles7668 charles7668 force-pushed the fix/issue_footnote branch 2 times, most recently from 1c232e4 to ff9efed Compare June 7, 2025 02:40
@charles7668 charles7668 marked this pull request as ready for review June 7, 2025 03:40
@charles7668 charles7668 requested a review from lunny June 7, 2025 03:40
@charles7668 charles7668 force-pushed the fix/issue_footnote branch from ff9efed to f8de6b0 Compare June 9, 2025 01:02
@lunny lunny added type/bug backport/v1.24 This PR should be backported to Gitea 1.24 labels Jun 9, 2025
lunny
lunny previously approved these changes Jun 9, 2025
@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 Jun 9, 2025
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 9, 2025

I think we should do it directly here, instead of the extra post-processing, and remove the "fnref:" prefix (just like GitHub):

image

@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 9, 2025
@wxiaoguang
Copy link
Contributor

I think we should do it directly here, instead of the extra post-processing, and remove the "fnref:" prefix (just like GitHub):

To make backport easier, maybe we can use this approach temporarily, will make some new changes.

@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 Jun 9, 2025
@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 Jun 9, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 9, 2025
@lunny lunny enabled auto-merge (squash) June 9, 2025 16:52
@lunny lunny merged commit c6b2cbd into go-gitea:main Jun 9, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.25.0 milestone Jun 9, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 9, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jun 9, 2025
Close go-gitea#34511 
Close go-gitea#34590 

Add comment ID to the footnote item's id attribute to ensure uniqueness.

---------

Co-authored-by: wxiaoguang <[email protected]>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation to footnote fragment throws JS error Footnote References Not Properly Scoped to Individual Comments
4 participants