Sorting through APIs using visibility
See original GitHub issueI’ve been helping out on the docs website for ember-animated
and we’ve ran into a use-case where we would like to enable the users to only see public APIs starting off and give them the opportunity to venture off into private / deprecated APIs later on when they really need to — in order to not overwhelm them starting off.
Here’s what I cobbled up as a POC – as you’ll see it’s heavily inspired by the Ember docs.
Sam mentioned a re-design of the docs website so I’ll hold out on this, but I’d be happy to help it come to life when the time comes.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Sort, Filter, and Remap API Data in Python
Filters pair well with sorting. They allow you to reduce a list down to only the entries that matter for your needs. There...
Read more >Visibility | Temporal Documentation
Advanced Visibility, within the Temporal Platform, is the subsystem and APIs that enable the listing, filtering, and sorting of Workflow Executions through ......
Read more >Getting Started with the Page Visibility API
In this tutorial, we will cover the basics of the Page visibility API by building a simple web page utilizing the HTML5 video...
Read more >Mastering API Visibility in Kotlin - zsmb.co
A great way to force yourself to think more about visibility is the Explicit API mode introduced recently in Kotlin 1.4.
Read more >API Discovery and Profiling -- Visibility to Protection
Visibility is the first step · Total requests since the API was first discovered, in the past 24 hours, and trending over time...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So touching back on this, I’m thinking we should add a cog style dropdown like @knownasilya suggested in the sidebar near the API Documentation header, with two options for now:
private
deprecated
I’m personally in favor of automatically marking
-private
folders as private, and not providing granularity outside of that. Deprecation will require actual tagging no matter what, but at least this way we’re guiding users toward a more normalized structure. I’d also like to add adebug
flag in the future, targeting-debug
folders (which are commonly used for code which is stripped in production).I can see that point with the current state of things, but I think the downsides are really not as bad once we get true private fields and methods. Private things being private-but-documented currently leads to scope creep for “intimate APIs” - if people don’t know about them, they can’t use them 😛
I don’t think there’s a way to make anything a module exports truly private though, yet. This is why I would lean hard on “only things in
-private/
folders are marked private”, because then it really sends an unambiguously clear signal to users that this is private API and it may change/break at any time. That said, I definitely think it should be made configurable, and I’d be open to disallowing it entirely until we can figure out a way to make modules truly, fully private.