playbook_ui_docs 16.0.0.pre.alpha.PLAY2722advancedtableinlinerowloadingrails13598 → 16.0.0.pre.alpha.PLAY267213609
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.html.erb +39 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.md +3 -0
- data/app/pb_kits/playbook/pb_textarea/docs/example.yml +1 -0
- metadata +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.html.erb +0 -64
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.md +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4322987f8e63fc89e91fcba4aa38a7244e4ef3de8604cd3f0330ed1a17ad533
|
|
4
|
+
data.tar.gz: d0831011161564b4d441ebde75d607f83fbff46861a132f24adc680c66e6be32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe94da6ad68c6c106603829f881768cd000f28ff0f72d2e2088d172000345d7e573c7df89c17b120214ea92d578b2584229ce11b2a90d3f2ec52fc8eb1e9f1f9
|
|
7
|
+
data.tar.gz: 219f70f63ec6ce3e4e3691c40bf3696a4a4375d5116d8960ab6c3745293ee28165ac83c5e6443f9e12298837e097d3ae2bc45d6b02c0dec4fed43d110969ca38
|
|
@@ -6,9 +6,9 @@ In the first Advanced Table in this code example, 2021 has an empty children arr
|
|
|
6
6
|
This prop is set to `false` by default.
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### persistToggleExpansion
|
|
10
10
|
The `persistToggleExpansionButton` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceeding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
|
|
11
11
|
|
|
12
12
|
In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persistToggleExpansionButton` in place. The third Advanced Table shows the toggle all button due to `persistToggleExpansionButton`.
|
|
13
13
|
|
|
14
|
-
This prop is set to
|
|
14
|
+
This prop is set to false by default and should only be used in conjunction with `inlineRowLoading`.
|
|
@@ -29,7 +29,6 @@ examples:
|
|
|
29
29
|
- advanced_table_background_control_rails: Column Styling Background Color
|
|
30
30
|
- advanced_table_background_colors_rails: Column Styling Individual Cell Background Color
|
|
31
31
|
- advanced_table_column_border_color_rails: Column Group Border Color
|
|
32
|
-
- advanced_table_inline_row_loading_rails: Inline Row Loading
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
react:
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<%= pb_rails("textarea", props: {
|
|
2
|
+
label: "ID on Container",
|
|
3
|
+
id: "container-id",
|
|
4
|
+
name: "comment",
|
|
5
|
+
rows: 4
|
|
6
|
+
}) %>
|
|
7
|
+
|
|
8
|
+
<br/>
|
|
9
|
+
|
|
10
|
+
<%= pb_rails("textarea", props: {
|
|
11
|
+
label: "ID on Textarea via input_options",
|
|
12
|
+
input_options: { id: "textarea-id" },
|
|
13
|
+
name: "comment",
|
|
14
|
+
rows: 4
|
|
15
|
+
}) %>
|
|
16
|
+
|
|
17
|
+
<br/>
|
|
18
|
+
|
|
19
|
+
<%= pb_rails("textarea", props: {
|
|
20
|
+
label: "Both Container and Textarea IDs",
|
|
21
|
+
id: "container-id-2",
|
|
22
|
+
input_options: { id: "textarea-id-2" },
|
|
23
|
+
name: "comment",
|
|
24
|
+
rows: 4
|
|
25
|
+
}) %>
|
|
26
|
+
|
|
27
|
+
<br/>
|
|
28
|
+
|
|
29
|
+
<%= pb_rails("textarea", props: {
|
|
30
|
+
label: "Data and ARIA Attributes",
|
|
31
|
+
name: "description",
|
|
32
|
+
rows: 4,
|
|
33
|
+
input_options: {
|
|
34
|
+
'aria-label': "Enter description",
|
|
35
|
+
'aria-describedby': "help-text",
|
|
36
|
+
data: { controller: "textarea", action: "focus->handleFocus" },
|
|
37
|
+
id: "description-textarea"
|
|
38
|
+
}
|
|
39
|
+
}) %>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Use the `input_options` / `inputOptions` prop to pass additional attributes directly to the underlying `<textarea>` element instead of the outer wrapper. This is useful for applying data attributes, custom IDs, ARIA attributes, or other HTML attributes that need to be on the textarea element itself.
|
|
2
|
+
|
|
3
|
+
Additional HTML attributes (e.g. data or ARIA attributes) can also be passed directly to the `<textarea>` via `input_options`.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.0.0.pre.alpha.
|
|
4
|
+
version: 16.0.0.pre.alpha.PLAY267213609
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Power UX
|
|
@@ -100,8 +100,6 @@ files:
|
|
|
100
100
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.md
|
|
101
101
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx
|
|
102
102
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md
|
|
103
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.html.erb
|
|
104
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.md
|
|
105
103
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb
|
|
106
104
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx
|
|
107
105
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md
|
|
@@ -2324,6 +2322,8 @@ files:
|
|
|
2324
2322
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md
|
|
2325
2323
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_inline.html.erb
|
|
2326
2324
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_inline.jsx
|
|
2325
|
+
- app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.html.erb
|
|
2326
|
+
- app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.md
|
|
2327
2327
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md
|
|
2328
2328
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.html.erb
|
|
2329
2329
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.jsx
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.html.erb
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<% column_definitions = [
|
|
2
|
-
{
|
|
3
|
-
accessor: "year",
|
|
4
|
-
label: "Year",
|
|
5
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
accessor: "newEnrollments",
|
|
9
|
-
label: "New Enrollments",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
accessor: "scheduledMeetings",
|
|
13
|
-
label: "Scheduled Meetings",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
accessor: "attendanceRate",
|
|
17
|
-
label: "Attendance Rate",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
accessor: "completedClasses",
|
|
21
|
-
label: "Completed Classes",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
accessor: "classCompletionRate",
|
|
25
|
-
label: "Class Completion Rate",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
accessor: "graduatedStudents",
|
|
29
|
-
label: "Graduated Students",
|
|
30
|
-
}
|
|
31
|
-
] %>
|
|
32
|
-
|
|
33
|
-
<%= pb_rails("caption", props: { text: "Inline Row Loading - Demonstrated in Row 1 (Rows 2 and 3 have data)" }) %>
|
|
34
|
-
|
|
35
|
-
<%= pb_rails("advanced_table", props: {
|
|
36
|
-
id: "inline-loading-table-1",
|
|
37
|
-
table_data: @table_data_inline_loading,
|
|
38
|
-
column_definitions: column_definitions,
|
|
39
|
-
enable_toggle_expansion: "all",
|
|
40
|
-
inline_row_loading: true,
|
|
41
|
-
margin_bottom: "md"
|
|
42
|
-
}) %>
|
|
43
|
-
|
|
44
|
-
<%= pb_rails("caption", props: { text: "Inline Row Loading with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is not rendered" }) %>
|
|
45
|
-
|
|
46
|
-
<%= pb_rails("advanced_table", props: {
|
|
47
|
-
id: "inline-loading-table-2",
|
|
48
|
-
table_data: @table_data_inline_loading_empty_children,
|
|
49
|
-
column_definitions: column_definitions,
|
|
50
|
-
enable_toggle_expansion: "all",
|
|
51
|
-
inline_row_loading: true,
|
|
52
|
-
margin_bottom: "md"
|
|
53
|
-
}) %>
|
|
54
|
-
|
|
55
|
-
<%= pb_rails("caption", props: { text: "Inline Row Loading and Persist Toggle Expansion Button with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is rendered" }) %>
|
|
56
|
-
|
|
57
|
-
<%= pb_rails("advanced_table", props: {
|
|
58
|
-
id: "inline-loading-table-3",
|
|
59
|
-
table_data: @table_data_inline_loading_empty_children,
|
|
60
|
-
column_definitions: column_definitions,
|
|
61
|
-
enable_toggle_expansion: "all",
|
|
62
|
-
inline_row_loading: true,
|
|
63
|
-
persist_toggle_expansion_button: true
|
|
64
|
-
}) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
### inline_row_loading
|
|
2
|
-
By default, the kit assumes that the initial dataset is complete, rendering expansion controls only when children are present. If, however, you want to implement lazy-loading patterns where children are fetched only when a parent is expanded, use the `inline_row_loading` prop.
|
|
3
|
-
|
|
4
|
-
When `inline_row_loading` is set to `true`:
|
|
5
|
-
- Expansion controls are rendered for rows with empty `children` arrays (you must pass `children: []` to any row that will have children loaded later)
|
|
6
|
-
- When such a row is expanded, an inline loading indicator appears until the child data is loaded
|
|
7
|
-
- This enables lazy-loading patterns without one-off hacks
|
|
8
|
-
|
|
9
|
-
In the first table above, row "2021" has an empty `children` array. Click to expand it and see the inline loading state. Rows 2 and 3 have actual child data.
|
|
10
|
-
|
|
11
|
-
This prop is set to `false` by default.
|
|
12
|
-
|
|
13
|
-
### persist_toggle_expansion_button
|
|
14
|
-
The `persist_toggle_expansion_button` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
|
|
15
|
-
|
|
16
|
-
In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persist_toggle_expansion_button` in place. The third Advanced Table shows the toggle all button due to `persist_toggle_expansion_button`.
|
|
17
|
-
|
|
18
|
-
This prop is set to `false` by default and should only be used in conjunction with `inline_row_loading`.
|