p5.js
p5.js copied to clipboard
Versioning info on API docs
Versioning info on reference pages
I think it would be useful to have a minimum version note on each API doc (each method/constant/class page on p5js.org/reference)
The only problem with this that I can see is that it might not be worth the work to go document it all. Its pretty easy to just tell people to use a cdn script tag with the latest version, and if the versions had to be figured out manually that could be a lot of work.
But there's a lot I don't know, so I'm opening this discussion!
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
Hi @apc518, I do see versioning info on some JS libraries and frameworks but in the case of p5.js I'm trying to think of a use case for it.
For the most part the API of p5.js is very stable with not very complex code from early releases of p5.js will still likely work without modifications with the latest version, and even in the case that it doesn't I figure it will be faster to make some updates to the code instead of trying to track down the precise maximum version of p5.js that will work with it, exception being the case where the code for some reason couldn't be modified but the version of p5.js used could be but I feel that's a niche scenario.
Maybe for future releases everything can be tagged something like "available since 1.4.2" and we don't dig through the full history for a precise version number a particular method started from, but I also don't know of a particular use case for this.
If you have a particular use case for this feature, please do share! Thanks.
The specific issue I ran into that made me think about this was the function isLooping. I had an older version of p5 where that function didn't exist, so I was getting a reference error but was confused since other p5 functions were working fine and the docs said that isLooping was a function
In this case, would having access to versioned API documentation be better (as in documentation for 1.3.0, 1.4.0, 1.4.1 etc)? Since you would need to know your issue stem from having an older version of p5.js anyway, you can continue to work against a whole documentation generated from the version you are using instead of mentally parsing version number each time you look up a function.
That sounds functionally the same, yea. Because if the api documentation was versioned like that, then I would see that I'm on the "version x.x.x" docs when I find a page for a function anyway
Yes it would be more or less the same functionally but much much easier to implement. Though that being said it would probably still take some development time to do.