diff options
author | Phil Hughes <me@iamphill.com> | 2018-10-18 10:50:38 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-05 17:02:41 +0300 |
commit | f7df9ddb52be8a03b8fbd8c9a870f3e3af577562 (patch) | |
tree | 9ee176674a1aa2a4d57b2ffcb88c03e522891529 /app/assets/javascripts/diffs/store/modules | |
parent | 7d4b717c92d0e2f1db07fb3de0ce356b15d2f7df (diff) |
Re-implemented image commenting on diffs
This re-implements image commenting in merge request diffs.
This feature was previously lost when the merge request
page was refactored into Vue.
With this, we create an overlay component. The overlay
component handles displaying the comment badges
and the comment form badge.
Badges are displayed based on the position attribute
sent with the discussion.
Comment forms for diff files are controlled through
a different state property. This is so we don't
tie comment forms to diff files directly creating
deep nested state. Instead we create a flat array
which holds the file hash & the X & Y position of
the comment form.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48956
Diffstat (limited to 'app/assets/javascripts/diffs/store/modules')
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/diff_state.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/store/modules/diff_state.js b/app/assets/javascripts/diffs/store/modules/diff_state.js index 1c5c35071de..085e255f1d3 100644 --- a/app/assets/javascripts/diffs/store/modules/diff_state.js +++ b/app/assets/javascripts/diffs/store/modules/diff_state.js @@ -24,4 +24,6 @@ export default () => ({ showTreeList: storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : storedTreeShow === 'true', currentDiffFileId: '', + projectPath: '', + commentForms: [], }); |