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

Docs: split API into Operations and Functions list #613

Closed
wants to merge 2 commits into from

Conversation

josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Jun 7, 2024

Summary

This PR changes the docs template so that Operations and Functions feature in two different lists.

This helps make it clear what is an Operation and what is a Plain Old Function

Details

As a bonus fix, indenting on the right hand contents menu has been fixed.

These changes do not affect the adaptor JSdoc at all. It just works out of the box.

Screenshots from a first pass:

image
image
image

Issues

Closes OpenFn/docs#439

Related to #522

Further work

  • Add an @operation jsdoc tag, which marks the doclet public and is used to recognise operations
  • The Operations list doesn't show signatures
  • Put the operation/function summary contents into a table with two columns, so you can see both. Maybe just on desktop windows?
  • Don't show the return type in an Operation signature
  • I think the Operation keyword should feature somewhere in each Operation, like a badge. Clicking it would take you to our best explanation of what an Operation is
  • Improve the summary docs at the top of the Operations and Functions sections (include links)

@josephjclark josephjclark changed the base branch from main to docs-devx2 June 12, 2024 11:05
Base automatically changed from docs-devx2 to main June 12, 2024 11:50
@josephjclark
Copy link
Collaborator Author

I wonder how the common API fits into this.

I don't want 4 lists - adaptor operations, adaptor functions, common functions, common operations. That's chaos.

We can't "merge" operations and functions from common, because it's confusing.

So maybe we list everything in one list, and perhaps add a* if it comes from common?

@josephjclark
Copy link
Collaborator Author

One of the things with the common API is that, because it's the same for all adaptors, once you know the main common functions, they just sort of get in the way.

So yes, you want to see that the common functions are there. And its critical for new users. But I do think they're second class citizens, or there should be the option to hide them, or something.

@josephjclark
Copy link
Collaborator Author

I wonder if just adding a tag for Operations is a better way to go here. That still leaves namespaces to work out though...

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

Successfully merging this pull request may close these issues.

Make it clear whether a function is an Operation or just a Function
1 participant