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

Documentation for devise-passkeys #2

Open
tcannonfodder opened this issue May 7, 2023 · 9 comments
Open

Documentation for devise-passkeys #2

tcannonfodder opened this issue May 7, 2023 · 9 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tcannonfodder
Copy link
Contributor

No description provided.

@heliocola
Copy link
Contributor

@tcannonfodder : here are a few formats for module/class documentation that I have seen and it can be used:

  1. Very simple: no format, 1 to many lines of comments as needed:
module Devise
  # All Passkeys sub-modules, models, classes, concerns etc are inherited from here.
  module Passkeys
  1. Minimum format: one line for name, 1 to many lines for description:
module Devise
  # Name: Devise::Passkeys module
  # All Passkeys sub-modules, models, classes, concerns etc are inherited from here.
  module Passkeys
  1. Some format and more verbose: one line for name, one line for summary, 1 to many lines for a longer description:
module Devise
  # Name: Devise::Passkeys module
  # Summary: All Passkeys sub-modules, models, classes, concerns etc are inherited from here.
  # This is the top level Passkeys modules and as such all sub-modules, models, classes, concerns etc
  # should be inherited from.
  # The folder structure is as follow:
  # ... add as much details as we need
  module Passkeys

My suggestion at this stage is to start with option 1 and move toward a more meaningful and long documentation.
With that said, I have a draft PR #3 that makes the code compliant with rubocop.yml.
If you think that is the way to go, I will submit it for review.

Or if you prefer a different format, I'd be happy to work on.

@tcannonfodder
Copy link
Contributor Author

It fells counterintuitive, but I think starting with YARD-compliant docs (option 3?) would be the best move forward. Reasons being

  • the code itself isn’t particularly difficult, so the documentation is for the purpose of all the modules
  • Going straight to YARD would help with discovery because of RubyDocs, and IDEs could easily present the docs since it’s a common format
  • The library is almost done (minus emergency registration & some potential helpers for analyzing credentials), so might as well get the docs up to snuff

@heliocola
Copy link
Contributor

Got it.
I was bit confused with the empty description and with RED CI (I confess that causes some anxiety)!
I think the PR I have is not the direction you want to go, as my goal was to get Green CI.

If I am understanding correctly, the goal is to add meaningful (a few lines long) comment for each modules.
Is that correct?

@tcannonfodder
Copy link
Contributor Author

That is correct! Sorry about the confusion & lack of detailed issue title 🙈

reviewing your changes now!

@johalloran01
Copy link
Contributor

johalloran01 commented Jun 15, 2023

We are creating separate pull requests for each section under the Documentation Milestone!

------WORDY BREAK DOWN BELOW, READ AT YOUR DISCRESSION---------

@tcannonfodder and I had a discussion about the best way to approach this issue.
We determined that trying to write the documentation all in one issue/pull request would prevent us from effectively trouble shooting any issues we may run into after we begin addressing the documentation. It'll also prevent us from knowing which section we should start working on, amongst one another.

Here are the solutions we came up with:

  • create a milestone for the documentation
  • Begin with a top down approach to documenting each section.
  • inside the milestone each section will have its own issue and pull request, that when initialized will represent the beginning of someone working on the documentation for that section. By doing this we know which section is actively being worked on and what issues are being raised in relation to that section. This will also enable us to trouble shoot and back track if any issues arise as we proceed through the process.
  • We will be meeting next week to effectively label and organize which sections (comprised of specific individual files) we are creating documentation for, and divide up the work effectively!

@tcannonfodder
Copy link
Contributor Author

tcannonfodder commented Jun 16, 2023

Tentative sections:

  • Registration
  • Sessions (authentication)
  • Reauthentication
  • PasskeyIssuer
  • Warden Strategies
  • PasskeyAuthenticatable

I'll try to get the YARD setup done tonight. (Done in #8)

I wouldn't fret about making the documentation perfectly YARD formatted when you're working on it; we can do that at the end of the PR. The harder part will be actually writing useful documentation 😂😭

@tcannonfodder tcannonfodder added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Jun 16, 2023
@tcannonfodder
Copy link
Contributor Author

Added a set of issues in the milestone! https://github.com/ruby-passkeys/devise-passkeys/milestone/1

@heliocola
Copy link
Contributor

IMO useful documentation is a long term strategy.
First step is to have the first one!
And we keep iterating on it for the foreseeable future! :-D

As more and more users start using the gem and asking questions, we will end up find ways to improve it!
Also: today I know a lot more about passkeys concepts, so it is easier for me to describe it...

Rock solid idea into breaking this up.
I have some draft documentation in my old laptop, but haven't pushed yet.

@tcannonfodder
Copy link
Contributor Author

Sounds good; feel free to pick one of the documentation issues that haven’t been claimed yet 💪

RE: useful vs. initial documentation: I think given the size of the gem & the fact there are multiple folks working on this, we can get a useful set of documentation out of the gate. For example, #24 is a great example of a set of docs that are solidly baked, making 0.2 a very useful release when we’re done 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

3 participants