Skip to content

Create shared gl-modal-vuex component and module

Paul Slaughter requested to merge ee1979-gl-modal-vuex into master

What does this MR do?

This MR creates a gl-modal-vuex component and corresponding vuex module which is needed by gitlab-ee!9003.

How is this used?

See this component and this actions module. Here's an example:

myapp/components/my_modal.vuex

<template>
  <gl-modal-vuex
    modal-id="my_very_unique_modal_id"
    modal-module="myModal"
    title="Hello World"
    @ok.prevent="submit"
  >
    <p>Hello World</p>
  </gl-modal-vuex>
</template>

myapp/stores/index.js

import Vuex from 'vuex';
import modalModule from '~/vuex_shared/modules/modal';
import state from './state';
import mutations from './mutations';
import * as actions from './actions';

export default () =>
  new Vuex.Store({
    state: state(),
    mutations,
    actions,
    modules: {
      myModal: modalModule(),
    },
  });

What are the relevant issue numbers?

  • Part of gitlab-ee#1979
  • FE gitlab-ee#8350

Does this MR meet the acceptance criteria?

Edited by Paul Slaughter

Merge request reports