Skip to content

Commit

Permalink
Merge pull request #13753 from opf/housekeeping/use-new-view-componen…
Browse files Browse the repository at this point in the history
…ts-in-core

Update and use new ViewComponents from Primer
  • Loading branch information
ulferts authored Sep 21, 2023
2 parents c297e44 + 59555ca commit 59f72c1
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,6 @@ gemfiles.each do |file|
send(:eval_gemfile, file) if File.readable?(file)
end

gem "openproject-primer_view_components", '~>0.10.0'
gem "openproject-primer_view_components", '~>0.11.0'
gem "openproject-octicons", '~>19.7.0'
gem "openproject-octicons_helper", '~>19.7.0'
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ GEM
actionview
openproject-octicons (= 19.7.0)
railties
openproject-primer_view_components (0.10.0)
openproject-primer_view_components (0.11.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.7.0)
Expand Down Expand Up @@ -1114,7 +1114,7 @@ DEPENDENCIES
openproject-octicons (~> 19.7.0)
openproject-octicons_helper (~> 19.7.0)
openproject-openid_connect!
openproject-primer_view_components (~> 0.10.0)
openproject-primer_view_components (~> 0.11.0)
openproject-recaptcha!
openproject-reporting!
openproject-storages!
Expand Down
28 changes: 14 additions & 14 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.0",
"@openproject/primer-view-components": "^0.11.0",
"@openproject/reactivestates": "^3.0.1",
"@primer/css": "^21.0.2",
"@uirouter/angular": "^12.0.0",
Expand Down Expand Up @@ -198,6 +198,6 @@
"storybook:build": "ng run OpenProject:build-storybook"
},
"overrides": {
"@primer/view-components": "npm:@openproject/primer-view-components@^0.10.0"
"@primer/view-components": "npm:@openproject/primer-view-components@^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class extends Controller {
connect() {
this.drake = dragula(
[this.containerTarget],
{ moves: (_el, _source, handle, _sibling) => !!handle?.classList.contains('handle') },
{ moves: (_el, _source, handle, _sibling) => !!handle?.classList.contains('octicon-grabber') },
)
// eslint-disable-next-line @typescript-eslint/no-misused-promises
.on('drop', this.drop.bind(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ def right_column_partial
end

def drag_handler_partial
render(Primer::Beta::Octicon.new(
color: :subtle,
classes: "handle",
style: "cursor: move;",
size: :small,
icon: :grabber
))
render(Primer::OpenProject::DragHandle.new(classes: 'handle'))
end

def work_package_title_partial
Expand Down
14 changes: 4 additions & 10 deletions modules/meeting/app/components/meetings/sidebar_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,10 @@ def initialize(meeting:)

def call
component_wrapper do
flex_layout(pl: 1) do |flex|
flex.with_row(border: :bottom, pb: 2) do
details_partial
end
flex.with_row(mt: 3, border: :bottom, pb: 2) do
state_partial
end
flex.with_row(mt: 3) do
participants_partial
end
render(Primer::OpenProject::BorderGrid.new) do |border_grid|
border_grid.with_row { details_partial }
border_grid.with_row { state_partial }
border_grid.with_row { participants_partial }
end
end
end
Expand Down

0 comments on commit 59f72c1

Please sign in to comment.