-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
✨ Enhancement: DocsHelp component option to hide Edit This on GitHub #1099
Comments
@DarhkVoyd May I work on this issue |
@techmannih Thank you for your enthusiasm and for all the work you’re doing! I noticed you’re already working on a few issues. Would it be okay to prioritize completing the pending PRs and wrapping up any remaining issues you’ve started before we assign this new one to you? |
@DarhkVoyd can you please assign this to me? |
@arpitkuriyal Yes, please go ahead. |
@DarhkVoyd i have make a prop to hide the "edit this page in the github" . Can you tell me in which pages i should hide it and on which pages i should show it? |
@arpitkuriyal Good work on your progress. Let's not hide the entire section instead just hiding the button would be better. The default behavior for the |
@DarhkVoyd Okay okay I got it |
Is there not an option to specify the link in the button? It seems to me like the button is quite nice to have, and it would be better if we can just get it to point to the right file in GitHub depending on which page you're on. |
@gregsdennis Yes, there's a prop that allows specifying a custom redirect link in the DocsHelp component. However, based on the issue's requirements, it doesn't need to be included on the tooling page . please let me know if you have more suggestions. |
I'm suggesting the issue's requirements might be the wrong thing to do. This is merely a proposal. The issue is for discussion. Issues aren't just to-dos. @benjagm, please weigh in here. |
@DarhkVoyd the opening comment says "as discussed" but doesn't link to where anything was discussed. |
@gregsdennis sorry but i am just a beginner learning things i see this is a good first issue so i picked it. i didn't see that it is discuss or not or just a proposal to be discussed. |
Discussed here in slack. |
@gregsdennis The current behavior of the “Edit this page on GitHub” button is to navigate to the file that contains the page’s content. This is specified by a prop, which accepts the file type to construct the GitHub path. For instance, “_index” (referring to “_index.md”) or by default, it points to “index.page.tsx” for that path. However, for the “/tools” page, all the content is from a data file rather than a markdown file, so by default, it points to “index.page.tsx,” which primarily consists of the layout and logic. Currently, there’s no logic in place to use a custom link. |
@DarhkVoyd so now can i write test case for code that i added? |
Thanks, Benja. @DarhkVoyd I understood the problem. What I was missing was the context that provided the solution. Just looking at this issue, it seems like a decision was just made without discussion. Let's be sure to provide as much context as possible in the future, okay? |
Understood, I’ll make sure to include more context moving forward. Thanks for the feedback! |
Is your feature request related to a problem? Please describe
The pages using DocsHelp component, have a link "Edit this page on GitHub". In case of
/tools
it goes to https://github.com/json-schema-org/website/blob/main/pages/%2Ftools/index.page.tsx, which seems to just be the layout of the page, not the content itself. As discussed most of the time people would want to add or edit entries for their own tool.Describe the solution you'd like
We can add an option to feedback component (DocsHelp) to disable/hide the
Edit this page on GitHub
or an option to pass a custom link, in this case the tooling data.Describe alternatives you've considered
No response
Additional context
No response
Are you working on this?
No
The text was updated successfully, but these errors were encountered: