Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Added demos and snack for the documentation #3126

Merged

Conversation

khushal87
Copy link
Member

@khushal87 khushal87 commented Jul 3, 2021

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:

Suppose there is a components X
In the docs directory, under main, the X folder will have:
> main file 
> usage folder
	> x folder
		> snack
			> index.md
		> Usage file

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:

  • Bottom Sheet
  • Dialog
  • Overlay

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:

  • AirbnbRating
  • Rating

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

@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #3126 (8a45553) into next (01a56fb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #3126   +/-   ##
=======================================
  Coverage   83.85%   83.85%           
=======================================
  Files          78       78           
  Lines        1685     1685           
  Branches      670      664    -6     
=======================================
  Hits         1413     1413           
  Misses        268      268           
  Partials        4        4           
Impacted Files Coverage Δ
src/FAB/FAB.tsx 100.00% <0.00%> (ø)
src/Tab/Tab.tsx 94.44% <0.00%> (ø)
src/Chip/Chip.tsx 100.00% <0.00%> (ø)
src/Icon/Icon.tsx 97.61% <0.00%> (ø)
src/Text/Text.tsx 100.00% <0.00%> (ø)
src/Tile/Tile.tsx 100.00% <0.00%> (ø)
src/Badge/Badge.tsx 100.00% <0.00%> (ø)
src/Tab/TabItem.tsx 83.33% <0.00%> (ø)
src/Avatar/Avatar.tsx 100.00% <0.00%> (ø)
src/Button/Button.tsx 96.36% <0.00%> (ø)
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01a56fb...8a45553. Read the comment docs.

@flyingcircle flyingcircle merged commit d284fe1 into react-native-elements:next Jul 6, 2021
@khushal87 khushal87 deleted the khushal87-add-docs-demos branch August 14, 2021 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants