openproject-primer_view_components 0.40.0 → 0.41.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff9f0c72e9e37305fe52894e785773c8608e6c6716483145ebbb12874d1c7e57
4
- data.tar.gz: b8b5b507657c7824aa5eb714d51194f8c2273275c100f8000f06fa18e8f019da
3
+ metadata.gz: a378c7a5a9aa4f33d427d21fddb301b0dbe46e538447ee4376907a43a0c8a235
4
+ data.tar.gz: 13380df59b216e1a5cb953ef4c68e4101e03d1b99f3f2b81c0f0d727e90db3b2
5
5
  SHA512:
6
- metadata.gz: 943eb81e21e077dab36f19896866d95b91f612b022339aa54844341238616c4845002851cce92c0aad68f88209b4d7ab53563378ea7eeb82fe82003b5b28a9aa
7
- data.tar.gz: 800f37b7ad626d74ad1cc4aea0376170afb9f8d6e8629e6f9193ed3a1de05a8c19efcf46618b516114f6b95b56435eb0a45c79acca6a7e8f85b6d66e280d036a
6
+ metadata.gz: 420aa7dd1d778a2769be9ca66c2741b736154d55b1d8ebdddc3d1dac2f58e3285d78ad8593397de3d405a3adf714390c48392732176ee5165585db1ab1bfc73f
7
+ data.tar.gz: 176fb4d46710b64a9fcef77cb53cb7d3934267298b9a2219c38a84f9d16d11717a43b9efb96344a0f2db3225811faf3853edda2a427d7e34648e5b280507d330
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.41.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#159](https://github.com/opf/primer_view_components/pull/159) [`f2517d6`](https://github.com/opf/primer_view_components/commit/f2517d65708cff07bef5714e1af28c15fc49915e) Thanks [@oliverguenther](https://github.com/oliverguenther)! - Allow input_width on text_area
8
+
9
+ ## 0.41.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#149](https://github.com/opf/primer_view_components/pull/149) [`63cd602`](https://github.com/opf/primer_view_components/commit/63cd6022bc2dda79b602ebefcffe6f1e0ed1436f) Thanks [@HDinger](https://github.com/HDinger)! - Add support for an editable state of Primer::OpenProject::PageHeader
14
+
3
15
  ## 0.40.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,7 @@
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
+ <% if show_state? %>
3
+ <%= content %>
4
+ <% elsif editable_form.present? %>
5
+ <%= editable_form %>
6
+ <% end %>
7
+ <% end %>
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module OpenProject
5
+ class PageHeader
6
+ # A Helper class to create a Title inside the PageHeader title slot
7
+ # It should not be used standalone
8
+ class Title < Primer::Component
9
+ status :open_project
10
+
11
+ HEADING_TAG_OPTIONS = [:h1, :h2, :h3, :h4, :h5, :h6].freeze
12
+ HEADING_TAG_FALLBACK = :h1
13
+
14
+ renders_one :editable_form, lambda { |model: nil, update_path:, cancel_path:, input_name: :title, method: :put, label: I18n.t(:label_title), placeholder: I18n.t(:label_title), **system_arguments|
15
+ primer_form_with(
16
+ model: model,
17
+ method: method,
18
+ url: update_path,
19
+ **system_arguments
20
+ ) do |f|
21
+ render_inline_form(f) do |query_form|
22
+ query_form.group(layout: :horizontal) do |group|
23
+ group.text_field(
24
+ name: input_name,
25
+ placeholder: placeholder,
26
+ label: label,
27
+ visually_hide_label: true,
28
+ required: true,
29
+ autofocus: true
30
+ )
31
+
32
+ group.submit(name: :submit, label: I18n.t("button_save"), scheme: :primary)
33
+
34
+ group.button(
35
+ name: :cancel,
36
+ scheme: :secondary,
37
+ label: I18n.t(:button_cancel),
38
+ tag: :a,
39
+ data: { "turbo-stream": true },
40
+ href: cancel_path
41
+ )
42
+ end
43
+ end
44
+ end
45
+ }
46
+
47
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
48
+ def initialize(tag: HEADING_TAG_FALLBACK, state: Primer::OpenProject::PageHeader::STATE_DEFAULT, **system_arguments)
49
+ @system_arguments = system_arguments
50
+ @system_arguments[:tag] = fetch_or_fallback(HEADING_TAG_OPTIONS, tag, HEADING_TAG_FALLBACK)
51
+
52
+ @state = state
53
+ end
54
+
55
+ def render?
56
+ raise ArgumentError, "Please define form paramaters for the editable title" if !show_state? && !editable_form?
57
+
58
+ content? && (show_state? || editable_form?)
59
+ end
60
+
61
+ private
62
+
63
+ def show_state?
64
+ @state == Primer::OpenProject::PageHeader::STATE_DEFAULT
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -20,7 +20,7 @@
20
20
  <div class="PageHeader-titleBar">
