[Docs] Added demos and snack for the documentation #3126
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
This PR introduces adding and separating files of the Usage part of the documentation for each UI component. This including adding Snack for showing the demo of the components and separating the Usage part from the main Markdown file such that when the docs would be generated the dynamic stuff would be in the main file and static/manual maintenance of the Usage will be done through changing those files in the
demos
folder.The usage is equivalent to the demos, and file description therefore I have kept the name of the folder as
usage
.Did you add tests for your changes?
Not required.
If relevant, did you update the documentation?
Yes, the documentation is working and running well, after I added the changes.
Summary
The folder structure for the components are as follows:
Note: The usage file will import the Snack file from the folder Snack which in turn will be used in the Main Markdown file of the component.
Some components for which the snack doesn't come up well due to restrictions in the web version are:
The above components show up well on Android/iOS versions.
I have included demo of all the UI components which would be mapped to individual components when auto-gen would be working because at that time we would be having separate markdown files for every other UI component.
An excerpt could be assumed by looking at separate folders of demo for:
I also believe there is a lot of scope of improvements in the documentation of the usage part and we can make it better but this can be taken as the first version of the change. This PR aligns with the previous version of the documentation just the structure is improved and Snack are been added. I plan to make further improvements once the scripts and other stuff of Auto-docgen idea is complete.
Does this PR introduce a breaking change?
No, this only improves the docs maintenance process and will be helpful while generating auto-gen as the Main Markdown file would be clean.
Other information
Not required.
Tags
#gsoc #docs-autogen #khushal87