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

Add an "Edit this page" button #326

Open
2 tasks
choldgraf opened this issue Mar 9, 2024 · 7 comments
Open
2 tasks

Add an "Edit this page" button #326

choldgraf opened this issue Mar 9, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Contributor

choldgraf commented Mar 9, 2024

Context

When using MyST for knowledge repositories or documentation, it is useful to be able to quickly view the source files for the documentation, and to suggest an edit with as little friction as possible. Right now, doing so requires figuring out the github repository and the location of the source file manually.

Proposal

Add an "Edit this page" or "Suggest an edit" button that provides a link to "suggest an edit" in the version control system of choice for the MyST site.

Tasks and updates

@scottyhq
Copy link

scottyhq commented Nov 1, 2024

Just wanted to say this is one of my favorite features of jupyterbook! I regularly point it out during xarray tutorials (https://tutorial.xarray.dev/intro.html) and it's a wonderful way to get small contributions from the community like clarifying wording or fixing typos. So just wanted to add a +1 to make sure this is part of jupyterbook v2 :)

@choldgraf choldgraf moved this from Needs Prioritisation to Needed for stable release in Jupyter Book Priorities Jan 16, 2025
@mfisher87
Copy link

  • 💯 ;)

I think of this feature as critical for documentation sites where readers may not be comfortable with git or navigating the file structure, but may be able to offer considerable value by fixing a mistake or updating out-of-date information as they continue to use the docs years after they were written. The GitHub user experience for this has gotten REALLY good. I think about 2 years ago there was an overhaul... now, even if a fork needs to be created it's really close to seamless.

@rowanc1
Copy link
Member

rowanc1 commented Jan 16, 2025

@fwkoch is planning to tackle this in the next week!

@choldgraf
Copy link
Contributor Author

choldgraf commented Jan 17, 2025

@rowanc1 I'm curious what you think about using a similar UX for this that we have with launch buttons. AKA having a tabbed drop-down that you can use to bring up multiple types of editing environments (eg in case there are multiple ways a user might want to edit the page, like GitHub normal UI vs GitHub codespaces). Is that overkill?

@rowanc1
Copy link
Member

rowanc1 commented Jan 17, 2025

First cut I think we just stay simple and ensure we are tracking pages relative to the git route, then the theme can be in charge of the feature you are describing. The new development necessary for mystmd is to have the source directory and file information (currently it is relative to the myst.yml route).

Can always improve in the next iteration!

@choldgraf
Copy link
Contributor Author

That makes sense to me -

one thing that was always annoying with the sphinx stack was that some of the logic you'd want theme agnostic was wrapped up in the book theme only. For example, creating the link for binder in a reliable and accessible way, and then exposing that as a variable for any theme to use. In jb1 the binder logic was tied to the theme, so every other theme would have to implement it's own link generation logic

I'm not sure if that is too much on the theme side or not but just sharing the thought in case it is helpful

@choldgraf choldgraf moved this from Needed for stable release to In Progress in Jupyter Book Priorities Jan 22, 2025
@rowanc1
Copy link
Member

rowanc1 commented Jan 23, 2025

First part is completed here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

5 participants