21
21
  <%= leading_action %>
22
22
  <%= title %>
23
- <% if actions.any? %>
23
+ <% if actions.any? && show_state? %>
24
24
  <div class="PageHeader-actions">
25
25
  <% actions.each do |action| %>
26
26
  <%= action %>
@@ -4,9 +4,6 @@ module Primer
4
4
  module OpenProject
5
5
  # A ViewComponent PageHeader inspired by the primer react variant
6
6
  class PageHeader < Primer::Component
7
- HEADING_TAG_OPTIONS = [:h1, :h2, :h3, :h4, :h5, :h6].freeze
8
- HEADING_TAG_FALLBACK = :h1
9
-
10
7
  DEFAULT_HEADER_VARIANT = :medium
11
8
  HEADER_VARIANT_OPTIONS = [
12
9
  DEFAULT_HEADER_VARIANT,
@@ -27,21 +24,24 @@ module Primer
27
24
  DEFAULT_BREADCRUMBS_DISPLAY = [:none, :flex].freeze
28
25
  DEFAULT_PARENT_LINK_DISPLAY = [:block, :none].freeze
29
26
 
27
+ STATE_DEFAULT = :show
28
+ STATE_EDIT = :edit
29
+ STATE_OPTIONS = [STATE_DEFAULT, STATE_EDIT].freeze
30
+
30
31
  status :open_project
31
32
 
32
33
  # The title of the page header
33
34
  #
34
35
  # @param tag [Symbol] <%= one_of(Primer::Beta::Heading::TAG_OPTIONS) %>
35
36
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
36
- renders_one :title, lambda { |tag: HEADING_TAG_FALLBACK, variant: DEFAULT_HEADER_VARIANT, **system_arguments|
37
- system_arguments[:tag] = fetch_or_fallback(HEADING_TAG_OPTIONS, tag, HEADING_TAG_FALLBACK)
37
+ renders_one :title, lambda { |variant: DEFAULT_HEADER_VARIANT, **system_arguments|
38
38
  system_arguments[:classes] = class_names(
39
39
  system_arguments[:classes],
40
40
  "PageHeader-title",
41
41
  "PageHeader-title--#{variant}"
42
42
  )
43
43
 
44
- Primer::BaseComponent.new(**system_arguments)
44
+ Primer::OpenProject::PageHeader::Title.new(state: @state, **system_arguments)
45
45
  }
46
46
 
47
47
  # Optional description below the title row
@@ -235,7 +235,7 @@ module Primer
235
235
 
236
236
  # @param mobile_menu_label [String] The tooltip label of the mobile menu
237
237
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
238
- def initialize(mobile_menu_label: I18n.t("label_more"), **system_arguments)
238
+ def initialize(mobile_menu_label: I18n.t("label_more"), state: STATE_DEFAULT, **system_arguments)
239
239
  @system_arguments = deny_tag_argument(**system_arguments)
240
240
  @mobile_menu_label = mobile_menu_label
241
241
 
@@ -246,6 +246,8 @@ module Primer
246
246
  "PageHeader"
247
247
  )
248
248
 
249
+ @state = fetch_or_fallback(STATE_OPTIONS, state, STATE_DEFAULT)
250
+
249
251
  @mobile_action_menu = Primer::Alpha::ActionMenu.new(
250
252
  display: MOBILE_ACTIONS_DISPLAY,
251
253
  anchor_align: :end
@@ -263,6 +265,10 @@ module Primer
263
265
  actions.count > 1
264
266
  end
265
267
 
268
+ def show_state?
269
+ @state == STATE_DEFAULT
270
+ end
271
+
266
272
  private
267
273
 
268
274
  def set_action_arguments(system_arguments, scheme: nil)
@@ -10,8 +10,14 @@ module Primer
10
10
  @input = input
11
11
  @input.add_input_classes("FormControl-input", "FormControl-textarea")
12
12
 
13
+ wrap_classes = [
14
+ "FormControl-input-wrap",
15
+ ]
16
+
17
+ wrap_classes << Primer::Forms::Dsl::Input::INPUT_WIDTH_MAPPINGS[@input.input_width] if @input.input_width
18
+
13
19
  @field_wrap_arguments = {
14
- class: class_names("FormControl-input-wrap"),
20
+ class: class_names(wrap_classes),
15
21
  hidden: @input.hidden?
16
22
  }
17
23
  end
@@ -5,8 +5,8 @@ module Primer
5
5
  module ViewComponents
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 40
9
- PATCH = 0
8
+ MINOR = 41
9
+ PATCH = 1
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
12
12
  end
@@ -16,6 +16,7 @@ module Primer
16
16
  # @param disabled toggle
17
17
  # @param invalid toggle
18
18
  # @param validation_message text
19
+ # @param input_width [Symbol] select [auto, small, medium, large, xlarge, xxlarge]
19
20
  def playground(
20
21
  name: "my-text-area",
21
22
  id: "my-text-area",
@@ -26,7 +27,8 @@ module Primer
26
27
  full_width: true,
27
28
  disabled: false,
28
29
  invalid: false,
29
- validation_message: nil
30
+ validation_message: nil,
31
+ input_width: nil
30
32
  )
31
33
  system_arguments = {
32
34
  name: name,
@@ -38,7 +40,8 @@ module Primer
38
40
  full_width: full_width,
39
41
  disabled: disabled,
40
42
  invalid: invalid,
41
- validation_message: validation_message
43
+ validation_message: validation_message,
44
+ input_width: input_width
42
45
  }
43
46
 
44
47
  render(Primer::Alpha::TextArea.new(**system_arguments))
@@ -1,5 +1,37 @@
1
- <!-- Look at the "Assets" tab for the definition of the `CustomWidthFieldsForm` -->
1
+ <%
2
+ custom_width_form = Class.new(ApplicationForm) do
3
+ form do |f|
4
+ f.text_field(
5
+ name: :ultimate_answer,
6
+ label: "Ultimate answer",
7
+ required: true,
8
+ caption: "The answer to life, the universe, and everything",
9
+ input_width: :medium
10
+ )
11
+
12
+ f.select_list(
13
+ name: "cities",
14
+ label: "Cool cities",
15
+ caption: "Select your favorite!",
16
+ include_blank: true,
17
+ input_width: :small
18
+ ) do |city_list|
19
+ city_list.option(label: "Lopez Island", value: "lopez_island")
20
+ city_list.option(label: "Bellevue", value: "bellevue")
21
+ city_list.option(label: "Seattle", value: "seattle")
22
+ end
23
+
24
+ f.text_field(
25
+ name: :lots_of_text,
26
+ label: "Lots of text",
27
+ required: true,
28
+ caption: "What else do you need?",
29
+ input_width: :small
30
+ )
31
+ end
32
+ end
33
+ %>
2
34
 
3
35
  <%= primer_form_with(url: "/foo") do |f| %>
4
- <%= render(CustomWidthFieldsForm.new(f)) %>
36
+ <%= render(custom_width_form.new(f)) %>
5
37
  <% end %>
@@ -1,5 +1,10 @@
1
- <%= render Primer::OpenProject::PageHeader.new do |header| %>
2
- <%= header.with_title(variant: variant) { title } %>
1
+ <%= render Primer::OpenProject::PageHeader.new(state: in_edit_state ? :edit : :show) do |header| %>
2
+ <%= header.with_title(variant: variant) do |t| %>
3
+ <% if in_edit_state %>
4
+ <%= t.with_editable_form(model: nil, update_path: "/foo", cancel_path: "/bar") %>
5
+ <% end %>
6
+ <%= title %>
7
+ <% end %>
3
8
  <%= header.with_description { description } %>
4
9
  <%= header.with_leading_action(icon: with_leading_action, href: '#', 'aria-label': "A leading action") if with_leading_action && with_leading_action != :none %>
5
10
  <%= header.with_breadcrumbs(breadcrumb_items) %>
@@ -24,13 +24,15 @@ module Primer
24
24
  # @param with_leading_action [Symbol] octicon
25
25
  # @param with_actions [Boolean]
26
26
  # @param with_tab_nav [Boolean]
27
+ # @param in_edit_state [Boolean]
27
28
  def playground(
28
29
  variant: :medium,
29
30
  title: "Hello",
30
31
  description: "Last updated 5 minutes ago by XYZ.",
31
32
  with_leading_action: :"none",
32
33
  with_actions: true,
33
- with_tab_nav: false
34
+ with_tab_nav: false,
35
+ in_edit_state: false
34
36
  )
35
37
  breadcrumb_items = [{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"]
36
38
 
@@ -40,7 +42,8 @@ module Primer
40
42
  with_leading_action: with_leading_action,
41
43
  with_actions: with_actions,
42
44
  breadcrumb_items: breadcrumb_items,
43
- with_tab_nav: with_tab_nav })
45
+ with_tab_nav: with_tab_nav,
46
+ in_edit_state: in_edit_state })
44
47
  end
