slint icon indicating copy to clipboard operation
slint copied to clipboard

Include the C++ testing API in the C++ API docs

Open tronical opened this issue 1 year ago • 6 comments

tronical avatar Jun 13 '24 08:06 tronical

This adds the testing API, but the AccessibleRole is still not documented. It needs to go into a public header file, otherwise doxygen won't look at it. I think I'll try to hack it that it goes into slint::testing inside slint_enums.h.

tronical avatar Jun 13 '24 08:06 tronical

Should we wait until this is no longer experimental perhaps? Or is there a way to mark it as such?

ogoffart avatar Jun 13 '24 09:06 ogoffart

I don't have a strong opinion on this, but if we every want to ask folks for feedback on an API, I think it makes sense that they have API documentation to read to learn how to use it... (yes, we should also do that for slint-esp).

We could document that in the testing namespace, that it's experimental. Or have everything under slint::experimental:: (so slint::experimental::testing:...).

tronical avatar Jun 13 '24 09:06 tronical

Having it under slint::experimental:: is an option, but it is more complicated than just adding an #ifdef as then we will have to search and replace once we move it out of experimental

ogoffart avatar Jun 14 '24 10:06 ogoffart

Yep, I also don't like slint::experimental. Ok, I'll add a bit comment for the docs for the slint::testing namespace it's conditional - better than nothing IMO and good to have docs for this API (the doc building also helps us find issues).

tronical avatar Jun 14 '24 10:06 tronical

What do you think about this compromise?

(One caveat here is that while the AccessibleRole is now under slint::testing, it's not surrounded by #ifdefs, but maybe that's an acceptable corner?)

tronical avatar Jun 28 '24 13:06 tronical

Alternate idea: We include the docs for experimental APIs in the nightly docs, but not in the releases. What do you think?

tronical avatar Jul 11 '24 06:07 tronical

Alternate idea: We include the docs for experimental APIs in the nightly docs, but not in the releases. What do you think?

I like this idea very much!

(although that means that the snapshot is not an exact preview of the release, but that's fine)

ogoffart avatar Jul 11 '24 06:07 ogoffart