• Phil Hughes's avatar
    Export merge request state globally · a4d112fe
    Phil Hughes authored
    This makes the merge requests state exportable which allows for
    other components to import and use the state.
    Whenever a polling request gets returned from the widget
    we update the state globally which allows for other components
    to react accordingly.
    
    For example, when a user merges a merge request
    the global state gets updated which updates the status box
    and also updates the comment box to stop users
    from commenting and closing a merge request.
    This same interaction happens when a user clicks on comment and
    close. The rest of the page updates and sets it into the correct state.
    
    To handle this we export the state from the status box component
    and also export a update method. This update event should get
    called whenever the state of the page should be changed.
    When this method gets called we send a GraphQL request to get the correct
    state of the page.
    
    Closes https://gitlab.com/gitlab-org/gitlab/-/issues/328547
    a4d112fe
comment_form.vue 15.7 KB