Skip to content

Convert compare show page form to Vue

The following discussion from !52567 (merged) should be addressed:

  • @nick.thomas started a discussion:

    @sming-gitlab I've just noticed that we use this form from app/views/projects/compare/show.html.haml as well - which is to say, after we've pressed the "compare" button.

    The flow for this from a view/controller point of view seems to be index (rendering this page) -> create, which redirects to show.

    On the show page, it currently looks like:

    Screenshot_from_2021-02-02_09-53-23

    Should we convert this to use the new vue component as well (just the form, not any of the rest of the page)? It seems low-effort would allow us to remove app/views/projects/compare/_form.html.haml altogether, and give the user a consistent experience across both pages - especially important as we come to add the new project attribute.

    We'd be able to avoid duplicating the data part by moving that code to a method in app/helpers/projects_helper.rb, which would look a fair bit like the already-existing project_permissions_panel_data method. WDYT?

Edited by Samantha Ming