45
48
 
46
49
  # @label Large title
@@ -54,6 +57,18 @@ module Primer
54
57
  end
55
58
  end
56
59
 
60
+ # @label Editable title
61
+ def editable_title
62
+ breadcrumb_items = [{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"]
63
+ render(Primer::OpenProject::PageHeader.new(state: :edit)) do |header|
64
+ header.with_title do |title|
65
+ title.with_editable_form(model: nil, update_path: "/foo", cancel_path: "/bar")
66
+ "Hello"
67
+ end
68
+ header.with_breadcrumbs(breadcrumb_items)
69
+ end
70
+ end
71
+
57
72
  # @label With actions
58
73
  def actions
59
74
  render_with_template(locals: {})
@@ -5199,6 +5199,22 @@
5199
5199
  }
5200
5200
  ]
5201
5201
  },
5202
+ {
5203
+ "component": "OpenProject::PageHeader::Title",
5204
+ "status": "open_project",
5205
+ "a11y_reviewed": false,
5206
+ "short_name": "OpenProjectPageHeaderTitle",
5207
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/title.rb",
5208
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/title/default/",
5209
+ "parameters": [
5210
+ {
5211
+ "name": "system_arguments",
5212
+ "type": "Hash",
5213
+ "default": "N/A",
5214
+ "description": "[System arguments](/system-arguments)"
5215
+ }
5216
+ ]
5217
+ },
5202
5218
  {
5203
5219
  "component": "OpenProject::SidePanel",
5204
5220
  "status": "open_project",
@@ -125,6 +125,7 @@
125
125
  "Primer::OpenProject::PageHeader": "",
126
126
  "Primer::OpenProject::PageHeader::Dialog": "",
127
127
  "Primer::OpenProject::PageHeader::Menu": "",
128
+ "Primer::OpenProject::PageHeader::Title": "",
128
129
  "Primer::OpenProject::SidePanel": "",
129
130
  "Primer::OpenProject::SidePanel::Section": "",
130
131
  "Primer::OpenProject::SubHeader": "",
@@ -1479,25 +1479,34 @@
1479
1479
  "medium",
1480
1480
  "large"
1481
1481
  ],
1482
- "HEADING_TAG_FALLBACK": "h1",
1483
- "HEADING_TAG_OPTIONS": [
1484
- "h1",
1485
- "h2",
1486
- "h3",
1487
- "h4",
1488
- "h5",
1489
- "h6"
1490
- ],
1491
1482
  "MOBILE_ACTIONS_DISPLAY": [
1492
1483
  "flex",
1493
1484
  "none"
1494
1485
  ],
1495
- "Menu": "Primer::OpenProject::PageHeader::Menu"
1486
+ "Menu": "Primer::OpenProject::PageHeader::Menu",
1487
+ "STATE_DEFAULT": "show",
1488
+ "STATE_EDIT": "edit",
1489
+ "STATE_OPTIONS": [
1490
+ "show",
1491
+ "edit"
1492
+ ],
1493
+ "Title": "Primer::OpenProject::PageHeader::Title"
1496
1494
  },
1497
1495
  "Primer::OpenProject::PageHeader::Dialog": {
1498
1496
  },
1499
1497
  "Primer::OpenProject::PageHeader::Menu": {
1500
1498
  },
1499
+ "Primer::OpenProject::PageHeader::Title": {
1500
+ "HEADING_TAG_FALLBACK": "h1",
1501
+ "HEADING_TAG_OPTIONS": [
1502
+ "h1",
1503
+ "h2",
1504
+ "h3",
1505
+ "h4",
1506
+ "h5",
1507
+ "h6"
1508
+ ]
1509
+ },
1501
1510
  "Primer::OpenProject::SidePanel": {
1502
1511
  "Section": "Primer::OpenProject::SidePanel::Section"
1503
1512
  },
@@ -17796,6 +17796,19 @@
17796
17796
  ]
17797
17797
  }
17798
17798
  },
17799
+ {
17800
+ "preview_path": "primer/open_project/page_header/editable_title",
17801
+ "name": "editable_title",
17802
+ "snapshot": "false",
17803
+ "skip_rules": {
17804
+ "wont_fix": [
17805
+ "region"
17806
+ ],
17807
+ "will_fix": [
17808
+ "color-contrast"
17809
+ ]
17810
+ }
17811
+ },
17799
17812
  {
17800
17813
  "preview_path": "primer/open_project/page_header/actions",
17801
17814
  "name": "actions",
@@ -18024,6 +18037,46 @@
18024
18037
 
18025
18038
  ]
18026
18039
  },
18040
+ {
18041
+ "fully_qualified_name": "Primer::OpenProject::PageHeader::Title",
18042
+ "description": "A Helper class to create a Title inside the PageHeader title slot\nIt should not be used standalone",
18043
+ "accessibility_docs": null,
18044
+ "is_form_component": false,
18045
+ "is_published": true,
18046
+ "requires_js": false,
18047
+ "component": "OpenProject::PageHeader::Title",
18048
+ "status": "open_project",
18049
+ "a11y_reviewed": false,
18050
+ "short_name": "OpenProjectPageHeaderTitle",
18051
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/title.rb",
18052
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/title/default/",
18053
+ "parameters": [
18054
+ {
18055
+ "name": "system_arguments",
18056
+ "type": "Hash",
18057
+ "default": "N/A",
18058
+ "description": "{{link_to_system_arguments_docs}}"
18059
+ }
18060
+ ],
18061
+ "slots": [
18062
+ {
18063
+ "name": "editable_form",
18064
+ "description": null,
18065
+ "parameters": [
18066
+
18067
+ ]
18068
+ }
18069
+ ],
18070
+ "methods": [
18071
+
18072
+ ],
18073
+ "previews": [
18074
+
18075
+ ],
18076
+ "subcomponents": [
18077
+
18078
+ ]
18079
+ },
18027
18080
  {
18028
18081
  "fully_qualified_name": "Primer::OpenProject::SidePanel",
18029
18082
  "description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.",
data/static/previews.json CHANGED
@@ -5391,6 +5391,19 @@
5391
5391
  ]
5392
5392
  }
5393
5393
  },
5394
+ {
5395
+ "preview_path": "primer/open_project/page_header/editable_title",
5396
+ "name": "editable_title",
5397
+ "snapshot": "false",
5398
+ "skip_rules": {
5399
+ "wont_fix": [
5400
+ "region"
5401
+ ],
5402
+ "will_fix": [
5403
+ "color-contrast"
5404
+ ]
5405
+ }
5406
+ },
5394
5407
  {
5395
5408
  "preview_path": "primer/open_project/page_header/actions",
5396
5409
  "name": "actions",
data/static/statuses.json CHANGED
@@ -125,6 +125,7 @@
125
125
  "Primer::OpenProject::PageHeader": "open_project",
126
126
  "Primer::OpenProject::PageHeader::Dialog": "open_project",
127
127
  "Primer::OpenProject::PageHeader::Menu": "open_project",
128
+ "Primer::OpenProject::PageHeader::Title": "open_project",
128
129
  "Primer::OpenProject::SidePanel": "open_project",
129
130
  "Primer::OpenProject::SidePanel::Section": "open_project",
130
131
  "Primer::OpenProject::SubHeader": "open_project",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openproject-primer_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.41.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-07-29 00:00:00.000000000 Z
12
+ date: 2024-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -508,6 +508,8 @@ files:
508
508
  - app/components/primer/open_project/page_header.rb
509
509
  - app/components/primer/open_project/page_header/dialog.rb
510
510
  - app/components/primer/open_project/page_header/menu.rb
511
+ - app/components/primer/open_project/page_header/title.html.erb
512
+ - app/components/primer/open_project/page_header/title.rb
511
513
  - app/components/primer/open_project/page_header_element.d.ts
512
514
  - app/components/primer/open_project/page_header_element.js
513
515
  - app/components/primer/open_project/page_header_element.ts
@@ -566,7 +568,6 @@ files:
566
568
  - app/forms/check_box_group_form.rb
567
569
  - app/forms/check_box_with_nested_form.rb
568
570
  - app/forms/composed_form.rb
569
- - app/forms/custom_width_fields_form.rb
570
571
  - app/forms/example_toggle_switch_form.rb
571
572
  - app/forms/example_toggle_switch_form/example_field_caption.html.erb
572
573
  - app/forms/first_name_form.rb
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :nodoc:
4
- class CustomWidthFieldsForm < ApplicationForm
5
- form do |f|
6
- f.text_field(
7
- name: :ultimate_answer,
8
- label: "Ultimate answer",
9
- required: true,
10
- caption: "The answer to life, the universe, and everything",
11
- input_width: :medium
12
- )
13
-
14
- f.select_list(
15
- name: "cities",
16
- label: "Cool cities",
17
- caption: "Select your favorite!",
18
- include_blank: true,
19
- input_width: :small
20
- ) do |city_list|
21
- city_list.option(label: "Lopez Island", value: "lopez_island")
22
- city_list.option(label: "Bellevue", value: "bellevue")
23
- city_list.option(label: "Seattle", value: "seattle")
24
- end
25
- end
26
- end