-
Notifications
You must be signed in to change notification settings - Fork 49
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
private stuff should be private-er #49
Comments
|
(by mwhudson) The first should be easy (simple CSS tweak, he says confidently) Doesn't the third subsume the second? I think if grey stuff appears when you click "show maintainer only content", that's a lesson that will be learnt pretty quickly. The third part should be easy. I don't know if I want to write any raw js though, so I probably get to decide which js library to use first... People who use browsers without js are clearly not using the internet anyway, so I don't really care about them (maybe blind people get a pass?). |
|
(by glyph)
I tried hard not to make it 4 :). By all means feel free to split this up and subscribe me to all of them.
How hard could it be?
More specificity is probably good though. Keep in mind that public/private conventions are not terribly well-defined in the Python community (c.f. sys._getframe(), a public API if ever I saw one), and even less well-understood by Python newbies, but the PyDoctor-using community seems a bit more rigorous about it.
Can't you just use document.styleSheets to twiddle a single CSS rule to turn off display:none? I know that JS is inconsistent and stuff, and libraries are great, but really, this ought to be a one-liner...
Yeah I don't think I care much either. But, it might be nice if it didn't break for them, since the sort of people who try to browse without JS are exactly the sort of nerds who might want to read the twisted documentation. (I don't mind telling them that they need a user stylesheet though.) |
|
I think this issue can be closed. Some users might want to display everything tho, so maybe an option to make everything public make sens. |
|
The original ticket asked for both a public/private toggle and for a way to see what is private when everything is visible. We have the former, but not the latter. Do we want the latter as well? For users that want to see everything, maybe we can add an argument to the URL's query? That would allow linking to the "show private definitions" version. |
|
I think that the current implementation is good enough. If this is still an issue this can be reopened or create a new issue. |
|
We actually do have a way to see what is private when "show private API" is enabled: the background for the private names is gray. I think I'd prefer something orthogonal to our usual colors that indicate methods, attributes etc., but it satisfies the request from this issue. The query argument was added in #351. I'll close this now. If there are more wishes, please create a new ticket for each of them. |
There is some visible indication that _-prefixed names are private when looking at the index, but when looking at the documentation for individual methods or functions, the text is on the same blue background.
Better would be a consistent style that always showed private stuff, in any context, as grey-on-grey so it's clear.
Also, the grey-on-grey doesn't ever have a textual explanation. There should be some text saying "This method is for maintainers only" and a link to a page that explains what it means to call a private method.
Finally, private methods should all be hidden by default, and shown via a "show private methods and bases" button (assuming the browser has JavaScript).
Imported from Launchpad using lp2gh.
The text was updated successfully, but these errors were encountered: