question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting through APIs using visibility

See original GitHub issue

I’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.

docs-visibility

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:open
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pzuraqcommented, Apr 7, 2018

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 a debug flag in the future, targeting -debug folders (which are commonly used for code which is stripped in production).

0reactions
pzuraqcommented, Apr 10, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found