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

Plant anchors for hunks to create links in doc preview changes #36742

Merged
merged 16 commits into from
Dec 10, 2023

Conversation

kwankyu
Copy link
Collaborator

@kwankyu kwankyu commented Nov 21, 2023

The "changes" page of the doc preview of a PR lacks links to the actual changed parts of the doc preview. We plant invisible anchors for each hunk of the diffs and use them to create links to the changed parts. A sample page is

https://deploy-preview-36742--sagemath-tobias.netlify.app/changes

Wishlist item: In the diffsite comparison view, the left pane showing the doc preview is scrolled to the changed part while the right pane showing the base doc does not. It would be nice if the right pane shows the corresponding part. But this cannot be implemented now because the base doc cannot be altered for specific doc preview for a PR.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@kwankyu kwankyu changed the title Plant anchors for hunks Plant anchors for hunks to create links in doc preview changes Nov 21, 2023
@mkoeppe
Copy link
Member

mkoeppe commented Nov 24, 2023

At some point it may be a good idea to split out this diff script to a separate file (perhaps in .ci/) so that it can be run and tested outside of the GH Actions workflow

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 24, 2023

At some point it may be a good idea to split out this diff script to a separate file (perhaps in .ci/) so that it can be run and tested outside of the GH Actions workflow

Done. Thanks for the idea.

.ci/create-changes-html.sh Outdated Show resolved Hide resolved
Copy link

Documentation preview for this PR (built with commit 7b0c670; changes) is ready! 🎉

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 26, 2023

python3 works.

Copy link
Member

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

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

LGTM!

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 26, 2023

Thanks a lot!

@vbraun vbraun merged commit 46b03d5 into sagemath:develop Dec 10, 2023
20 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants