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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Simplify styling
Klaus Zandersba1f3afb742f
diff --git a/app/components/_index.sass b/app/components/_index.sassindex a6a45cf8696..df5d51df72f 100644--- a/app/components/_index.sass+++ b/app/components/_index.sass@@ -5,4 +5,3 @@@import "filters_component"@import "projects/settings/project_custom_field_sections/index_component"@import "projects/row_component"-@import "queries/sort_by_component"diff --git a/app/components/queries/sort_by_component.sass b/app/components/queries/sort_by_component.sassdeleted file mode 100644index 7c84fe86937..00000000000--- a/app/components/queries/sort_by_component.sass+++ /dev/null@@ -1,7 +0,0 @@-@import 'helpers'--.op-configure-query-sort-field- flex: 1--.op-configure-query-sort-direction- flex: 0 0 64pxdiff --git a/app/components/queries/sort_by_field_component.html.erb b/app/components/queries/sort_by_field_component.html.erbindex 2f57f726327..38b96e71799 100644--- a/app/components/queries/sort_by_field_component.html.erb+++ b/app/components/queries/sort_by_field_component.html.erb@@ -1,10 +1,10 @@<%= render(Primer::OpenProject::FlexLayout.new(data: { "sort-by-config-target" => "inputRow" })) do |flex| %>- <% flex.with_column(class: "op-configure-query-sort-field") do %>+ <% flex.with_column(flex: 1) do %><%#- We are just using the classes of the primer component here, because when using the primer component, we cannot detach the input element from the form %><%#- The form="none" adds the input to a nonexistant form (as we do not have one with the ID="none" and thus the fields to not get appended to the query string %><%= select_tag 'sort_field', select_options, include_blank: true, form: "none", class: "FormControl-select FormControl-medium FormControl--fullWidth", data: { action: "change->sort-by-config#fieldChanged"} %><% end %>- <% flex.with_column(class: "op-configure-query-sort-direction") do %>+ <% flex.with_column do %><%= render(Primer::Alpha::SegmentedControl.new("aria-label": "Sort order", hide_labels: true, ml: 3)) do |sort_buttons| %><%#- The segmented control actions need to be included here as well as they do the visual styling of the currently selected option, just setting our action would remove their action %><% sort_buttons.with_item(icon: "sort-asc", label: "sort ascending", selected: order_asc?, data: { direction: 'asc', action: "click:segmented-control#select click->sort-by-config#fieldChanged"}) %>