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

Update example document #43

Merged
merged 1 commit into from
Sep 28, 2024
Merged

Update example document #43

merged 1 commit into from
Sep 28, 2024

Conversation

bluzky
Copy link
Owner

@bluzky bluzky commented Sep 28, 2024

Summary by Sourcery

Enhance the documentation of the RadioGroup component by adding an example usage section.

Documentation:

  • Add example usage for the RadioGroup component in the documentation.

Copy link

sourcery-ai bot commented Sep 28, 2024

Reviewer's Guide by Sourcery

This pull request updates the documentation for the SaladUI.RadioGroup module by adding a comprehensive example of how to use the radio group component. The changes are focused on improving the module's documentation to provide clearer guidance for developers using this UI component.

No sequence diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added a detailed example for the RadioGroup component usage
  • Inserted a code block demonstrating the structure of a radio group
  • Showed how to use the radio_group component with multiple options
  • Illustrated the usage of radio_group_item and label components within the radio group
  • Demonstrated how to set name, value, and id attributes for radio group items
lib/salad_ui/radio_group.ex

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bluzky bluzky merged commit 43ae1f6 into main Sep 28, 2024
2 checks passed
@bluzky bluzky deleted the feature/radio-group branch September 28, 2024 05:31
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @bluzky - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +10 to +23
<.radio_group name="question-1" value="option-2">
<div class="flex items-center space-x-2">
<.radio_group_item builder={builder} value="option-one" id="option-one"></.radio_group_item>
<.label for="option-one">
Option One
</.label>
</div>
<div class="flex items-center space-x-2">
<.radio_group_item builder={builder} value="option-two" id="option-two"></.radio_group_item>
<.label for="option-two">
Option Two
</.label>
</div>
</.radio_group>
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider restructuring the example for better clarity and completeness.

This could include showing how the builder parameter is obtained or passed to the radio_group_item component, which would make the example more complete and easier to understand for users of this module.

<.radio_group name="question-1" value="option-2">
  <%= for {option, label} <- [{"option-one", "Option One"}, {"option-two", "Option Two"}] do %>
    <div class="flex items-center space-x-2">
      <.radio_group_item builder={@form} value={option} id={option} />
      <.label for={option}><%= label %></.label>
    </div>
  <% end %>
</.radio_group>

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.

1 participant