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

Make show source code feature be less visually intrusive (discreet) #525

Open
ssbarnea opened this issue Jan 27, 2023 · 2 comments
Open
Labels
feature New feature or request

Comments

@ssbarnea
Copy link
Contributor

Is your feature request related to a problem? Please describe.

While "show source" is an extremely useful feature, Is just that I wish it would be less-in-your-face. If we could make it more subtle, like as simple [src] dimmed text after the member/method name, something that would not take any horizontal space on the page it would be much better.

Look at screenshot below an count how much vertical space is consumed by "show source code".

Describe the solution you'd like

Find a way to display the "source" button in a way that does not take more vertical space.

Describe alternatives you've considered

Additional context

Initially reported on #35 (comment)

Any suggestion on how this should be showed is welcomed. Probably having an icon is also an less intrusive way but I still think that it should be somewhere near the title of the element for which we will display the source and not after its documentation.

@ssbarnea ssbarnea added the feature New feature or request label Jan 27, 2023
@pawamoy
Copy link
Member

pawamoy commented Jan 27, 2023

The source was initially displayed right after the name, but then the line numbers of the source were showing up in the search results. I think this search issue has been fixed since then, so we could move it back right after the name. I guess a collapsible element with a relative/float position would do the trick 🤔 I'm not good at CSS/webUIs though, so any help is welcome!

@kayjan
Copy link

kayjan commented Jan 28, 2024

I managed to accomplish this by adding this to my mkdocs.yml

plugins:
  - mkdocstrings:
      handlers:
          python:
            options:
              show_source: false

I got it from mkdocstrings documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants