openproject icon indicating copy to clipboard operation
openproject copied to clipboard

[#55163] Build project-list sharing modal

Open aaron-contreras opened this issue 1 year ago • 4 comments

  • [x] Add ProjectQuery as a shareable resource
  • [ ] Build the contracts to share ProjectQuery
  • [x] Add a ShareDialog that will be added as an async dialog via Turbo
    • [x] Fix CSS top-layer issue with invite user form
    • [ ] Fix CSS issues with the modal
      • [ ] The ActionMenu Primer component uses an overlay to render its menu item list which ends up causing the container to span the entire width of the dialog for some reason
  • [ ] Introduce a SharingStrategy pattern that wraps all of the content of the methods sharing_contract_scope, available_roles and potentially more to not end up with big case statements in the SharesController
  • [ ] Add ShareDialogComponent to Lookbook

See: https://community.openproject.org/work_packages/55163

aaron-contreras avatar Jun 25 '24 15:06 aaron-contreras

When we add #15983 here, the modal already works in a super rough capacity

klaustopher avatar Jun 26 '24 14:06 klaustopher

Rebased onto https://github.com/opf/openproject/pull/15983 in order to get the fixes on there over on this branch

aaron-contreras avatar Jun 27 '24 02:06 aaron-contreras

Current modal rendering state

Known issues:

  • [ ] Action Menu rendering inside the modal spans way too wide. I suspect this has something to do with the CSS top layer.

https://github.com/opf/openproject/assets/61627014/e53ba906-9152-416c-844e-203ea9c85e80

aaron-contreras avatar Jun 27 '24 02:06 aaron-contreras

https://github.com/opf/openproject/pull/15983 has been merged and the generalize-sharing-modal branch is based on current dev, so I am rebasing this branch bakc onto generalize sharing modal, please pull with. git fetch --all && git reset --hard origin/implementation/55163-build-sharing-modal

klaustopher avatar Jun 27 '24 07:06 klaustopher

Current modal rendering state

Known issues:

* [ ]  Action Menu rendering inside the modal spans way too wide. I suspect this has something to do with the CSS top layer.

Screen.Recording.2024-06-26.at.21.54.28.mov

This is actually an issue of Primer itself where the automatic width calulation of ActionMenus inside Dialogs do not work, see https://github.com/primer/view_components/issues/2926. As a wrokaround for now, we have to enforce the width of the ActionMenu manually. Unfortnately, we thus have to accept that the width is not always ideal.

HDinger avatar Jul 01 '24 07:07 HDinger