Allow collapsing comments in the pending state code review
<!--Implementation issues are used break-up a large piece of work into small, discrete tasks that can move independently through the build workflow steps. They're typically used to populate a Feature Epic. Once created, an implementation issue is usually refined in order to populate and review the implementation plan and weight. Example workflow: https://about.gitlab.com/handbook/engineering/development/threat-management/planning/diagram.html#plan--> ## Why are we doing this work Allow viewing the code without pending comments. When reviewing a merge request, I am leaving comments that are not yet published (show as comments in pending state). I would like to be able to collapse/expand these comments to allow me to view the code without distracting pending comments before submitting the review. ![Screenshot 2025-09-19 at 10.49.28.png](/uploads/f6f79998eeef4e12c8be7b534d062233/Screenshot_2025-09-19_at_10.49.28.png){width="691" height="196"} ## Relevant links <!--Information that the developer might need to refer to when implementing the issue. - [Design Issue](https://gitlab.com/gitlab-org/gitlab/-/issues/<id>) - [Design 1](https://gitlab.com/gitlab-org/gitlab/-/issues/<id>/designs/<image>.png) - [Design 2](https://gitlab.com/gitlab-org/gitlab/-/issues/<id>/designs/<image>.png) - [Similar implementation](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/<id>)--> ## Non-functional requirements <!--Add details for required items and delete others.--> - [ ] Documentation: - [ ] Feature flag: - [ ] Performance: - [ ] Testing: ## Implementation plan The exact implementation detail TBA. I proposed adding a collapse button as per the image below. <details> <summary>images</summary> ![Screenshot 2025-09-19 at 12.00.37.png](/uploads/2121b07a6d7cc29ec626747f7e54d2ae/Screenshot_2025-09-19_at_12.00.37.png) ![Screenshot 2025-09-19 at 12.00.44.png](/uploads/5fd4b829c2cd2116be21a79904ca1a32/Screenshot_2025-09-19_at_12.00.44.png) ![Screenshot 2025-09-19 at 12.02.00.png](/uploads/fe449a3d304141e4ab774b01d85386bf/Screenshot_2025-09-19_at_12.02.00.png){width="697" height="208"} </details> <!--Workflow and other relevant labels # ~"group::" ~"Category:" ~"GitLab Ultimate" Other settings you might want to include when creating the issue. # /assign @ # /epic &--> ## Verification steps <!--Add verification steps to help GitLab team members test the implementation. This is particularly useful during the MR review and the ~"workflow::verification" step. You may not know exactly what the verification steps should be during issue refinement, so you can always come back later to add them. 1. Check-out the corresponding branch 1. ... 1. Profit!-->
issue