Skip to content

Commit

Permalink
Merge branch 'dev' into implementation/59721-add-setedit-reminder-but…
Browse files Browse the repository at this point in the history
…tondialog-to-workpackage-page
  • Loading branch information
akabiru authored Dec 4, 2024
2 parents 8c08239 + 300ce15 commit 5dc51a9
Show file tree
Hide file tree
Showing 234 changed files with 2,261 additions and 997 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ gem "friendly_id", "~> 5.5.0"

gem "acts_as_list", "~> 1.2.0"
gem "acts_as_tree", "~> 2.9.0"
gem "awesome_nested_set", "~> 3.7.0"
gem "awesome_nested_set", "~> 3.8.0"
gem "closure_tree", "~> 7.4.0"
gem "rubytree", "~> 2.1.0"
# Only used in down migrations now.
Expand Down Expand Up @@ -140,7 +140,7 @@ gem "rack-attack", "~> 6.7.0"
gem "secure_headers", "~> 7.0.0"

# Browser detection for incompatibility checks
gem "browser", "~> 6.0.0"
gem "browser", "~> 6.1.0"

# Providing health checks
gem "okcomputer", "~> 1.18.1"
Expand Down
67 changes: 34 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ PATH
remote: modules/two_factor_authentication
specs:
openproject-two_factor_authentication (1.0.0)
aws-sdk-sns (~> 1.90.0)
aws-sdk-sns (~> 1.92.0)
messagebird-rest (~> 1.4.2)
rotp (~> 6.1)
webauthn (~> 3.0)
Expand Down Expand Up @@ -341,10 +341,10 @@ GEM
attr_required (1.0.2)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
awesome_nested_set (3.7.0)
activerecord (>= 4.0.0, < 8.0)
awesome_nested_set (3.8.0)
activerecord (>= 4.0.0, < 8.1)
aws-eventstream (1.3.0)
aws-partitions (1.1015.0)
aws-partitions (1.1017.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand All @@ -353,11 +353,11 @@ GEM
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.175.0)
aws-sdk-s3 (1.176.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-sns (1.90.0)
aws-sdk-sns (1.92.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.1)
Expand Down Expand Up @@ -391,7 +391,7 @@ GEM
msgpack (~> 1.2)
brakeman (6.2.2)
racc
browser (6.0.0)
browser (6.1.0)
builder (3.3.0)
byebug (11.1.3)
capybara (3.40.0)
Expand Down Expand Up @@ -449,7 +449,7 @@ GEM
ferrum (~> 0.15.0)
daemons (1.4.1)
dalli (3.2.8)
date (3.4.0)
date (3.4.1)
date_validator (0.12.0)
activemodel (>= 3)
activesupport (>= 3)
Expand Down Expand Up @@ -545,20 +545,20 @@ GEM
tzinfo
eventmachine (1.2.7)
eventmachine_httpserver (0.2.1)
excon (1.2.0)
excon (1.2.2)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.4)
factory_bot (~> 6.5)
railties (>= 5.0.0)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
faraday (2.12.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.3.0)
net-http
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
fastimage (2.3.1)
ferrum (0.15)
addressable (~> 2.5)
Expand Down Expand Up @@ -681,7 +681,7 @@ GEM
reline (>= 0.4.2)
iso8601 (0.13.0)
jmespath (1.6.2)
json (2.8.2)
json (2.9.0)
json-jwt (1.16.7)
activesupport (>= 4.2)
aes_key_wrap
Expand All @@ -707,7 +707,7 @@ GEM
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
lefthook (1.8.4)
lefthook (1.8.5)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
letter_opener_web (3.0.0)
Expand All @@ -722,7 +722,7 @@ GEM
omniauth (~> 1.1)
omniauth-openid-connect (>= 0.2.1)
rails (>= 3.2.21)
logger (1.6.1)
logger (1.6.2)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
Expand Down Expand Up @@ -762,15 +762,15 @@ GEM
mini_magick (5.0.1)
mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.1)
minitest (5.25.2)
msgpack (1.7.5)
multi_json (1.15.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
mustermann-grape (1.1.0)
mustermann (>= 1.0.0)
mutex_m (0.3.0)
net-http (0.4.1)
net-http (0.6.0)
uri
net-imap (0.5.1)
date
Expand All @@ -783,7 +783,7 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.16.7)
nokogiri (1.16.8)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oj (3.16.7)
Expand Down Expand Up @@ -868,7 +868,8 @@ GEM
pry-rescue (1.6.0)
interception (>= 0.5)
pry (>= 0.12.0)
psych (5.2.0)
psych (5.2.1)
date
stringio
public_suffix (6.0.1)
puffing-billy (4.0.0)
Expand Down Expand Up @@ -935,9 +936,9 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
nokogiri (~> 1.14)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
Expand All @@ -954,7 +955,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rb_sys (0.9.102)
rb_sys (0.9.103)
rbtrace (0.5.1)
ffi (>= 1.0.6)
msgpack (>= 0.4.3)
Expand All @@ -968,8 +969,8 @@ GEM
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.11)
regexp_parser (2.9.3)
reline (0.5.12)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
Expand Down Expand Up @@ -1012,14 +1013,14 @@ GEM
rspec-support (3.13.1)
rspec-wait (1.0.1)
rspec (>= 3.4)
rubocop (1.69.0)
rubocop (1.69.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.36.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
Expand Down Expand Up @@ -1064,7 +1065,7 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
secure_headers (7.0.0)
securerandom (0.3.2)
securerandom (0.4.0)
selenium-devtools (0.131.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.27.0)
Expand Down Expand Up @@ -1143,7 +1144,7 @@ GEM
tzinfo (>= 1.0.0)
uber (0.1.0)
unicode-display_width (2.6.0)
uri (0.13.1)
uri (1.0.2)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
Expand Down Expand Up @@ -1181,7 +1182,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.9.0)
webrick (1.9.1)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -1210,14 +1211,14 @@ DEPENDENCIES
airbrake (~> 13.0.0)
appsignal (~> 3.10.0)
auto_strip_attributes (~> 2.5)
awesome_nested_set (~> 3.7.0)
awesome_nested_set (~> 3.8.0)
aws-sdk-core (~> 3.107)
aws-sdk-s3 (~> 1.91)
axe-core-rspec
bcrypt (~> 3.1.6)
bootsnap (~> 1.18.0)
brakeman (~> 6.2.0)
browser (~> 6.0.0)
browser (~> 6.1.0)
budgets!
capybara (~> 3.40.0)
capybara-screenshot (~> 1.0.17)
Expand Down
Binary file modified app/assets/images/lookbook/hover_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/lookbook/user_hover_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/components/_index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
@import "op_primer/border_box_table_component"
@import "work_packages/exports/modal_dialog_component"
@import "work_package_relations_tab/index_component"
@import "users/hover_card_component"
2 changes: 1 addition & 1 deletion app/components/shares/invite_user_form_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
render(Shares::Invitee.new(form, allow_hover_cards:))
end

invite_form.with_area('permission') do
Expand Down
5 changes: 3 additions & 2 deletions app/components/shares/invite_user_form_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ class InviteUserFormComponent < ApplicationComponent # rubocop:disable OpenProje
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers

attr_reader :entity, :strategy, :errors
attr_reader :entity, :strategy, :errors, :allow_hover_cards

def initialize(strategy:, errors: nil)
def initialize(strategy:, errors: nil, allow_hover_cards: false)
super

@strategy = strategy
@entity = strategy.entity
@errors = errors
@allow_hover_cards = allow_hover_cards
end

def new_share
Expand Down
9 changes: 7 additions & 2 deletions app/components/shares/manage_shares_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%=
if strategy.manageable?
modal_content.with_row do
render(Shares::InviteUserFormComponent.new(strategy:, errors: errors))
render(Shares::InviteUserFormComponent.new(strategy:, errors:, allow_hover_cards:))
end
end

Expand Down Expand Up @@ -100,10 +100,15 @@
end
else
strategy.shares.each do |share|
render(Shares::ShareRowComponent.new(share:, strategy:, container: border_box))
render(Shares::ShareRowComponent.new(share:, strategy:, container: border_box, allow_hover_cards:))
end
end
end
end

if allow_hover_cards
modal_content.with_row do
helpers.angular_component_tag 'opce-custom-modal-overlay', class: 'op-user-share-modal-overlay'
end
end
%>
2 changes: 2 additions & 0 deletions app/components/shares/manage_shares_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ManageSharesComponent < ApplicationComponent # rubocop:disable OpenProject
attr_reader :strategy,
:entity,
:errors,
:allow_hover_cards,
:modal_content

def initialize(strategy:, modal_content:, errors: nil)
Expand All @@ -45,6 +46,7 @@ def initialize(strategy:, modal_content:, errors: nil)
@entity = strategy.entity
@errors = errors
@modal_content = modal_content
@allow_hover_cards = strategy.allow_hover_cards?
end

def self.wrapper_key
Expand Down
3 changes: 2 additions & 1 deletion app/components/shares/share_row_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
end

user_row_grid.with_area(:avatar, tag: :div) do
render(Users::AvatarComponent.new(user: principal, show_name: false, size: :medium))
render(Users::AvatarComponent.new(user: principal, show_name: false, size: :medium,
hover_card: { active: allow_hover_cards, target: :custom }))
end

user_row_grid.with_area(:user_details, tag: :div, classes: 'ellipsis') do
Expand Down
5 changes: 3 additions & 2 deletions app/components/shares/share_row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ShareRowComponent < ApplicationComponent # rubocop:disable OpenProject/Add
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers

def initialize(share:, strategy:, container: nil)
def initialize(share:, strategy:, container: nil, allow_hover_cards: false)
super

@share = share
Expand All @@ -45,6 +45,7 @@ def initialize(share:, strategy:, container: nil)
@principal = share.principal
@available_roles = strategy.available_roles
@container = container
@allow_hover_cards = allow_hover_cards
end

def wrapper_uniq_by
Expand All @@ -53,7 +54,7 @@ def wrapper_uniq_by

private

attr_reader :share, :entity, :principal, :container, :available_roles, :strategy
attr_reader :share, :entity, :principal, :container, :available_roles, :strategy, :allow_hover_cards

def share_editable?
@share_editable ||= User.current != share.principal && sharing_manageable?
Expand Down
Loading

0 comments on commit 5dc51a9

Please sign in to comment.