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
[#61126] Remove redundant allow_hover_card attribute
Tobias Dillmannc45e69dcc267
diff --git a/app/components/shares/invite_user_form_component.html.erb b/app/components/shares/invite_user_form_component.html.erbindex f1bc280c58b..dea952c59aa 100644--- a/app/components/shares/invite_user_form_component.html.erb+++ b/app/components/shares/invite_user_form_component.html.erb@@ -10,7 +10,7 @@) do |form|grid_layout('invite-user-form', tag: :div) do |invite_form|invite_form.with_area('invitee') do- render(Shares::Invitee.new(form, allow_hover_cards:))+ render(Shares::Invitee.new(form))endinvite_form.with_area('permission') dodiff --git a/app/components/shares/invite_user_form_component.rb b/app/components/shares/invite_user_form_component.rbindex 07f5559506f..f8d40024bae 100644--- a/app/components/shares/invite_user_form_component.rb+++ b/app/components/shares/invite_user_form_component.rb@@ -32,15 +32,14 @@ module Sharesinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpers- attr_reader :entity, :strategy, :errors, :allow_hover_cards+ attr_reader :entity, :strategy, :errors- def initialize(strategy:, errors: nil, allow_hover_cards: false)+ def initialize(strategy:, errors: nil)super@strategy = strategy@entity = strategy.entity@errors = errors- @allow_hover_cards = allow_hover_cardsenddef new_sharediff --git a/app/components/shares/manage_shares_component.html.erb b/app/components/shares/manage_shares_component.html.erbindex f92a1105b67..4412dbce2ae 100644--- a/app/components/shares/manage_shares_component.html.erb+++ b/app/components/shares/manage_shares_component.html.erb@@ -1,7 +1,7 @@<%=if strategy.manageable?modal_content.with_row do- render(Shares::InviteUserFormComponent.new(strategy:, errors:, allow_hover_cards:))+ render(Shares::InviteUserFormComponent.new(strategy:, errors:))endend@@ -100,7 +100,7 @@endelsestrategy.shares.each do |share|- render(Shares::ShareRowComponent.new(share:, strategy:, container: border_box, allow_hover_cards:))+ render(Shares::ShareRowComponent.new(share:, strategy:, container: border_box))endendenddiff --git a/app/components/shares/manage_shares_component.rb b/app/components/shares/manage_shares_component.rbindex 22246aed01a..fa61c6afdd5 100644--- a/app/components/shares/manage_shares_component.rb+++ b/app/components/shares/manage_shares_component.rb@@ -36,7 +36,6 @@ module Sharesattr_reader :strategy,:entity,:errors,- :allow_hover_cards,:modal_contentdef initialize(strategy:, modal_content:, errors: nil)@@ -46,7 +45,6 @@ module Shares@entity = strategy.entity@errors = errors@modal_content = modal_content- @allow_hover_cards = strategy.allow_hover_cards?enddef self.wrapper_keydiff --git a/app/components/shares/share_row_component.html.erb b/app/components/shares/share_row_component.html.erbindex 47c931db3e7..b0a929c9d3c 100644--- a/app/components/shares/share_row_component.html.erb+++ b/app/components/shares/share_row_component.html.erb@@ -14,7 +14,7 @@user_row_grid.with_area(:avatar, tag: :div) dorender(Users::AvatarComponent.new(user: principal, show_name: false, size: :medium,- hover_card: { active: allow_hover_cards, target: :custom }))+ hover_card: { active: true }))enduser_row_grid.with_area(:user_details, tag: :div, classes: 'ellipsis') dodiff --git a/app/components/shares/share_row_component.rb b/app/components/shares/share_row_component.rbindex ae3b9845768..45df3ab20e0 100644--- a/app/components/shares/share_row_component.rb+++ b/app/components/shares/share_row_component.rb@@ -36,7 +36,7 @@ module Sharesinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpers- def initialize(share:, strategy:, container: nil, allow_hover_cards: false)+ def initialize(share:, strategy:, container: nil)super@share = share@@ -45,7 +45,6 @@ module Shares@principal = share.principal@available_roles = strategy.available_roles@container = container- @allow_hover_cards = allow_hover_cardsenddef wrapper_uniq_by@@ -54,7 +53,7 @@ module Sharesprivate- attr_reader :share, :entity, :principal, :container, :available_roles, :strategy, :allow_hover_cards+ attr_reader :share, :entity, :principal, :container, :available_roles, :strategydef share_editable?@share_editable ||= User.current != share.principal && sharing_manageable?diff --git a/app/forms/shares/invitee.rb b/app/forms/shares/invitee.rbindex c60ed79d1c3..d9bc3704304 100644--- a/app/forms/shares/invitee.rb+++ b/app/forms/shares/invitee.rb@@ -53,15 +53,14 @@ module SharesappendToComponent: true,disabled: @disabled,isOpenedInModal: true,- hoverCards: @allow_hover_cards+ hoverCards: true})end- def initialize(disabled: false, allow_hover_cards: false)+ def initialize(disabled: false)super()@disabled = disabled- @allow_hover_cards = allow_hover_cardsendendenddiff --git a/app/models/sharing_strategies/base_strategy.rb b/app/models/sharing_strategies/base_strategy.rbindex 25c00ff2e85..bff01d94d89 100644--- a/app/models/sharing_strategies/base_strategy.rb+++ b/app/models/sharing_strategies/base_strategy.rb@@ -50,10 +50,6 @@ module SharingStrategiesraise NotImplementedError, "Override in a subclass and return true if the current user can manage sharing"end- def allow_hover_cards?- raise NotImplementedError, "Override in a subclass and return true if hover cards should appear hovering users"- end-def create_contract_classraise NotImplementedError, "Override in a subclass and return the contract class for creating a share"enddiff --git a/app/models/sharing_strategies/project_query_strategy.rb b/app/models/sharing_strategies/project_query_strategy.rbindex 7a898438bb6..eb05b1970d7 100644--- a/app/models/sharing_strategies/project_query_strategy.rb+++ b/app/models/sharing_strategies/project_query_strategy.rb@@ -54,10 +54,6 @@ module SharingStrategies@entity.visible?end- def allow_hover_cards?- true- end-def create_contract_classShares::ProjectQueries::CreateContractenddiff --git a/app/models/sharing_strategies/work_package_strategy.rb b/app/models/sharing_strategies/work_package_strategy.rbindex 2c383a7cec2..556767dc08a 100644--- a/app/models/sharing_strategies/work_package_strategy.rb+++ b/app/models/sharing_strategies/work_package_strategy.rb@@ -53,10 +53,6 @@ module SharingStrategiesuser.allowed_in_project?(:view_shared_work_packages, @entity.project)end- def allow_hover_cards?- true- end-def share_description(share) # rubocop:disable Metrics/PerceivedComplexity,Metrics/AbcSizescope = %i[sharing user_details]