joomla / Manual

Joomla Developer Documentation
28 stars 57 forks source link

Update radio.md #319

Closed marcorensch closed 2 weeks ago

marcorensch commented 1 month ago

User description

Added Layout Radio Switcher information aswell as an exemple on how to use it on the bottom. Additionally Added JNo / JYes Option Labels for Styling with yes/no.


PR Type

documentation


Description


Changes walkthrough ๐Ÿ“

Relevant files
Documentation
radio.md
Document layout attribute and styling examples for radio fields

versioned_docs/version-5.1/general-concepts/forms-fields/standard-fields/radio.md
  • Added information about the layout attribute for radio fields.
  • Provided an example using the Joomla Radio-Switcher Layout.
  • Updated option labels to JNo and JYes for styling.
  • Added a new example for styling with yes/no values as a switcher.
  • +19/-3   

    ๐Ÿ’ก PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    codiumai-pr-agent-pro[bot] commented 1 month ago

    PR Reviewer Guide ๐Ÿ”

    Here are some key observations to aid the review process:

    โฑ๏ธ Estimated effort to review: 1 ๐Ÿ”ตโšชโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Recommended focus areas for review

    Inconsistent Naming
    The new example uses 'JNo' and 'JYes' as option labels, which may not be standard Joomla language constants. Consider using 'JYES' and 'JNO' instead for consistency with Joomla's language system. Incomplete Information
    The new 'layout' attribute is introduced without explaining its full implications or providing a link to more comprehensive documentation about Joomla layouts.
    codiumai-pr-agent-pro[bot] commented 1 month ago

    PR Code Suggestions โœจ

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Explain the use of Joomla language constants in radio options ___ **Consider adding a note about the significance of using JNo and JYes as option
    values. These are likely language constants in Joomla, which allow for automatic
    translation. Explaining this would be helpful for developers who might not be
    familiar with Joomla's internationalization practices.** [versioned_docs/version-5.1/general-concepts/forms-fields/standard-fields/radio.md [63-64]](https://github.com/joomla/Manual/pull/319/files#diff-5480f62032c005f44b9a4640bf2605960b68bd1aef4dcd377ff22f3595393fd9R63-R64) ```diff + ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: The suggestion adds a crucial note about Joomla language constants, which is important for developers to understand internationalization practices. This explanation enhances the documentation's completeness and usability for a global audience.
    9
    Enhancement
    Add more context about the Joomla Radio-Switcher Layout functionality ___ **Consider adding a brief explanation of what the Joomla Radio-Switcher Layout does
    and how it affects the appearance or functionality of the radio buttons. This will
    provide more context for users who may not be familiar with this specific layout.** [versioned_docs/version-5.1/general-concepts/forms-fields/standard-fields/radio.md [14]](https://github.com/joomla/Manual/pull/319/files#diff-5480f62032c005f44b9a4640bf2605960b68bd1aef4dcd377ff22f3595393fd9R14-R14) ```diff -- **layout** (optional) can be used to set a Layout for the switcher. Eg. if set to `layout="joomla.form.field.radio.switcher"` will use the Joomla Radio-Switcher Layout. +- **layout** (optional) can be used to set a Layout for the switcher. Eg. if set to `layout="joomla.form.field.radio.switcher"` will use the Joomla Radio-Switcher Layout, which provides a toggle switch appearance for yes/no options instead of traditional radio buttons. ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: This suggestion provides valuable context about the Joomla Radio-Switcher Layout, enhancing the documentation's clarity for users unfamiliar with it. It improves understanding of the layout's functionality and its visual impact on radio buttons.
    8
    Clarify the differences between the two styling examples provided ___ **To improve clarity, consider adding a brief comment or explanation about the
    differences between the two examples provided (the btn-group-yesno and the switcher
    layout). This would help users understand when to use each approach and what visual
    differences to expect.** [versioned_docs/version-5.1/general-concepts/forms-fields/standard-fields/radio.md [68-80]](https://github.com/joomla/Manual/pull/319/files#diff-5480f62032c005f44b9a4640bf2605960b68bd1aef4dcd377ff22f3595393fd9R68-R80) ```diff Styling with yes/no values as Switcher: ```xml ``` +This example uses the Joomla Radio-Switcher Layout, which renders the options as a toggle switch instead of the colored buttons shown in the previous example. Use this when you want a more compact, modern UI for boolean choices. + ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: This suggestion aids in distinguishing between the two styling examples, helping users choose the appropriate layout for their needs. It improves the documentation by providing insights into the visual and functional differences between the examples.
    7

    ๐Ÿ’ก Need additional feedback ? start a PR chat

    HLeithner commented 2 weeks ago

    thx