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

New documentation site #32

Merged
merged 19 commits into from
Jan 5, 2022
Merged

Conversation

siddharthborderwala
Copy link
Contributor

@siddharthborderwala siddharthborderwala commented Nov 4, 2021

I have setup a documentation site for this library. I am using nextjs and nextra starter for creating a static documentation site.

The docs directory contains the next-js app, it uses yarn, keeping the package manager uniform.

Currently, I have only created 2 pages of documentation, you can have a look at it - https://teaful-docs.vercel.app/.

Let me know what you think @aralroca

@aralroca
Copy link
Collaborator

aralroca commented Nov 4, 2021

The idea is a good one. Thanks! What I would do would be to move all these sections of the README:

image

Once it's moved, I will simplify the README and put the badge and link to the documentation.

@siddharthborderwala
Copy link
Contributor Author

The glad you like the idea. Yes, I was thinking to do the same, move each section to the documentation site and then simplifying the README.md 💯

@danielart
Copy link
Collaborator

Hi! I think is a good move to put all the docs in a website. Do you know if you can put a version selector on docs? I mean, it could help in the future to document the versions of the library over the time.

Nice proposal Siddarth

@siddharthborderwala
Copy link
Contributor Author

Thank you @danielart! It would definitely be helpful to document versions of the library over time, for now I am focusing on the current version and but I will keep in mind how to implement versioning for this.

@danielart
Copy link
Collaborator

Great @siddharthborderwala ! and just give you more ideas, we talked with @aralroca could be interesting to have gtm tracking to see which pages are the most visited, to detect where community have more interest/doubts, and may be a vote component on some pages, just like nextjs have on his docs at the bottom on each page https://nextjs.org/docs. May we can help you with that. Thanks for your efforts 💪

@siddharthborderwala
Copy link
Contributor Author

siddharthborderwala commented Nov 4, 2021

That would be interesting, so voting with Google Tag Manager itself, right?

@danielart

@siddharthborderwala
Copy link
Contributor Author

I'd like to mention that as the number of features in this doc site increases, time taken for implementation will increase from my side, as I am a full-time university student 👨‍🎓

@aralroca
Copy link
Collaborator

aralroca commented Nov 4, 2021

@siddharthborderwala were ideas for the future. For this PR with what you are doing it is more than useful! Everything can be done in several iterations after merging this PR, we can contribute several in the documentation, no problem 😊

add Input Params and Return Value sub-heading
@shubhamV123
Copy link
Contributor

