openzeppelin-contracts-upgradeable icon indicating copy to clipboard operation
openzeppelin-contracts-upgradeable copied to clipboard

Improve Contracts API docs to function as Upgradeable docs too

Open frangio opened this issue 5 years ago • 2 comments

The API docs for Contracts need some changes to make it clear that they are also the API docs for Contracts Upgradeable.

It's only two things that are different: the contract names (that have an added suffix), and the initializer functions.

For initializer functions we could edit the title of the constructor entry so that it also appears as the entry for the initializer function. (This can be easily implemented using the docgen template.) A mockup:

image

image

We need to figure out how to include this information without making noise for users who are only interested in the non-upgradeable variant of Contracts or vice versa.

frangio avatar Nov 24 '20 20:11 frangio

We could have the Upgradeable version after each contract (perhaps minimized)? Alternatively we have an API Upgradeable section?

abcoathup avatar Nov 26 '20 05:11 abcoathup

Well everything is the same except for the constructor so I don't think we need to duplicate. Just make sure the normal API docs are also usable when using the upgradeable version.

frangio avatar Nov 26 '20 15:11 frangio