stable

Clone or download

Read-only

Display Teams of Program in Sidebar (FlamingParrot)

part of story #21791 see Programs & Teams in sidebar Entrypoint: FlamingParrot / BurningParrot Theme. They dispatch CollectLinkedProjects event which is then handled by CollectLinkedProjectsHandler in Program Management How to test: - Given you have configured a program project with some teams, when you browse the Program project (only in FlamingParrot), you will see the list of Teams in the expanded sidebar - when the sidebar is collapsed, only the icon should be shown for now. In later commits, a popover will show more information. - when your current user cannot see a Team project (for example it's Private and the user is not member), the Team is not listed. - when your current user cannot see any Team project, the "linked projects block" should not appear. - when the project is not a program (it's a team, or anything else not linked to program management), the "block" should not appear. Notes to reviewer: - In CollectLinkedProjects, there is a "parent" projects collection. It is never filled for now but is added to give clarity to the architecture. In later commits, the Handler will add to this collection when current project is a Team. At that time, the plan is to introduce a "ProgramsSearcher" and to build a collection with it. - I know I introduced a lot of interfaces, but they allow us to write almost mock-free tests. Without "RetrieveProject", I would have no choice but to mock ProjectManager. Same with "CheckProjectAccess". - The mockups don't tell us if the Teams are links, I assumed they were links to the respective project's dashboard. Change-Id: I37d1e64359eea0975623e08a91e234c27cf8217f

Modified Files

Name
A plugins/program_management/include/Adapter/Workspace/ProjectManagerAdapter.php +40 −0 Go to diff View file
A plugins/program_management/include/Domain/Workspace/CollectLinkedProjectsHandler.php +60 −0 Go to diff View file
A plugins/program_management/include/Domain/Workspace/RetrieveProject.php +28 −0 Go to diff View file
A plugins/program_management/include/Domain/Workspace/TeamsSearcher.php +50 −0 Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +22 −0 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Workspace/ProjectManagerAdapterTest.php +42 −0 Go to diff View file
A plugins/program_management/tests/unit/Domain/Workspace/CollectLinkedProjectsHandlerTest.php +90 −0 Go to diff View file
A plugins/program_management/tests/unit/Domain/Workspace/TeamsSearcherTest.php +65 −0 Go to diff View file
A plugins/program_management/tests/unit/Stub/RetrieveProjectStub.php +55 −0 Go to diff View file
M site-content/fr_FR/LC_MESSAGES/tuleap-core.po +5 −0 Go to diff View file
M src/common/Project/AccessDeletedException.class.php +2 −1 Go to diff View file
A src/common/Project/CheckProjectAccess.php +33 −0 Go to diff View file
M src/common/Project/ProjectAccessChecker.php +2 −2 Go to diff View file
A src/common/Project/Sidebar/CannotMixParentAndChildrenProjectsException.php +41 −0 Go to diff View file
A src/common/Project/Sidebar/CollectLinkedProjects.php +106 −0 Go to diff View file
A src/common/Project/Sidebar/LinkedProject.php +53 −0 Go to diff View file
A src/common/Project/Sidebar/LinkedProjectPresenter.php +43 −0 Go to diff View file
A src/common/Project/Sidebar/LinkedProjectsCollection.php +86 −0 Go to diff View file
A src/common/Project/Sidebar/LinkedProjectsCollectionPresenter.php +67 −0 Go to diff View file
R src/common/Project/ProjectContextPresenter.php Go to diff View file
A src/common/Project/Sidebar/SearchLinkedProjects.php +31 −0 Go to diff View file
M src/themes/BurningParrot/include/BurningParrotTheme.php +7 −1 Go to diff View file
M src/themes/BurningParrot/include/HeaderPresenter.php +1 −1 Go to diff View file
M src/themes/BurningParrot/include/HeaderPresenterBuilder.php +1 −1 Go to diff View file
M src/themes/FlamingParrot/css/utils/_sidebar.scss +71 −42 Go to diff View file
M src/themes/FlamingParrot/include/ContainerPresenter.class.php +1 −1 Go to diff View file
M src/themes/FlamingParrot/templates/project-sidebar.mustache +19 −0 Go to diff View file
M src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php +9 −1 Go to diff View file
A tests/lib/Stubs/CheckProjectAccessStub.php +98 −0 Go to diff View file
A tests/lib/Stubs/SearchLinkedProjectsStub.php +51 −0 Go to diff View file
M tests/unit/common/Include/URLVerification_AssertValidUrlTest.php +1 −1 Go to diff View file
A tests/unit/common/Project/Sidebar/CollectLinkedProjectsTest.php +167 −0 Go to diff View file
A tests/unit/common/Project/Sidebar/LinkedProjectPresenterTest.php +45 −0 Go to diff View file
A tests/unit/common/Project/Sidebar/LinkedProjectTest.php +77 −0 Go to diff View file
A tests/unit/common/Project/Sidebar/LinkedProjectsCollectionPresenterTest.php +86 −0 Go to diff View file
A tests/unit/common/Project/Sidebar/LinkedProjectsCollectionTest.php +161 −0 Go to diff View file