Skip to content

Added docs section for starting contributors#4456

Closed
Jwaegebaert wants to merge 6 commits intopnp:mainfrom
Jwaegebaert:contributeSection
Closed

Added docs section for starting contributors#4456
Jwaegebaert wants to merge 6 commits intopnp:mainfrom
Jwaegebaert:contributeSection

Conversation

@Jwaegebaert
Copy link
Copy Markdown
Contributor

Finally, after a few months of work, lots of head-scratching, I can deliver the first design for a new section in the docs. A guide on how to get started with contributing to the CLI for Microsoft 365.

The following topics are included in this section.

  • Contributing guide
  • Environment setup
  • Creating a new command:
    • New command sample
    • Command logic
    • Unit tests
    • Help page
  • Adding a script sample
  • Debugging the CLI
  • Creating a Pull Request
  • Pull Request reviews

@pnp/cli-for-microsoft-365-maintainers a thorough review would be nice 😄


Closes #2834

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Feb 2, 2023

Awesome work @Jwaegebaert . We will review it ASAP 🤩

@waldekmastykarz
Copy link
Copy Markdown
Member

@garrytrinder, I believe you had some ideas in this space. Would you mind reviewing this PR?

@garrytrinder
Copy link
Copy Markdown
Member

Great work @Jwaegebaert 👏

I've had a quick look and here are some of my initial thoughts.

  • Consider changing the Contributing landing page to provide an overview and index of the pages under this section, the current page doesn't help guide me to my next step. An index helps provide an end to end view of the guide as you can see all the steps within that guide.
  • Consider providing two routes to tutorials on the landing page, one for contributing a new command and the other a sample script. Each route has a potentially different audience, some folks just want to contribute scripts, so may focus on this first.
  • Consider using a different command name or example that doesn't currently exist i.e. foo command. The group get command already exists, so should we consider using something different to avoid conflicts.
  • Consider including numbers in the headings to make it clear that the steps are to be followed in order.
  • Consider that the guide should focus on instructing the reader to perform actions and see immediate results to those actions. We should be very much handholding them through the process for creating a command or a script. Currently I don't feel that we do this and leave things to interpretation. Let's make sure they are setup and ready like having npm watch running.

@garrytrinder garrytrinder marked this pull request as draft February 5, 2023 10:43
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Great pointers @garrytrinder! I've got a few questions.

Consider providing two routes to tutorials on the landing page, one for contributing a new command and the other a sample script. Each route has a potentially different audience, some folks just want to contribute scripts, so may focus on this first.

Do you maybe know how we can achieve this with Material for MkDocs? I'm asking this because I had the same thought but didn't find a proper way of visually implementing this.

Consider using a different command name or example that doesn't currently exist i.e. foo command. The group get command already exists, so should we consider using something different to avoid conflicts.

This was my initial thought also, but won't it be easier for users to have a fully implemented example? That way they can always validate the existing files in the project and reflect on this.

@garrytrinder
Copy link
Copy Markdown
Member

Apologies on the delay on getting back to you on this, life has been getting in the way.

Do you maybe know how we can achieve this with Material for MkDocs? I'm asking this because I had the same thought but didn't find a proper way of visually implementing this.

This could just be a couple of buttons, or even simpler just a bulleted list.

This was my initial thought also, but won't it be easier for users to have a fully implemented example? That way they can always validate the existing files in the project and reflect on this.

It might be easier, but as the tutorial is aimed at folks with no prior knowledge, we could guide them through setting up the development environment, starting watch mode, build and run a command and then write the tests. This would show the contributor the full end to end process and at the end they have built something from scratch. This would be a great way to learn. It's also a good way to show the developer experience.

@milanholemans milanholemans added the pr-priority Process this PR asap label May 8, 2023
@Jwaegebaert Jwaegebaert force-pushed the contributeSection branch 2 times, most recently from d15e9f8 to d9d8abd Compare May 17, 2023 11:59
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Alright, it has been a while since I last updated this PR. Here are the changes I have made:

  • Added a "Next Steps" section at the end of several articles to guide users toward follow-up articles.
  • Included a few pathways on the landing page that users can follow to achieve specific goals.
  • Updated some content to improve readability and ease of following.

I want to mention that I haven't incorporated the suggestions for the new command example. Personally, I believe it is much easier for users to understand and follow a real-world scenario rather than a hypothetical one. This way, users can also refer to the fully implemented files to compare their own scenarios.

@Jwaegebaert Jwaegebaert marked this pull request as ready for review May 17, 2023 12:15
@martinlingstuyl
Copy link
Copy Markdown
Contributor

Do you need help on this one @garrytrinder? It would be nice if we can merge it before the migration to docusaurus.

@martinlingstuyl
Copy link
Copy Markdown
Contributor

@Jwaegebaert, @garrytrinder: just to get the lay of the land: how far along is this PR? Do you think it's just crossing some t's and dotting some I's? Or might more zealous reading be in order?

@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Some zealous reading is always welcome 😄

I've done a second round of adjustments so it could always do with some tweaks here and there. But with Docusaurus around the corner like you said. We'll need to make some adjustments to this guide to include the Docusaurus architecture

@martinlingstuyl
Copy link
Copy Markdown
Contributor

