site icon indicating copy to clipboard operation
site copied to clipboard

docs: Add support for constructor options

Open asantos00 opened this issue 5 years ago • 5 comments

Adds support for constructor options so stuff like the following is possible when you add documentation for constructor parameters.

image

asantos00 avatar Jan 07 '20 02:01 asantos00

@samselikoff would love to have your view on this. Since it was you designing the website. This kinda "breaks" the convention as it is using the same styles you created for Fields as "constructor options".

It also adds some "noise" to the sidebar as it describes all the options.

WDYT?

asantos00 avatar Jan 10 '20 15:01 asantos00

sorry for sleeping on this!

I'm not seeing the new UI on the netlify deploy, any idea why?

We definitely need to add these options + this might be the best way for now. I have some ideas for updating the docs, removing the right-hand nav and making the left-hand nav bigger + nested/collapsible. I think that would help.

samselikoff avatar Jan 27 '20 15:01 samselikoff

Yes, you're not seeing it because the PR that adds those options to the miragejs code itself is not merged yet. And this is generating the types based on that.

Would love to have your review there https://github.com/miragejs/miragejs/pull/268

asantos00 avatar Jan 27 '20 15:01 asantos00

I think this is worth merging now. Thoughts?

(If we're all in agreement on the UI I can make sure the docs are using the latest version of mirage so this PR gets published to the site)

ryanto avatar Feb 05 '20 22:02 ryanto

I think it is, yes. It will help answering some questions while we don't have the full docs generated by TS

asantos00 avatar Feb 06 '20 10:02 asantos00