Skip to content

Commit 4ba92f5

Browse files
Enable use_experimental_non_local_form for all SelectPanels (#3713)
1 parent ec84a01 commit 4ba92f5

5 files changed

Lines changed: 12 additions & 24 deletions

File tree

.changeset/cyan-readers-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/view-components': minor
3+
---
4+
5+
Enable use_experimental_non_local_form for all SelectPanels

app/components/primer/alpha/select_panel.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,7 @@ def with_avatar_item(**system_arguments)
354354
# @param dynamic_aria_label_prefix [String] If provided, the prefix is prepended to the dynamic label and set as the value of the `aria-label` attribute on the show button.
355355
# @param body_id [String] The unique ID of the panel body. If not provided, the body ID will be set to the panel ID with a "-body" suffix.
356356
# @param list_arguments [Hash] Arguments to pass to the underlying <%= link_to_component(Primer::Alpha::ActionList) %> component. Only has an effect for the local fetch strategy.
357-
# @param form_arguments [Hash] Form arguments. Supported for `local`, and experimentally supported for `remote` and `eventually_local` strategies by enabling the `use_experimental_non_local_form` flag.
358-
# @param use_experimental_non_local_form [Boolean] A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values. At this time, support is only available for the :single select variant. See: https://github.com/github/primer/issues/4923.
357+
# @param form_arguments [Hash] Form arguments. Supported for all fetch strategies.
359358
# @param show_filter [Boolean] Whether or not to show the filter input.
360359
# @param open_on_load [Boolean] Open the panel when the page loads.
361360
# @param anchor_align [Symbol] The anchor alignment of the Overlay. <%= one_of(Primer::Alpha::Overlay::ANCHOR_ALIGN_OPTIONS) %>
@@ -377,7 +376,6 @@ def initialize(
377376
dynamic_label_prefix: nil,
378377
dynamic_aria_label_prefix: nil,
379378
body_id: nil,
380-
use_experimental_non_local_form: false,
381379
list_arguments: {},
382380
form_arguments: {},
383381
show_filter: true,
@@ -411,13 +409,11 @@ def initialize(
411409
@loading_label = loading_label
412410
@loading_description_id = nil
413411

414-
if use_experimental_non_local_form
415-
@form_builder = form_arguments[:builder]
416-
@value = form_arguments[:value]
417-
@input_name = form_arguments[:name]
418-
end
412+
@form_builder = form_arguments[:builder]
413+
@value = form_arguments[:value]
414+
@input_name = form_arguments[:name]
419415

420-
@list_form_arguments = use_experimental_non_local_form ? {} : form_arguments
416+
@list_form_arguments = {}
421417

422418
if loading_description.present?
423419
@loading_description_id = "#{@panel_id}-loading-description"

previews/primer/alpha/select_panel_preview/remote_fetch_form.html.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
open_on_load: open_on_load,
1212
dynamic_label: true,
1313
dynamic_label_prefix: "Item",
14-
use_experimental_non_local_form: true,
1514
form_arguments: {
1615
name: :item,
1716
builder: builder,

static/arguments.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,13 +2502,7 @@
25022502
"name": "form_arguments",
25032503
"type": "Hash",
25042504
"default": "`{}`",
2505-
"description": "Form arguments. Supported for `local`, and experimentally supported for `remote` and `eventually_local` strategies by enabling the `use_experimental_non_local_form` flag."
2506-
},
2507-
{
2508-
"name": "use_experimental_non_local_form",
2509-
"type": "Boolean",
2510-
"default": "`false`",
2511-
"description": "A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values. At this time, support is only available for the :single select variant. See: https://github.com/github/primer/issues/4923."
2505+
"description": "Form arguments. Supported for all fetch strategies."
25122506
},
25132507
{
25142508
"name": "show_filter",

static/info_arch.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7358,13 +7358,7 @@
73587358
"name": "form_arguments",
73597359
"type": "Hash",
73607360
"default": "`{}`",
7361-
"description": "Form arguments. Supported for `local`, and experimentally supported for `remote` and `eventually_local` strategies by enabling the `use_experimental_non_local_form` flag."
7362-
},
7363-
{
7364-
"name": "use_experimental_non_local_form",
7365-
"type": "Boolean",
7366-
"default": "`false`",
7367-
"description": "A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values. At this time, support is only available for the :single select variant. See: https://github.com/github/primer/issues/4923."
7361+
"description": "Form arguments. Supported for all fetch strategies."
73687362
},
73697363
{
73707364
"name": "show_filter",

0 commit comments

Comments
 (0)