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 Private persistent #492

Open
tristanlatr opened this issue Feb 12, 2022 · 4 comments
Open

Make Show Private persistent #492

tristanlatr opened this issue Feb 12, 2022 · 4 comments

Comments

@tristanlatr
Copy link
Contributor

I think when users are showing the private API, it should persist across all pages. To do this we can use cookie, like I did to show/hide the sidebar: https://github.com/twisted/pydoctor/blob/b957492b0eef69f7fce1e6f0b362137f478f1e1b/pydoctor/themes/base/sidebartoggle.js

The question is: what should be the cookie time to to live value? 24h looks fine to me.

@not-my-profile
Copy link
Contributor

I don't think that this is a good idea because users might enable it, forget about it and then use private APIs without realizing it.

Furthermore I firmly believe that sending somebody else the URL should show them the exact same page ... always. No matter who has which cookies.

@tristanlatr
Copy link
Contributor Author

Re-clicking on show private on every page is just not possible. Especially if a lot of stuff is markqued as private be cause we defer the privacy handling to official Sphinx docs.

@not-my-profile
Copy link
Contributor

Yes ... my point is that you shouldn't be using private APIs. If an API ought to be public, it ought to be documented in Sphinx for projects that use Sphinx. So imho the proper fix is to send a PR to add the missing documentation instead of making it easier to lookup private APIs.

@tristanlatr
Copy link
Contributor Author

Ok, i get your point. Know that it’s been a long time that I what’s this feature to be implemented. It’s not only because of pydoc.dev. But I would be much easier to navigate the docs with this feature. Sending PR to all project covered by pydoc.dev seems impossible.

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

No branches or pull requests

2 participants