Skip to content

Commit d6184e7

Browse files
committed
Update sub button wheel to v1.1.0
1 parent 18bad4e commit d6184e7

File tree

7 files changed

+1187
-118
lines changed

7 files changed

+1187
-118
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
### v1.1.0
4+
5+
<details><summary>See Changes</summary>
6+
7+
- Added support for closing wheel when clicking sub buttons. This can be configured globally using `close_on_sub_button_click` or per button using `close_on_click`.
8+
Button configuration overrides the global setting.
9+
- Fixed issue with `animation_delay` and `animation_duration` not being applied correctly when using values of 0 for instant display.
10+
11+
</details>

modules/sub_button_wheel/CONFIG_OPTIONS.md

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# `sub_button_wheel`
22

33
- [1. Property `wheel_opener`](#1-property-wheel_opener)
4-
- [2. Property `layout_options`](#2-property-layout_options)
5-
- [2.1. Property `wheel_layout`](#21-property-wheel_layout)
6-
- [2.2. Property `double_ring_inner_count`](#22-property-double_ring_inner_count)
7-
- [3. Property `animation_options`](#3-property-animation_options)
8-
- [3.1. Property `wheel_animation`](#31-property-wheel_animation)
9-
- [3.2. Property `animation_delay`](#32-property-animation_delay)
10-
- [3.3. Property `animation_duration`](#33-property-animation_duration)
11-
- [4. Property `wheel_buttons`](#4-property-wheel_buttons)
12-
- [4.1. wheel_button](#41-wheel_button)
13-
- [4.1.1. Property `sub_button`](#411-property-sub_button)
14-
- [4.1.2. Property `position`](#412-property-position)
4+
- [2. Property `close_on_sub_button_click`](#2-property-close_on_sub_button_click)
5+
- [3. Property `layout_options`](#3-property-layout_options)
6+
- [3.1. Property `wheel_layout`](#31-property-wheel_layout)
7+
- [3.2. Property `double_ring_inner_count`](#32-property-double_ring_inner_count)
8+
- [4. Property `animation_options`](#4-property-animation_options)
9+
- [4.1. Property `wheel_animation`](#41-property-wheel_animation)
10+
- [4.2. Property `animation_delay`](#42-property-animation_delay)
11+
- [4.3. Property `animation_duration`](#43-property-animation_duration)
12+
- [5. Property `wheel_buttons`](#5-property-wheel_buttons)
13+
- [5.1. wheel_button](#51-wheel_button)
14+
- [5.1.1. Property `sub_button`](#511-property-sub_button)
15+
- [5.1.2. Property `position`](#512-property-position)
16+
- [5.1.3. Property `close_on_click`](#513-property-close_on_click)
1517

1618
**Title:** `sub_button_wheel`
1719

@@ -21,12 +23,13 @@
2123

2224
**Description:** Configuration for sub-button wheel layout functionality
2325

24-
| Property | Type | Default | Description |
25-
| ----------------------------------------- | ------ | ------- | ---------------------------------------------------------------- |
26-
| + wheel_opener | string | - | Button that opens the wheel (e.g., 'main', 'sub-button-1', etc.) |
27-
| - [layout_options](#layout_options) | object | - | Layout configuration options |
28-
| - [animation_options](#animation_options) | object | - | Animation configuration options |
29-
| + wheel_buttons | array | - | Array of sub-buttons to include in the wheel |
26+
| Property | Type | Default | Description |
27+
| --------------------------------------------------------- | ------- | ------- | ---------------------------------------------------------------- |
28+
| + wheel_opener | string | - | Button that opens the wheel (e.g., 'main', 'sub-button-1', etc.) |
29+
| - [close_on_sub_button_click](#close_on_sub_button_click) | boolean | false | Close wheel when any sub-button is clicked (global setting) |
30+
| - [layout_options](#layout_options) | object | - | Layout configuration options |
31+
| - [animation_options](#animation_options) | object | - | Animation configuration options |
32+
| + wheel_buttons | array | - | Array of sub-buttons to include in the wheel |
3033

3134
## 1. Property `wheel_opener`
3235

@@ -36,7 +39,15 @@
3639

3740
**Description:** Button that opens the wheel (e.g., 'main', 'sub-button-1', etc.)
3841

39-
## 2. Property `layout_options`
42+
## 2. Property `close_on_sub_button_click`
43+
44+
| **Type** | **Default** | **Description** |
45+
| -------- | ----------- | ----------------------------------------------------------- |
46+
| boolean | false | Close wheel when any sub-button is clicked (global setting) |
47+
48+
**Description:** Close wheel when any sub-button is clicked (global setting)
49+
50+
## 3. Property `layout_options`
4051

4152
| **Type** | **Default** | **Description** |
4253
| -------- | ----------- | ---------------------------- |
@@ -49,7 +60,7 @@
4960
| - [wheel_layout](#layout_options_wheel_layout) | enum (of string) | "even-circle" | Wheel layout style |
5061
| - [double_ring_inner_count](#layout_options_double_ring_inner_count) | integer | 4 | Number of buttons in inner ring (double-ring layout only) |
5162

52-
### 2.1. Property `wheel_layout`
63+
### 3.1. Property `wheel_layout`
5364

5465
| **Type** | **Default** | **Description** |
5566
| ---------------- | ------------- | ------------------ |
@@ -66,7 +77,7 @@ Must be one of:
6677
- "double-ring"
6778
- "smart-adaptive"
6879

69-
### 2.2. Property `double_ring_inner_count`
80+
### 3.2. Property `double_ring_inner_count`
7081

7182
| **Type** | **Default** | **Description** |
7283
| -------- | ----------- | --------------------------------------------------------- |
@@ -79,7 +90,7 @@ Must be one of:
7990
| **Minimum** | &ge; 1 |
8091
| **Maximum** | &le; 8 |
8192

82-
## 3. Property `animation_options`
93+
## 4. Property `animation_options`
8394

8495
| **Type** | **Default** | **Description** |
8596
| -------- | ----------- | ------------------------------- |
@@ -93,7 +104,7 @@ Must be one of:
93104
| - [animation_delay](#animation_options_animation_delay) | number | 0.5 | Initial delay before animation starts (seconds) |
94105
| - [animation_duration](#animation_options_animation_duration) | number | 1.0 | Total duration of animation (seconds) |
95106

96-
### 3.1. Property `wheel_animation`
107+
### 4.1. Property `wheel_animation`
97108

98109
| **Type** | **Default** | **Description** |
99110
| ---------------- | ----------------- | -------------------------------- |
@@ -106,7 +117,7 @@ Must be one of:
106117
- "staggered-scale"
107118
- "instant"
108119

109-
### 3.2. Property `animation_delay`
120+
### 4.2. Property `animation_delay`
110121

111122
| **Type** | **Default** | **Description** |
112123
| -------- | ----------- | ----------------------------------------------- |
@@ -119,7 +130,7 @@ Must be one of:
119130
| **Minimum** | &ge; 0 |
120131
| **Maximum** | &le; 10 |
121132

122-
### 3.3. Property `animation_duration`
133+
### 4.3. Property `animation_duration`
123134

124135
| **Type** | **Default** | **Description** |
125136
| -------- | ----------- | ------------------------------------- |
@@ -132,7 +143,7 @@ Must be one of:
132143
| **Minimum** | N/A |
133144
| **Maximum** | &le; 10 |
134145

135-
## 4. Property `wheel_buttons`
146+
## 5. Property `wheel_buttons`
136147

137148
| **Type** | **Default** | **Description** |
138149
| -------- | ----------- | -------------------------------------------- |
@@ -152,26 +163,27 @@ Must be one of:
152163
| ------------------------------------ | ----------- |
153164
| [wheel_button](#wheel_buttons_items) | - |
154165

155-
### 4.1. wheel_button
166+
### 5.1. wheel_button
156167

157168
| **Type** | **Default** | **Description** |
158169
| -------- | ----------- | --------------- |
159170
| object | - | - |
160171

161-
| Property | Type | Default | Description |
162-
| ------------------------------------------- | ------- | ------- | --------------------------------------- |
163-
| + sub_button | string | - | Sub-button identifier (1, 2, 3, etc.) |
164-
| - [position](#wheel_buttons_items_position) | integer | - | Fixed position in wheel (1-8, optional) |
172+
| Property | Type | Default | Description |
173+
| ------------------------------------------------------- | ------- | ------- | -------------------------------------------------------------------------------------------- |
174+
| + sub_button | string | - | Sub-button identifier (1, 2, 3, etc.) |
175+
| - [position](#wheel_buttons_items_position) | integer | - | Fixed position in wheel (1-8, optional) |
176+
| - [close_on_click](#wheel_buttons_items_close_on_click) | boolean | - | Close wheel when this button is clicked (overrides global close_on_sub_button_click setting) |
165177

166-
#### 4.1.1. Property `sub_button`
178+
#### 5.1.1. Property `sub_button`
167179

168180
| **Type** | **Default** | **Description** |
169181
| -------- | ----------- | ------------------------------------- |
170182
| string | - | Sub-button identifier (1, 2, 3, etc.) |
171183

172184
**Description:** Sub-button identifier (1, 2, 3, etc.)
173185

174-
#### 4.1.2. Property `position`
186+
#### 5.1.2. Property `position`
175187

176188
| **Type** | **Default** | **Description** |
177189
| -------- | ----------- | --------------------------------------- |
@@ -184,6 +196,14 @@ Must be one of:
184196
| **Minimum** | &ge; 1 |
185197
| **Maximum** | &le; 8 |
186198

199+
#### 5.1.3. Property `close_on_click`
200+
201+
| **Type** | **Default** | **Description** |
202+
| -------- | ----------- | -------------------------------------------------------------------------------------------- |
203+
| boolean | - | Close wheel when this button is clicked (overrides global close_on_sub_button_click setting) |
204+
205+
**Description:** Close wheel when this button is clicked (overrides global close_on_sub_button_click setting)
206+
187207
---
188208

189209
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans)

0 commit comments

Comments
 (0)