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

remove unnecessary wrapper

ulferts55e5a52cb45f
diff --git a/app/components/projects/settings/life_cycles/step_component.html.erb b/app/components/projects/settings/life_cycles/step_component.html.erb
index 0e11abc46da..493c89621c3 100644
--- a/app/components/projects/settings/life_cycles/step_component.html.erb
+++ b/app/components/projects/settings/life_cycles/step_component.html.erb
@@ -1,37 +1,35 @@
<%=
- component_wrapper do
- flex_layout(align_items: :center,
- justify_content: :space_between) do |definition_container|
- definition_container.with_column(flex_layout: true) do |title_container|
- title_container.with_column(pt: 1, mr: 3) do
- render(Primer::Beta::Text.new) { definition.name }
- end
- title_container.with_column(pt: 1) do
- render(Projects::LifeCycleTypeComponent.new(definition))
- end
+ flex_layout(align_items: :center,
+ justify_content: :space_between) do |definition_container|
+ definition_container.with_column(flex_layout: true) do |title_container|
+ title_container.with_column(pt: 1, mr: 3) do
+ render(Primer::Beta::Text.new) { definition.name }
end
- # py: 1 quick fix: prevents the row from bouncing as the toggle switch currently changes height while toggling
- definition_container.with_column(py: 1, mr: 2) do
- # buggy currently:
- # small variant + status_label_position: :start leads to a small bounce while toggling
- # behavior can be seen on primer's viewbook as well -> https://view-components-storybook.eastus.cloudapp.azure.com/view-components/lookbook/inspect/primer/alpha/toggle_switch/small
- # quick fix: don't display loading indicator which is causing the bounce
- render(Primer::Alpha::ToggleSwitch.new(
- src: toggle_project_settings_life_cycle_path(
- project_life_cycle: {
- definition_id: definition.id,
- type: definition.type
- }
- ),
- csrf_token: form_authenticity_token,
- data: { test_selector: "toggle-project-life-cycle-#{definition.id}" },
- aria: { label: toggle_aria_label },
- checked: active_in_project?,
- size: :small,
- status_label_position: :start,
- classes: "op-primer-adjustments__toggle-switch--hidden-loading-indicator",
- ))
+ title_container.with_column(pt: 1) do
+ render(Projects::LifeCycleTypeComponent.new(definition))
end
end
+ # py: 1 quick fix: prevents the row from bouncing as the toggle switch currently changes height while toggling
+ definition_container.with_column(py: 1, mr: 2) do
+ # buggy currently:
+ # small variant + status_label_position: :start leads to a small bounce while toggling
+ # behavior can be seen on primer's viewbook as well -> https://view-components-storybook.eastus.cloudapp.azure.com/view-components/lookbook/inspect/primer/alpha/toggle_switch/small
+ # quick fix: don't display loading indicator which is causing the bounce
+ render(Primer::Alpha::ToggleSwitch.new(
+ src: toggle_project_settings_life_cycle_path(
+ project_life_cycle: {
+ definition_id: definition.id,
+ type: definition.type
+ }
+ ),
+ csrf_token: form_authenticity_token,
+ data: { test_selector: "toggle-project-life-cycle-#{definition.id}" },
+ aria: { label: toggle_aria_label },
+ checked: active_in_project?,
+ size: :small,
+ status_label_position: :start,
+ classes: "op-primer-adjustments__toggle-switch--hidden-loading-indicator",
+ ))
+ end
end
%>
diff --git a/app/components/projects/settings/life_cycles/step_component.rb b/app/components/projects/settings/life_cycles/step_component.rb
index 2642d5ab55e..c9faccce001 100644
--- a/app/components/projects/settings/life_cycles/step_component.rb
+++ b/app/components/projects/settings/life_cycles/step_component.rb
@@ -54,12 +54,6 @@ module Projects
def toggle_aria_label
I18n.t("projects.settings.life_cycle.step.use_in_project", step: definition.name)
end
-
- private
-
- def wrapper_uniq_by
- definition.id
- end
end
end
end