Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#58345] Primerize Relations tab #16989

Conversation

aaron-contreras
Copy link
Contributor

@aaron-contreras aaron-contreras commented Oct 18, 2024

Ticket

https://community.openproject.org/work_packages/58345

Includes https://community.openproject.org/projects/openproject/work_packages/58734/activity as well

What are you trying to accomplish?

Primerize the Relations tab according to Figma mockups

Note: This is an implementation chunk of https://community.openproject.org/projects/stream-planning-and-reporting/work_packages/22360

What approach did you choose and why?

Followed the patterns established when primerizing the Activity tab and the Meetings tab

Missing specs to fix

✅ Specs to fix - revision 1
- [ ] ./spec/features/work_packages/details/query_groups/relation_query_group_spec.rb:84 # Work package with relation query group children table creates and removes across all tables - [ ] ./spec/features/work_packages/details/query_groups/relation_query_group_spec.rb:210 # Work package with relation query group follower table add existing, remove it, add it from relations tab, remove from relations tab - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[1:1:1:1]' # within a split screen behaves like work package relations tab as admin allows to manage hierarchy - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[1:1:1:3:1]' # within a split screen behaves like work package relations tab as admin inline create can inline-create children - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[1:1:1:2:1]' # within a split screen behaves like work package relations tab as admin when switching to custom field with required CF shows the required field when switching - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[1:1:2:1:2:1]' # within a split screen behaves like work package relations tab relation group-by toggler with limited permissions with manage_subtasks permissions is able to link parent and children - [ ] ./spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rb:53 # creating a child directly after the wp itself was created keeps its custom field values (regression #29511, #29446) - [ ] ./spec/features/work_packages/copy_spec.rb:93 # Work package copy on fullscreen page - [ ] ./spec/features/work_packages/copy_spec.rb:148 # Work package copy on split screen page - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:2:2:1]' # within a primerized split screen behaves like Work package relations tab with limited permissions with relations permissions allows to manage relations - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:2:2:3]' # within a primerized split screen behaves like Work package relations tab with limited permissions with relations permissions follows the relation links (Regression #26794) - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:2:2:4]' # within a primerized split screen behaves like Work package relations tab with limited permissions with relations permissions allows to change relation descriptions - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:2:2:2]' # within a primerized split screen behaves like Work package relations tab with limited permissions with relations permissions allows to move between split and full view (Regression #24194) - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:1:2]' # within a primerized split screen behaves like Work package relations tab relation group-by toggler allows to edit relation types when toggled - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[2:1:1:1]' # within a primerized split screen behaves like Work package relations tab relation group-by toggler allows to toggle how relations are grouped - [ ] ./spec/features/members/pagination_spec.rb:58 # members pagination when adding a member paginates - [ ] ./spec/features/work_packages/new/new_work_package_spec.rb:513 # new work package creating child work packages from the relations tab - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[2:1:1:1]' # within a primerized split screen behaves like work package relations tab as admin allows to manage hierarchy - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[2:1:1:2:1]' # within a primerized split screen behaves like work package relations tab as admin when switching to custom field with required CF shows the required field when switching - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[2:1:1:3:1]' # within a primerized split screen behaves like work package relations tab as admin inline create can inline-create children - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[2:1:2:1:2:1]' # within a primerized split screen behaves like work package relations tab relation group-by toggler with limited permissions with manage_subtasks permissions is able to link parent and children - [ ] ./spec/features/members/membership_spec.rb:160 # Administrating memberships via the project settings Adding and Removing a Group as Member - [ ] ./modules/gantt/spec/features/timeline/timeline_navigation_spec.rb:352 # Work package timeline navigation when table is grouped removes the relation element when removed in split screen - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:2:2:1]' # within a split screen behaves like Work package relations tab with limited permissions with relations permissions allows to manage relations - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:2:2:4]' # within a split screen behaves like Work package relations tab with limited permissions with relations permissions allows to change relation descriptions - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:2:2:3]' # within a split screen behaves like Work package relations tab with limited permissions with relations permissions follows the relation links (Regression #26794) - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:2:2:2]' # within a split screen behaves like Work package relations tab with limited permissions with relations permissions allows to move between split and full view (Regression #24194) - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:1:2]' # within a split screen behaves like Work package relations tab relation group-by toggler allows to edit relation types when toggled - [ ] './spec/features/work_packages/details/relations/relations_spec.rb[1:1:1:1]' # within a split screen behaves like Work package relations tab relation group-by toggler allows to toggle how relations are grouped - [ ] ./spec/features/work_packages/details/relations/primerized_relations_spec.rb:363 # Primerized work package relations tab attaching a child renders the new child form and creates the child relationship - [ ] ./spec/features/work_packages/details/relations/primerized_relations_spec.rb:292 # Primerized work package relations tab creating a relation renders the new relation form for the selected type and creates the relation - [ ] ./spec/features/work_packages/details/relations/primerized_relations_spec.rb:192 # Primerized work package relations tab deletion can delete children - [ ] ./spec/features/work_packages/details/relations/primerized_relations_spec.rb:169 # Primerized work package relations tab deletion can delete relations - [ ] ./spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb:154 # Work Package table hierarchy parent below An arrow is beside parent name and it should not be shown when children are removed "#33109" - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[3:1:1:1]' # within a full screen behaves like work package relations tab as admin allows to manage hierarchy - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[3:1:1:2:1]' # within a full screen behaves like work package relations tab as admin when switching to custom field with required CF shows the required field when switching - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[3:1:1:3:1]' # within a full screen behaves like work package relations tab as admin inline create can inline-create children - [ ] './spec/features/work_packages/details/relations/hierarchy_spec.rb[3:1:2:1:2:1]' # within a full screen behaves like work package relations tab relation group-by toggler with limited permissions with manage_subtasks permissions is able to link parent and children
✅ Specs to fix - revision 2
'./modules/boards/spec/features/board_navigation_spec.rb:127' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-22-58.467.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-22-58.467.png './modules/boards/spec/features/board_navigation_spec.rb:157' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-21-23.570.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-21-23.570.png './spec/features/work_packages/copy_spec.rb:148' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-21-01.046.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-21-01.046.png './spec/features/work_packages/copy_spec.rb:93' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-22-16.256.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-22-16.256.png './spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rb:53' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-20-27.590.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-20-27.590.png './spec/features/work_packages/details/relations/relations_spec.rb:113' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-27-19.600.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-27-19.600.png './spec/features/work_packages/details/relations/relations_spec.rb:191' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-26-40.855.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-26-40.855.png './spec/features/work_packages/details/relations/relations_spec.rb:213' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-26-51.079.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-26-51.079.png './spec/features/work_packages/details/relations/relations_spec.rb:225' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-27-01.471.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-27-01.471.png './spec/features/work_packages/details/relations/relations_spec.rb:92' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-28-26.213.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-28-26.213.png './spec/features/work_packages/new/new_work_package_spec.rb:513' ↳ html: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-20-08.622.html ↳ screenshot: https://openproject-ci-public-logs.s3-eu-west-1.amazonaws.com/screenshot_2024-11-12-22-20-08.622.png
✅ Specs to fix - revision 3

rspec ./modules/boards/spec/features/board_navigation_spec.rb:158 # Work Package boards spec navigates to the details view and reloads (see #49678)
rspec ./modules/boards/spec/features/board_navigation_spec.rb:127 # Work Package boards spec navigates from boards to the WP details view then go to full view then go back (see #33747)

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@aaron-contreras aaron-contreras self-assigned this Oct 18, 2024
@aaron-contreras aaron-contreras force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch 2 times, most recently from ca640c9 to fa664f8 Compare October 18, 2024 22:26
@aaron-contreras aaron-contreras force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch 5 times, most recently from a0efe87 to 05ad841 Compare October 28, 2024 13:16
@aaron-contreras aaron-contreras force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch from 05ad841 to 97bd373 Compare October 29, 2024 16:02
@aaron-contreras aaron-contreras force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch 14 times, most recently from 9ae2cbe to 6f16dd8 Compare November 6, 2024 12:27
@aaron-contreras aaron-contreras force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch 3 times, most recently from 344a7e0 to 4a23389 Compare November 8, 2024 12:59
cbliard and others added 5 commits November 19, 2024 17:49
A relation should be read as `<from> <relation_type> <to>`: for instance
`Relation.create(from_id: 123, to_id: 456, relation_type: :follows)`
means that work package 123 follows work package 456, which means that
work package 123 is the successor of work package 456, or that work
package 456 is the predecessor of work package 123.

The translations were inverted.

Also used `shared_let` in specs to speed them up a little.
…ersion. The only remaining part is about updating the frame, when the workPackage is updated elsewhere (e.g by adding a child to an embedded table)
HDinger and others added 13 commits November 21, 2024 11:14
…cause of a cache invalidation. Thus we avoid an unneccessary frame reload which also caused tests to flicker
…dy height is fixed to the height of its content
…e data. Further, when manually updating the objects do not execute the observable again
…cument it (#17234)

* create a component for WP info line

* fix spacing

* change component name and simplify code

* add a preview for lookbook

* pass workpackage itself to the component, not its id

* render info line component inside the relation component

* First draft of Lookbook docs

* add some docs for info line component

* make fon-size configurable

* make id clickable

* use info-line component in meeting agenda item

* use info-line component in hover card

---------

Co-authored-by: Parimal Satyal <[email protected]>
@HDinger HDinger force-pushed the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch from 598582f to 19eb34a Compare November 25, 2024 12:08
@HDinger HDinger marked this pull request as ready for review November 25, 2024 12:16
@HDinger HDinger merged commit dfd9548 into dev Nov 26, 2024
14 checks passed
@HDinger HDinger deleted the implementation/58345-re-design-relations-tab-according-to-figma-mockups branch November 26, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

6 participants