@danielart @aralroca I personally believe that we should avoid adding everything from scratch. @siddharthborderwala Has done the wonderful job in this part. Ideally we should go for more stable static site generator, which handle most of the things from out of the box for us. We should not spent more time adding things which are already done by other third party library. I would suggest to go for some static site generator like (docusaurus)[https://docusaurus.io]. It is doing already on behalf of us and it handle lot of cases automatically which we need not to worry. There community is quite good. If we want to customize everything via our own. Than its good idea to make everything from scratch than we can go with this.

For reference you can go to this: https://ydkjs.netlify.app
I created in free time, and its easy to setup. You can always check the source code.

Here is docusaurus showcase: https://docusaurus.io/showcase

I am open for feedback. Check and see if this can also work.

@danielart
Copy link
Collaborator

danielart commented Nov 11, 2021

@danielart @aralroca I personally believe that we should avoid adding everything from scratch. @siddharthborderwala Has done the wonderful job in this part. Ideally we should go for more stable static site generator, which handle most of the things from out of the box for us. We should not spent more time adding things which are already done by other third party library. I would suggest to go for some static site generator like (docusaurus)[https://docusaurus.io]. It is doing already on behalf of us and it handle lot of cases automatically which we need not to worry. There community is quite good. If we want to customize everything via our own. Than its good idea to make everything from scratch than we can go with this.

For reference you can go to this: https://ydkjs.netlify.app I created in free time, and its easy to setup. You can always check the source code.

Here is docusaurus showcase: https://docusaurus.io/showcase

I am open for feedback. Check and see if this can also work.

@shubhamV123 Looks good for me, we talked about some interesting features. I don't know docusaurus in deep, but do you know if allow to keep docs by library version? and could we add a widget to vote if a page is useful as nextjs do in their docs?

@shubhamV123
Copy link
Contributor

@danielart @aralroca I personally believe that we should avoid adding everything from scratch. @siddharthborderwala Has done the wonderful job in this part. Ideally we should go for more stable static site generator, which handle most of the things from out of the box for us. We should not spent more time adding things which are already done by other third party library. I would suggest to go for some static site generator like (docusaurus)[https://docusaurus.io]. It is doing already on behalf of us and it handle lot of cases automatically which we need not to worry. There community is quite good. If we want to customize everything via our own. Than its good idea to make everything from scratch than we can go with this.
For reference you can go to this: https://ydkjs.netlify.app I created in free time, and its easy to setup. You can always check the source code.
Here is docusaurus showcase: https://docusaurus.io/showcase
I am open for feedback. Check and see if this can also work.

@shubhamV123 Looks good for me, we talked about some interesting features. I don't know docusaurus in deep, but do you know if allow to keep docs by library version? and could we add a widget to vote if a page is useful as nextjs do in their docs?

@danielart
Yes. You can think same like nextjs. Its route depend on folder based. So if you put version folder. It would treated as route. This is in nutshell. I can do more research if required.

Q. Can we keep docs by library version?
A: Yes, I think this the best example you can see. Jest

Q. Could we add a widget to vote if a page is useful as nextjs do in their docs?
A: This I am not sure about. It works on React and mdx. So as long as you wrote component in react. You can import it at any Page. Maybe I understand wrong, can you explain more about the use case. How you want to use it?

@siddharthborderwala
Copy link
Contributor Author

My take @shubhamV123 @danielart @aralroca -

  1. Versioning can be done by creating folders thanks to filesystem based routing in nextjs.
  2. Voting widget can be created as a normal react component and we can import it in the mdx file and render it, may require some props for the information like the slug of the page, but that is simple to do.

@shubhamV123
Copy link
Contributor

One more thing I found out @siddharthborderwala . You are using nextra for markdown. Its not a production ready. They mentioned clearly on there doc :
Warning: this project is not production ready, API might change without notice.

So if you want to use it, use another mdx compiler like remark or something similar to that which is production ready

@siddharthborderwala
Copy link
Contributor Author

Nextra is a static-site generator, for e.g. like gatsby, and it uses mdxjs behind the scenes for parsing md and mdx files, which is battle-tested. So, nextra as a static-stire generator may change in the future, but the mdx related stuff will still be the same as it dependes on mdxjs.

@shubhamV123
Copy link
Contributor

Agree. But there must be reason that's why they clearly mentioned not ready for production . This might be an experimental project they are doing. There maybe a chance in later version they change it to totally different api and implementation. Its hard to maintain with this. I have seen lot of project which they completely revamp into something different.

Whats your thought on this @aralroca @danielart ?

@danielart
Copy link
Collaborator

@siddharthborderwala @shubhamV123 in this stage of teaful (in early development, growing fast) we have to check some possibilities and try to get the best choice. Bear this in mind, instead of develop the whole docs for teaful, we could try to have a very small mvp with each option, and then compare them and maybe ask community their opinion, maybe in the discussions tab.

I usually pick the most used option for this kind of things, but as we are a new library behind 1.0, I think is fair to give a try to nextra, at least to check a mvp.

@shubhamV123
Copy link
Contributor

@siddharthborderwala @shubhamV123 in this stage of teaful (in early development, growing fast) we have to check some possibilities and try to get the best choice. Bear this in mind, instead of develop the whole docs for teaful, we could try to have a very small mvp with each option, and then compare them and maybe ask community their opinion, maybe in the discussions tab.

I usually pick the most used option for this kind of things, but as we are a new library behind 1.0, I think is fair to give a try to nextra, at least to check a mvp.

Make sense if this works, we can go for this than.

@siddharthborderwala
Copy link
Contributor Author

Yes, it is mentioned that nextra is not ready for production but it is being used for the documentation of SWR library built by a team at vercel. Moreover, nextra is backed by vercel. Also, the API has been stable for quite some versions and in that aspect it is a safe bet to say that the API won't change drastically, leading to a lot of changes from our side. Adding to this, the currrent API seems very standard from the viewpoint of static-site-generators.

I think nextra is a good contender here and personally I feel docusauras is used at a lot of places, it would be nice to have a different kind of documentation, with some minimalism, just like the library itself.

@siddharthborderwala
Copy link
Contributor Author

@danielart @aralroca I have implemented the feedback-rating (without the backend) component. You may have a look at it on any page of the docs. It'll be easy to integrate with google-analytics events or tag manager.

@danielart
Copy link
Collaborator

@siddharthborderwala Looks good for me! let us know if you need help with that. Thanks for your efforts 💪 You're awesome !

@siddharthborderwala
Copy link
Contributor Author

siddharthborderwala commented Nov 15, 2021

@siddharthborderwala Looks good for me! let us know if you need help with that. Thanks for your efforts 💪 You're awesome !

Yes I'll let you know once we need to setup analytics using a google account.

I'm glad I could be helpful! Thanks 😃

@siddharthborderwala
Copy link
Contributor Author

siddharthborderwala commented Dec 1, 2021

@danielart @aralroca The docs site is updated with latest docs content. It is almost complete, two things left -

  • Google Analytics Integration with custom events for feedback
  • Fixing some syntax highlighting styles

https://teaful-docs.vercel.app/

@siddharthborderwala
Copy link
Contributor Author

Let's plan to release the website with the 1.0.0 version!

@danielart
Copy link
Collaborator

thanks for your efforts! great job @siddharthborderwala, do you need help with that?

@aralroca
Copy link
Collaborator

aralroca commented Dec 1, 2021

@siddharthborderwala It's incredible! Very great contribution! I've looked at both the code and the result and it has my approval 👏

When it's all changed from "Draft" to "Ready for review" I will look at it in more detail. But it's great for me. Do you need help with Google Analytics or anything?

@siddharthborderwala
Copy link
Contributor Author

@danielart I don't think I need any assistance, I just want to know which google account to use to setup the analytics.

Maybe, @aralroca can create a property on google analytics and then he can give me the credentials required to be able to use ga library for the web.

@aralroca aralroca added this to Progress in 1.0 Dec 3, 2021
@siddharthborderwala
Copy link
Contributor Author

siddharthborderwala commented Dec 14, 2021

@danielart @aralroca Added google analytics with custom feedback event.

https://teaful-docs.vercel.app

@siddharthborderwala siddharthborderwala marked this pull request as ready for review December 28, 2021 18:29
@siddharthborderwala
Copy link
Contributor Author

@danielart @aralroca The docs site is updated with latest docs content. It is almost complete, two things left -

  • Google Analytics Integration with custom events for feedback
  • Fixing some syntax highlighting styles

https://teaful-docs.vercel.app/

It is done 😄🎉

@siddharthborderwala
Copy link
Contributor Author

@danielart @aralroca have a look at the completed documentation site.

Let's decide on what other content should be added on the docs.

@aralroca
Copy link
Collaborator

aralroca commented Jan 5, 2022

@siddharthborderwala IMO this is a very great contribution, all you did here deserves to be merged now! I reviewed and is perfect. Thanks for everything! And welcome as a contributor.

Maybe in more iterations, we can improve the documentation. Before deleting the README documentation to replace it with this one it would be nice to choose which version of Teaful is showing the documentation.

@aralroca aralroca merged commit f12d991 into teafuljs:master Jan 5, 2022
1.0 automation moved this from Progress to Done Jan 5, 2022
@aralroca
Copy link
Collaborator

aralroca commented Jan 5, 2022

@all-contributors please add @siddharthborderwala for documentation, infrastructure and code

@allcontributors
Copy link
Contributor

@aralroca

I've put up a pull request to add @siddharthborderwala! 🎉

@siddharthborderwala
Copy link
Contributor Author

Thank you @aralroca I am super excited to have contributed to teafuljs! Yes, thinking ahead, it would be a great idea to consider versioning too.

This docs site is for the 0.7 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
1.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants