Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use Subheader component in project/xy/settings/project_custom_fields

Henriette Darge6bbe353ed7ec
diff --git a/app/components/projects/settings/project_custom_field_sections/index_component.html.erb b/app/components/projects/settings/project_custom_field_sections/index_component.html.erb
index 5da79313acf..6a85a391420 100644
--- a/app/components/projects/settings/project_custom_field_sections/index_component.html.erb
+++ b/app/components/projects/settings/project_custom_field_sections/index_component.html.erb
@@ -1,23 +1,24 @@
<%=
component_wrapper(data: wrapper_data_attributes) do
flex_layout do |flex|
- flex.with_row(mt: 3) do
- render(Primer::Alpha::TextField.new(
- name: "project-custom-fields-mapping-filter",
- label: t('projects.settings.project_custom_fields.filter.label'),
- visually_hide_label: true,
- placeholder: t('projects.settings.project_custom_fields.filter.label'),
- leading_visual: {
- icon: :search,
- size: :small
- },
- show_clear_button: true,
- clear_button_id: "project-custom-fields-mapping-filter-clear-button",
- data: {
- action: "input->projects--settings--project-custom-fields-mapping-filter#filterLists",
- "projects--settings--project-custom-fields-mapping-filter-target": "filter"
- }
- ))
+ flex.with_row do
+ render(Primer::OpenProject::SubHeader.new) do |subheader|
+ subheader.with_filter_input(name: "project-custom-fields-mapping-filter",
+ label: t('projects.settings.project_custom_fields.filter.label'),
+ visually_hide_label: true,
+ placeholder: t('projects.settings.project_custom_fields.filter.label'),
+ leading_visual: {
+ icon: :search,
+ size: :small
+ },
+ input_width: :xlarge,
+ show_clear_button: true,
+ clear_button_id: "project-custom-fields-mapping-filter-clear-button",
+ data: {
+ action: "input->projects--settings--project-custom-fields-mapping-filter#filterLists",
+ "projects--settings--project-custom-fields-mapping-filter-target": "filter"
+ })
+ end
end
@project_custom_field_sections.each do |project_custom_field_section|
diff --git a/app/components/projects/settings/project_custom_field_sections/show_component.html.erb b/app/components/projects/settings/project_custom_field_sections/show_component.html.erb
index 33c01da2fde..727d8901228 100644
--- a/app/components/projects/settings/project_custom_field_sections/show_component.html.erb
+++ b/app/components/projects/settings/project_custom_field_sections/show_component.html.erb
@@ -1,6 +1,6 @@
<%=
component_wrapper do
- render(border_box_container(mt: 3, classes: 'op-project-custom-field-section', data: {
+ render(border_box_container(mb: 3, classes: 'op-project-custom-field-section', data: {
test_selector: "project-custom-field-section-#{@project_custom_field_section.id}"
})) do |component|
component.with_header(font_weight: :bold, py: 2) do