In that case maybe we should leave it until after the docusaurus release...

@milanholemans milanholemans removed the pr-priority Process this PR asap label May 26, 2023
Copy link
Copy Markdown
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've recently changed our SSG to Docusaurus. This update has impacted our documentation syntaxes and will require some adjustments on your end. However, there's no need to worry, as Milan has done an amazing job creating a detailed page that explains all the new syntaxes to be used in the .mdx files. If you have any questions, feel free to reach out to us here or on Discord. You can find more information at this link: All you need to know about Docusaurus.

😉

@Jwaegebaert Jwaegebaert marked this pull request as draft May 31, 2023 09:28
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Closing this to test Parker

@garrytrinder
Copy link
Copy Markdown
Member

@Jwaegebaert, @garrytrinder: just to get the lay of the land: how far along is this PR? Do you think it's just crossing some t's and dotting some I's? Or might more zealous reading be in order?

This had fallen off my list, however now that Docusaurus release has happened it seems like a good time to revisit this.

@Jwaegebaert Jwaegebaert marked this pull request as ready for review July 2, 2023 11:43
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

It's been updated to include all the changes regarding Docusaurus

@Jwaegebaert Jwaegebaert requested a review from garrytrinder July 2, 2023 11:44
Copy link
Copy Markdown
Member

@garrytrinder garrytrinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @Jwaegebaert! Please find my initial comments. I've not had chance to review all pages, so this review is ongoing, but wanted to provide some initial feedback for you to consider.

Comment thread docs/docs/contribute/environment-setup.mdx
Comment thread docs/docs/contribute/contributing-guide.mdx Outdated
Comment thread docs/docs/contribute/creating-the-pr.mdx
Comment thread docs/docs/contribute/creating-the-pr.mdx Outdated
Comment thread docs/docs/contribute/creating-the-pr.mdx Outdated
Comment thread docs/docs/contribute/creating-the-pr.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/creating-the-pr.mdx
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Awesome initial review @garrytrinder, I've already applied most of these.

Copy link
Copy Markdown
Member

@garrytrinder garrytrinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates @Jwaegebaert here are some more comments 👍

Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx
Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/expect-during-pr.mdx Outdated
Comment thread docs/docs/contribute/how-to-debug.mdx Outdated
Copy link
Copy Markdown
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @Jwaegebaert awesome work! A lot of valuable content!

I noticed this PR has been stale for a while so I checked your PR (because I find this topic interesting), and noticed some outdated info. I'm not trying to take over @garrytrinder 's role; he's doing great. Just wanted to share my observations and help improve the content.

Keep up the good work!


## You have an idea for a New Command

Awesome! Good ideas are invaluable for every product. Before you start hacking away, please check if there is no similar idea already listed in the [issue list](https://github.com/pnp/cli-microsoft365/issues). This ensures that your idea is unique and not being worked on. If you don't find a similar idea, create a new issue describing your idea. Once we agree on the feature scope and architecture, the feature will be ready for building. Don't hesitate to mention this in the issue if you'd like to build the feature yourself. If it's the first time you're building a command, see the [guidance article](https://github.com/pnp/cli-microsoft365/wiki/Adding-a-command) explaining in detail what you will need at a minimum.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For guidance article, is there no page we can use on our website? Will the wiki still be available when this PR completes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, there's no specific page for this, but it would be great to have one on the website. Maybe we can create a new issue to address this. We'll review the existing wiki pages and make sure to remove any links if we decide to move the content there.

Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx Outdated
Comment thread docs/docs/contribute/new-command/writing-the-docs.mdx Outdated
Comment thread docs/docs/contribute/new-command/writing-the-docs.mdx Outdated
Comment thread docs/docs/contribute/new-command/writing-the-docs.mdx Outdated
Comment thread docs/docs/contribute/new-command/writing-the-docs.mdx Outdated
Comment thread docs/docs/contribute/new-command/writing-the-docs.mdx Outdated
Comment thread docs/docs/contribute/how-to-debug.mdx Outdated
Comment thread docs/docs/contribute/environment-setup.mdx
@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

Nice review @milanholemans, very thorough! Most suggestions are applied. One thing I was curious about, I noticed there weren't any suggestions regarding the file contributing-guide.mdx. Maybe you forgot that one?

@milanholemans
Copy link
Copy Markdown
Contributor

Nice review @milanholemans, very thorough! Most suggestions are applied. One thing I was curious about, I noticed there weren't any suggestions regarding the file contributing-guide.mdx. Maybe you forgot that one?

I left 1 comment there 😃. From what I can remember, that page was good 👍

@Jwaegebaert
Copy link
Copy Markdown
Contributor Author

@pnp/cli-for-microsoft-365-maintainers can we give this PR a shot and merge it in? 😄

@garrytrinder garrytrinder removed their assignment Aug 10, 2023
@garrytrinder
Copy link
Copy Markdown
Member

@Jwaegebaert LGTM 🚀

@milanholemans
Copy link
Copy Markdown
Contributor

Merged manually, nice work @Jwaegebaert!

@Jwaegebaert Jwaegebaert deleted the contributeSection branch August 27, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document improvement for starting contributors

6 participants