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
Update the primer_view_components repo and make small adjustements to the meeting agende item since "justify_self" is not supported any more
Henriette Dargec53ada69153a
diff --git a/Gemfile b/Gemfileindex 287ca1091b7..e1b22f6477c 100644--- a/Gemfile+++ b/Gemfile@@ -364,6 +364,6 @@ gemfiles.each do |file|send(:eval_gemfile, file) if File.readable?(file)end-gem "openproject-primer_view_components", '~>0.11.0'+gem "openproject-primer_view_components", '~>0.12.1'gem "openproject-octicons", '~>19.7.0'gem "openproject-octicons_helper", '~>19.7.0'diff --git a/Gemfile.lock b/Gemfile.lockindex d298ed94f06..1dd99aeec3c 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -680,7 +680,7 @@ GEMactionviewopenproject-octicons (= 19.7.0)railties- openproject-primer_view_components (0.11.0)+ openproject-primer_view_components (0.12.1)actionview (>= 5.0.0)activesupport (>= 5.0.0)openproject-octicons (>= 19.7.0)@@ -1118,7 +1118,7 @@ DEPENDENCIESopenproject-octicons (~> 19.7.0)openproject-octicons_helper (~> 19.7.0)openproject-openid_connect!- openproject-primer_view_components (~> 0.11.0)+ openproject-primer_view_components (~> 0.12.1)openproject-recaptcha!openproject-reporting!openproject-storages!diff --git a/app/components/op_primer/component_helpers.rb b/app/components/op_primer/component_helpers.rbindex 4e12424aabe..79b290a9ea4 100644--- a/app/components/op_primer/component_helpers.rb+++ b/app/components/op_primer/component_helpers.rb@@ -29,11 +29,11 @@module OpPrimermodule ComponentHelpersdef flex_layout(**, &)- render(OpPrimer::FlexLayoutComponent.new(**), &)+ render(Primer::OpenProject::FlexLayout.new(**), &)enddef grid_layout(css_class, **, &)- render(OpPrimer::GridLayoutComponent.new(css_class, **), &)+ render(Primer::OpenProject::GridLayout.new(css_class:, **), &)enddef box_collection(**, &)diff --git a/app/components/op_primer/flex_layout_component.html.erb b/app/components/op_primer/flex_layout_component.html.erbdeleted file mode 100644index 24ee01a5f10..00000000000--- a/app/components/op_primer/flex_layout_component.html.erb+++ /dev/null@@ -1,52 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 2012-2023 the OpenProject GmbH--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License version 3.--OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-Copyright (C) 2006-2013 Jean-Philippe Lang-Copyright (C) 2010-2013 the ChiliProject Team--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License-as published by the Free Software Foundation; either version 2-of the License, or (at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program; if not, write to the Free Software-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.--See COPYRIGHT and LICENSE files for more details.--++#%>-<% if rows.any? %>- <%= render(Primer::Box.new(**@system_arguments.merge(direction: :column))) do %>- <% rows.each do |row| %>- <%= row %>- <% end %>- <% end %>-<% end %>--<% if columns.any? %>- <%= render(Primer::Box.new(**@system_arguments.merge(direction: :row))) do %>- <% columns.each do |column| %>- <%= column %>- <% end %>- <% end %>-<% end %>--<% if boxes.any? %>- <%= render(Primer::Box.new(**@system_arguments)) do %>- <% boxes.each do |box| %>- <%= box %>- <% end %>- <% end %>-<% end %>-diff --git a/app/components/op_primer/flex_layout_component.rb b/app/components/op_primer/flex_layout_component.rbdeleted file mode 100644index 352da84a47d..00000000000--- a/app/components/op_primer/flex_layout_component.rb+++ /dev/null@@ -1,72 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2023 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++--module OpPrimer- class FlexLayoutComponent < Primer::Component- def initialize(**)- super-- @system_arguments = deny_tag_argument(**) || {}- @system_arguments[:display] = :flex- end-- renders_many :rows, lambda { |**system_arguments, &block|- child_component(system_arguments, &block)- }- renders_many :columns, lambda { |**system_arguments, &block|- child_component(system_arguments, &block)- }- # boxes are used when direction is set to row or column based on responsive breakpoints- renders_many :boxes, lambda { |**system_arguments, &block|- child_component(system_arguments, &block)- }-- private-- def render?- if rows.empty? && columns.empty? && boxes.empty?- # no slot provided- raise ArgumentError, "You have to provide either rows, columns or boxes as a slot"- elsif [rows, columns, boxes].count { |arr| !arr.empty? } == 1- # only rows or columns or boxes are used- true- else- # rows, columns and boxes are used together, which is not allowed- raise ArgumentError, "You can't mix row, column and box slots"- end- end-- def child_component(system_arguments, &)- if system_arguments[:flex_layout] == true- OpPrimer::FlexLayoutComponent.new(**system_arguments.except(:flex_layout), &)- else- Primer::Box.new(**system_arguments || {})- end- end- end-enddiff --git a/app/components/op_primer/grid_layout_component.html.erb b/app/components/op_primer/grid_layout_component.html.erbdeleted file mode 100644index 00c04d97610..00000000000--- a/app/components/op_primer/grid_layout_component.html.erb+++ /dev/null@@ -1,40 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 2012-2023 the OpenProject GmbH--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License version 3.--OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-Copyright (C) 2006-2013 Jean-Philippe Lang-Copyright (C) 2010-2013 the ChiliProject Team--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License-as published by the Free Software Foundation; either version 2-of the License, or (at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program; if not, write to the Free Software-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.--See COPYRIGHT and LICENSE files for more details.--++#%>-<% if @system_arguments[:tag] %>- <%= render Primer::BaseComponent.new(**@system_arguments) do %>- <% areas.each do |row| %>- <%= row %>- <% end %>- <% end %>-<% else %>- <% areas.each do |row| %>- <%= row %>- <% end %>--<% end %>diff --git a/app/components/op_primer/grid_layout_component.rb b/app/components/op_primer/grid_layout_component.rbdeleted file mode 100644index cf127a5b298..00000000000--- a/app/components/op_primer/grid_layout_component.rb+++ /dev/null@@ -1,58 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2023 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++--module OpPrimer- class GridLayoutComponent < Primer::Component- attr_reader :css_class-- def initialize(css_class, **args)- super-- @css_class = css_class- @system_arguments = args- @system_arguments[:classes] = class_names(- @system_arguments[:classes],- css_class- )- end-- renders_many :areas, lambda { |area_name, component = ::Primer::BaseComponent, **sysargs, &block|- styles = [- "grid-area: #{area_name}",- sysargs[:justify_self] ? "justify-self: #{sysargs[:justify_self]}" : nil,- ]- sysargs[:style] = join_style_arguments(sysargs[:style], *styles)- sysargs[:classes] = class_names(- sysargs[:classes],- "#{css_class}--#{area_name}"- )-- render(component.new(**sysargs), &block)- }- end-enddiff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex d08cbb3e477..0aa5fb09697 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -46,7 +46,7 @@"@ngneat/content-loader": "^7.0.0","@ngx-formly/core": "^6.1.4","@openproject/octicons-angular": "^19.7.0",- "@openproject/primer-view-components": "^0.11.0",+ "@openproject/primer-view-components": "^0.12.1","@openproject/reactivestates": "^3.0.1","@primer/css": "^21.0.2","@uirouter/angular": "^12.0.0",@@ -5494,9 +5494,9 @@}},"node_modules/@oddbird/popover-polyfill": {- "version": "0.2.2",- "resolved": "https://registry.npmjs.org/@oddbird/popover-polyfill/-/popover-polyfill-0.2.2.tgz",- "integrity": "sha512-ko7x+PDZA9bHwA6hSfxjL1IhBP91JukfZq/NAe85u9rT0akFn9RKvSXymX/mS7S2mfNjE+Zw9JdLUPGvPabQAA=="+ "version": "0.2.3",+ "resolved": "https://registry.npmjs.org/@oddbird/popover-polyfill/-/popover-polyfill-0.2.3.tgz",+ "integrity": "sha512-XDK+V/gUeE4NEsWp79eVzhlK3wuVcRDJuaas63qo0IJLJpyOLHqycJLFYvuq8kebgT1nl87P3sbSb5ZN6Vyf5g=="},"node_modules/@openproject/octicons-angular": {"version": "19.7.0",@@ -5513,9 +5513,9 @@}},"node_modules/@openproject/primer-view-components": {- "version": "0.11.0",- "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.11.0.tgz",- "integrity": "sha512-C99NGJNBvXM+3hB7mIb7z8LcCYJD66YuavWuyTXj7syN0w59AhxUo8L3wYQrOMCFJJqL4O8o3cttUAChVDKDFQ==",+ "version": "0.12.1",+ "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.12.1.tgz",+ "integrity": "sha512-GE8hjVjLijUHJ6PE6UUNpUuSImkSUGighUe/Aprq9wKuG++Jztsnt/jxlhW6sA1X/t6xYsXHFM7/aNpUoctasg==","dependencies": {"@github/auto-check-element": "^5.2.0","@github/auto-complete-element": "^3.3.4",@@ -5526,7 +5526,7 @@"@github/include-fragment-element": "^6.1.1","@github/relative-time-element": "^4.0.0","@github/tab-container-element": "^3.1.2",- "@oddbird/popover-polyfill": "^0.2.1",+ "@oddbird/popover-polyfill": "^0.2.3","@primer/behaviors": "^1.3.4"}},@@ -5598,9 +5598,9 @@},"node_modules/@primer/view-components": {"name": "@openproject/primer-view-components",- "version": "0.11.0",- "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.11.0.tgz",- "integrity": "sha512-C99NGJNBvXM+3hB7mIb7z8LcCYJD66YuavWuyTXj7syN0w59AhxUo8L3wYQrOMCFJJqL4O8o3cttUAChVDKDFQ==",+ "version": "0.12.1",+ "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.12.1.tgz",+ "integrity": "sha512-GE8hjVjLijUHJ6PE6UUNpUuSImkSUGighUe/Aprq9wKuG++Jztsnt/jxlhW6sA1X/t6xYsXHFM7/aNpUoctasg==","dependencies": {"@github/auto-check-element": "^5.2.0","@github/auto-complete-element": "^3.3.4",@@ -5611,7 +5611,7 @@"@github/include-fragment-element": "^6.1.1","@github/relative-time-element": "^4.0.0","@github/tab-container-element": "^3.1.2",- "@oddbird/popover-polyfill": "^0.2.1",+ "@oddbird/popover-polyfill": "^0.2.3","@primer/behaviors": "^1.3.4"}},@@ -34774,9 +34774,9 @@"optional": true},"@oddbird/popover-polyfill": {- "version": "0.2.2",- "resolved": "https://registry.npmjs.org/@oddbird/popover-polyfill/-/popover-polyfill-0.2.2.tgz",- "integrity": "sha512-ko7x+PDZA9bHwA6hSfxjL1IhBP91JukfZq/NAe85u9rT0akFn9RKvSXymX/mS7S2mfNjE+Zw9JdLUPGvPabQAA=="+ "version": "0.2.3",+ "resolved": "https://registry.npmjs.org/@oddbird/popover-polyfill/-/popover-polyfill-0.2.3.tgz",+ "integrity": "sha512-XDK+V/gUeE4NEsWp79eVzhlK3wuVcRDJuaas63qo0IJLJpyOLHqycJLFYvuq8kebgT1nl87P3sbSb5ZN6Vyf5g=="},"@openproject/octicons-angular": {"version": "19.7.0",@@ -34787,9 +34787,9 @@}},"@openproject/primer-view-components": {- "version": "0.11.0",- "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.11.0.tgz",- "integrity": "sha512-C99NGJNBvXM+3hB7mIb7z8LcCYJD66YuavWuyTXj7syN0w59AhxUo8L3wYQrOMCFJJqL4O8o3cttUAChVDKDFQ==",+ "version": "0.12.1",+ "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.12.1.tgz",+ "integrity": "sha512-GE8hjVjLijUHJ6PE6UUNpUuSImkSUGighUe/Aprq9wKuG++Jztsnt/jxlhW6sA1X/t6xYsXHFM7/aNpUoctasg==","requires": {"@github/auto-check-element": "^5.2.0","@github/auto-complete-element": "^3.3.4",@@ -34800,7 +34800,7 @@"@github/include-fragment-element": "^6.1.1","@github/relative-time-element": "^4.0.0","@github/tab-container-element": "^3.1.2",- "@oddbird/popover-polyfill": "^0.2.1",+ "@oddbird/popover-polyfill": "^0.2.3","@primer/behaviors": "^1.3.4"}},@@ -34845,7 +34845,7 @@"integrity": "sha512-kk0TfLqtGwGYJ/qXGLMXDIL4d3qWPjlEB12Hvk08krulbsQRWEsnXjejBIvJG69GyOOuYxXNoHvP2NGenxQ8Jw==","requires": {"@primer/primitives": "^7.12.0",- "@primer/view-components": "npm:@openproject/primer-view-components@^0.11.0"+ "@primer/view-components": "npm:@openproject/primer-view-components@^0.12.1"}},"@primer/primitives": {@@ -34854,9 +34854,9 @@"integrity": "sha512-QKNxfWm7Ik1Ulswyp3KeUL2xnQj8i0E7DdB6lOrh29o7LgyuutwcOHi4CGapBIOR1fYURu+yROSTHQ2C2aDK7A=="},"@primer/view-components": {- "version": "npm:@openproject/[email protected]",- "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.11.0.tgz",- "integrity": "sha512-C99NGJNBvXM+3hB7mIb7z8LcCYJD66YuavWuyTXj7syN0w59AhxUo8L3wYQrOMCFJJqL4O8o3cttUAChVDKDFQ==",+ "version": "npm:@openproject/[email protected]",+ "resolved": "https://registry.npmjs.org/@openproject/primer-view-components/-/primer-view-components-0.12.1.tgz",+ "integrity": "sha512-GE8hjVjLijUHJ6PE6UUNpUuSImkSUGighUe/Aprq9wKuG++Jztsnt/jxlhW6sA1X/t6xYsXHFM7/aNpUoctasg==","requires": {"@github/auto-check-element": "^5.2.0","@github/auto-complete-element": "^3.3.4",@@ -34867,7 +34867,7 @@"@github/include-fragment-element": "^6.1.1","@github/relative-time-element": "^4.0.0","@github/tab-container-element": "^3.1.2",- "@oddbird/popover-polyfill": "^0.2.1",+ "@oddbird/popover-polyfill": "^0.2.3","@primer/behaviors": "^1.3.4"}},diff --git a/frontend/package.json b/frontend/package.jsonindex 997234e4db8..d37a5524145 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -118,7 +118,7 @@"@ngneat/content-loader": "^7.0.0","@ngx-formly/core": "^6.1.4","@openproject/octicons-angular": "^19.7.0",- "@openproject/primer-view-components": "^0.11.0",+ "@openproject/primer-view-components": "^0.12.1","@openproject/reactivestates": "^3.0.1","@primer/css": "^21.0.2","@uirouter/angular": "^12.0.0",@@ -198,6 +198,6 @@"storybook:build": "ng run OpenProject:build-storybook"},"overrides": {- "@primer/view-components": "npm:@openproject/primer-view-components@^0.11.0"+ "@primer/view-components": "npm:@openproject/primer-view-components@^0.12.1"}}diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erbindex 8b1fbb3b6ab..5968bee40b2 100644--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb@@ -51,7 +51,7 @@flex.with_column dorender(Primer::Beta::Text.new(color: :subtle, mr: 1)) { t("label_added_by", author: nil) }end- flex.with_column do+ flex.with_column(classes: 'ellipsis') dorender(Users::AvatarComponent.new(user: @meeting_agenda_item.author, size: 'mini', title:, classes: 'op-principal_flex'))endenddiff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sassindex f56fae6f3b3..6e3ff6bb96b 100644--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass@@ -1,8 +1,10 @@@import 'helpers'+$meeting-agenda-item--author-width: 300px+.op-meeting-agenda-itemdisplay: grid- grid-template-columns: 20px auto 1fr minmax(auto, 200px) 40px+ grid-template-columns: 20px auto 1fr minmax(auto, $meeting-agenda-item--author-width) 40pxgrid-template-areas: "drag-handle content duration author actions" ". notes notes notes notes"&--drag-handle,@@ -11,12 +13,16 @@&--authoralign-self: center- &--duration- white-space: nowrap-&--actionsjustify-self: end+ &--author+ max-width: $meeting-agenda-item--author-width+ justify-self: end++ &--duration+ white-space: nowrap+&--content@include text-shortener