Commit 8bd6a67e authored by Phil Hughes's avatar Phil Hughes

Fixes widget extensons not rendering in the widget

Adds the widget extension container which is used to
render any registered extensions.
parent c3def839
...@@ -8,12 +8,14 @@ export default { ...@@ -8,12 +8,14 @@ export default {
}, },
}, },
render(h) { render(h) {
if (extensions.length === 0) return null;
return h( return h(
'div', 'div',
{}, {},
extensions.map((extension) => extensions.map((extension) =>
h(extension, { h(extension, {
props: extensions[0].props.reduce( props: extension.props.reduce(
(acc, key) => ({ (acc, key) => ({
...acc, ...acc,
[key]: this.mr[key], [key]: this.mr[key],
......
...@@ -38,7 +38,7 @@ import ReadyToMergeState from './components/states/ready_to_merge.vue'; ...@@ -38,7 +38,7 @@ import ReadyToMergeState from './components/states/ready_to_merge.vue';
import ShaMismatch from './components/states/sha_mismatch.vue'; import ShaMismatch from './components/states/sha_mismatch.vue';
import UnresolvedDiscussionsState from './components/states/unresolved_discussions.vue'; import UnresolvedDiscussionsState from './components/states/unresolved_discussions.vue';
import WorkInProgressState from './components/states/work_in_progress.vue'; import WorkInProgressState from './components/states/work_in_progress.vue';
// import ExtensionsContainer from './components/extensions/container'; import ExtensionsContainer from './components/extensions/container';
import eventHub from './event_hub'; import eventHub from './event_hub';
import mergeRequestQueryVariablesMixin from './mixins/merge_request_query_variables'; import mergeRequestQueryVariablesMixin from './mixins/merge_request_query_variables';
import getStateQuery from './queries/get_state.query.graphql'; import getStateQuery from './queries/get_state.query.graphql';
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
}, },
components: { components: {
Loading, Loading,
// ExtensionsContainer, ExtensionsContainer,
'mr-widget-header': WidgetHeader, 'mr-widget-header': WidgetHeader,
'mr-widget-suggest-pipeline': WidgetSuggestPipeline, 'mr-widget-suggest-pipeline': WidgetSuggestPipeline,
MrWidgetPipelineContainer, MrWidgetPipelineContainer,
...@@ -496,7 +496,7 @@ export default { ...@@ -496,7 +496,7 @@ export default {
</template> </template>
</mr-widget-alert-message> </mr-widget-alert-message>
</div> </div>
<!-- <extensions-container :mr="mr" /> --> <extensions-container :mr="mr" />
<grouped-codequality-reports-app <grouped-codequality-reports-app
v-if="shouldRenderCodeQuality" v-if="shouldRenderCodeQuality"
:head-blob-path="mr.headBlobPath" :head-blob-path="mr.headBlobPath"
......
...@@ -305,6 +305,7 @@ export default { ...@@ -305,6 +305,7 @@ export default {
</template> </template>
</mr-widget-alert-message> </mr-widget-alert-message>
</div> </div>
<extensions-container :mr="mr" />
<blocking-merge-requests-report :mr="mr" /> <blocking-merge-requests-report :mr="mr" />
<grouped-codequality-reports-app <grouped-codequality-reports-app
v-if="shouldRenderCodeQuality" v-if="shouldRenderCodeQuality"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment