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

fix: Correct typo, improve createRadio() method description, and simplify input tag #7315

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

Dhanush111
Copy link
Contributor

@Dhanush111 Dhanush111 commented Oct 15, 2024

Related Issue
Originally reported in p5.js-website repository: #595 - Misspelling in Docs: Reference > createRadio()

Summary

  • Fixed a typo in the documentation: changed "paremeter" to "parameter" in the description of the myRadio.option() method.
  • Updated the description of the myRadio.disable() method for better clarity:
    • Changed "enables the entire radio button if true is passed and disables it if false is passed."
      to "Disables the radio button if true is passed, and enables it if false is passed."
  • Simplified the input tag in the documentation:
    • Changed <input name="food"></input> to <input name="food"> since <input> is self-closing.

Motivation
These updates improve the clarity, accuracy, and HTML standards compliance of the createRadio documentation, making it easier for developers to understand and implement this method.

Additional Notes
Please review the changes to ensure they align with the documentation style and standards of the project.

Copy link

welcome bot commented Oct 15, 2024

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

@Dhanush111
Copy link
Contributor Author

Dhanush111 commented Oct 16, 2024

@davepagurek Could you please review this PR? All required changes have been made, and I’m awaiting your feedback for the merge.

@bulkan
Copy link
Contributor

bulkan commented Oct 16, 2024

@Dhanush111 not sure why you tagged me in this issue as I'm not part of the collaborators here?

@perminder-17 perminder-17 self-requested a review October 17, 2024 20:59
Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Since you're working on fixing the createRadio() method, could you also adjust the examples? Currently, the options are not displaying correctly.

image

image

I believe this can be resolved by applying some styling to myRadio, perhaps by setting display: flex and flex-direction: column.

* - `myRadio.value()` returns the currently-selected option's value.
* - `myRadio.selected()` returns the currently-selected option.
* - `myRadio.selected(value)` selects the given option and returns it as an <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement" target="_blank">`HTMLInputElement`</a>.
* - `myRadio.disable(shouldDisable)` enables the entire radio button if `true` is passed and disables it if `false` is passed.
* - `myRadio.disable(shouldDisable)` Disables the radio button if `true` is passed, and enables it if `false` is passed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch.

@Dhanush111
Copy link
Contributor Author

@perminder-17 Yes, i too saw those things were not right, the thing is, I’m having trouble running it locally or on GitHub Pages right now, so I can’t make those changes myself at the moment.

Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

No problem, I will open up a PR on fixing this very soon.

@@ -0,0 +1,51 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if I am unable to understand, but can you help me knowing what's the use of adding this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@perminder-17 sorry, it was accidental(tried to build it on github using that file)

@perminder-17 perminder-17 self-requested a review November 7, 2024 02:16
Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in review, looks good to me.

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