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

Added documentation for the wrap around option in the counter component #36217

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions source/_integrations/counter.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ counter:
type: integer
default: 1
minimum:
description: Minimum value the counter will have
description: Minimum value the counter will have. Required if `wrap_around` is `true`.
required: false
type: integer
maximum:
description: Maximum value the counter will have
description: Maximum value the counter will have. Required if `wrap_around` is `true`.
required: false
type: integer
wrap_around:
description: Should the value wrap around once it reaches the maximum or minimum value
required: false
type: boolean
default: false
Comment on lines +72 to +76
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance the wrap_around parameter description

The description could be more detailed to better explain the behavior and common use cases.

Consider updating the description to:

-      description: Should the value wrap around once it reaches the maximum or minimum value
+      description: >-
+        If true, incrementing at maximum value will wrap to minimum value and
+        decrementing at minimum value will wrap to maximum value. Useful for
+        cycling through a fixed list of items (e.g., scenes) using buttons.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
wrap_around:
description: Should the value wrap around once it reaches the maximum or minimum value
required: false
type: boolean
default: false
wrap_around:
description: >-
If true, incrementing at maximum value will wrap to minimum value and
decrementing at minimum value will wrap to maximum value. Useful for
cycling through a fixed list of items (e.g., scenes) using buttons.
required: false
type: boolean
default: false

icon:
description: Icon to display for the counter.
required: false
Expand Down
Loading