Commit Graph

58 Commits

Author SHA1 Message Date
Phil Hughes 2ed65be1c3
Fixed renamed and mode changed diff viewers
Renders mode changed and renamed file merge request diff
viewers on the frontend.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52607
2018-12-06 14:39:29 +00:00
Phil Hughes 7aa8803083 Updated variable name to forceExpanded 2018-12-04 13:27:18 +00:00
Phil Hughes b8ee8c2787
Fixed multiple diff line discussions not expanding
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53600
2018-12-04 10:58:02 +00:00
Sam Bigelow 44a0121ad4 Resolve "Merge request refactor does not highlight selected line" 2018-11-30 08:48:47 +00:00
Phil Hughes adf8ad9eee
Improve discussion rendering performance
Improve the renderign of new and existing discussions
by reducing the number of watchers on each object & array.
Previously every discussion change would trigger an update for every
discussion component.

Also tidied up some components to get them closer to our docs.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51506
2018-11-27 11:40:39 +00:00
Phil Hughes 93c614ce92
Show toggle tree button on merge request commits
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53019
2018-11-22 12:04:18 +00:00
Phil Hughes 234563ba30
Made diff & note data consistent
This caused many pain points when working with it.
Part of the data was camel cased the other snake case.
Other parts where snake case & then getting converted in components,
this conversion has the potential for leaking memory.

This changes that & makes it consistent with what it returned from the
API, snake case.
2018-11-14 19:16:46 +00:00
Phil Hughes 8e265bc359
Fix collapsed files not fully fully expanding
This fixes files that are collapsed by default not expanding
when the expand all button is clicked.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53866
2018-11-13 13:42:04 +00:00
Phil Hughes eaca2033d5
Changed diff tree filtering to path
Previously it was using name which could make it hard
to filter for the file you want in a certain folder.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53781
2018-11-12 14:42:22 +00:00
Phil Hughes 35faecb06b
Restored width & height properties 2018-11-06 10:17:59 +00:00
Phil Hughes f7df9ddb52
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
2018-11-05 14:02:41 +00:00
Jacques Erasmus 4508343d16 Fix broken "Show whitespace changes" button on MR "Changes" tab 2018-10-29 16:16:40 +00:00
Phil Hughes 9fd5a78d8b
Fixed failing specs
Added tests to file row truncated text computed prop
2018-10-23 09:12:37 +01:00
Phil Hughes 2d00e7fce5
Add list mode to file browser in diffs
This adds toggle buttons to switch between file & tree list.
For file list, it renders the truncated paths with the ellipsis
at the start of the path.

When focusing the input, it hides the toggle buttons.
On blur, the buttons get shown again.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51859
2018-10-23 09:12:36 +01:00
Mike Greiling f666026d71
Prettify all spec files 2018-10-17 11:18:17 -05:00
Johann Hubert Sonntagbauer 6f5723a169 enable jasmine/new-line-before-expect 2018-10-17 06:57:29 +02:00
Jacques Erasmus a577cfcbb2 Fix broken file name navigation on MRs 2018-10-11 22:32:28 +00:00
Johann Hubert Sonntagbauer db4c1f665f enable jasmine/prefer-jasmine-matcher 2018-10-09 20:30:03 +02:00
Oswaldo Ferreira caf10464c0 Fix LFS uploaded images not being rendered 2018-10-05 22:36:20 +00:00
Paul Slaughter becb86ea4e Add pipeline status to diffs/commit_item
**Notes:**
- Also exposes commit.pipeline_status_path in diffs.json
2018-10-03 13:18:21 -05:00
Paul Slaughter 5a286eb7a3 Add signature badge to diffs/commit_item
**Notes:**
- Also exposes commit.signature_html in diffs.json
2018-10-03 13:18:20 -05:00
Phil Hughes 33c4c5b8f3
Added file tree to merge request diffs
This file tree displays all the diff files in a tree like format
Each file is taken and converted into a tree with folders
Each folder can be toggled open & closed
Clicking a file will scroll to the diff file & highlight with a glow affect

Searching the tree list will search only files & return a list of the
files without any folders

Each file row contains an icon to show changed, new file or deleted
Each row will also contain the added & removed lines count

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14249
2018-10-03 10:05:43 +01:00
Paul Slaughter f390184249 Resolve "Commit details are not displayed when reviewing an MR commit by commit" 2018-09-26 08:28:50 +00:00
Phil Hughes 2497c29ef0 Use returned discussion from API
We now use the returned discussion instead of re-fetching
all of the discussions and filtering out the ones we don't need.
This speeds up the process of creating a diff discussions
by saving us another API request before we can render the discussion
2018-09-21 11:59:41 +01:00
Paul Slaughter ae5600b868 Create specs for diffs/components/app and update modules to export factory functions 2018-09-14 08:25:13 +00:00
André Luís 06025e4a26 Display click to expand on collapsed diffs 2018-09-13 12:34:18 +01:00
Tim Zallmann d4d5ed59f9 Fixes based on MR discussion around naming, mutations, handling of state 2018-09-07 16:20:57 +02:00
Tim Zallmann d3cf0c247b Fix for Karma, Static Analysis and RSPec for MR Page 2018-09-07 12:25:50 +02:00
Tim Zallmann 958cf02e91 Fixes for Karma tests 2018-09-07 12:25:50 +02:00
Tim Zallmann a424e8141b Fixes for Karma Tests 2018-09-07 12:25:50 +02:00
Tim Zallmann b8b2cb3675 Fixed Problems with Inline View + Specs 2018-09-07 12:25:50 +02:00
Tim Zallmann 3e9965f767 Fix for diff_file specs 2018-08-08 10:46:17 +02:00
Tim Zallmann 8daf9db68f Porting MR Vue Memory Fixes to current master 2018-08-08 02:50:01 +00:00
André Luís 8047b00fb6 Reapply "Merge branch '_acet-fix-mr-autosave' into 'master'"
This reverts commit bd5b177b0fc48d77b5069b112faf36d151221be7.
2018-08-01 15:26:57 +01:00
Filipa Lacerda 47244ad5ea Merge branch 'andr3-remove-mr-regressions-fixes-from-master' into 'master'
Remove fixes for MR refactor regressions from master

See merge request gitlab-org/gitlab-ce!20920
2018-08-01 13:42:23 +00:00
André Luís 09c1b008eb Revert "Merge branch '_acet-fix-outdated-discussions' into 'master'"
This reverts commit 740ae2d194, reversing
changes made to 1ba47de5fe.
2018-08-01 13:45:16 +01:00
André Luís c7cd9ee97c Revert "Merge branch '_acet-fix-mr-autosave' into 'master'"
This reverts commit 5ba542b109, reversing
changes made to 32c831ea2b.
2018-08-01 13:45:15 +01:00
André Luís 113f9f337c Revert "Merge branch 'tz-mr-refactor-memory-reduction' into 'master'"
This reverts commit 2411ecb576, reversing
changes made to 58a0df7e68.
2018-08-01 13:45:15 +01:00
Filipa Lacerda 32de37536e Disables toggle comments button for diff with no discussions 2018-07-31 09:24:36 +01:00
Filipa Lacerda 202e37bbaf Resolve "Copy diff file path as GFM" is broken 2018-07-30 13:37:28 +00:00
Tim Zallmann b2dbc93694 Reducing the memory footprint for the rendering 2018-07-23 11:24:07 +00:00
Tim Zallmann 5ba542b109 Merge branch '_acet-fix-mr-autosave' into 'master'
Fix autosave issues for MR discussions

Closes #48876 and #48877

See merge request gitlab-org/gitlab-ce!20569
2018-07-18 15:12:31 +00:00
Fatih Acet c12ad01693
Fix failing specs :fingers-crossed: 2018-07-18 12:55:56 +02:00
Fatih Acet 7632330e50
Fix showing outdated discussions on Changes tab 2018-07-18 00:07:37 +02:00
Tim Zallmann 422dcfde03 Resolve "MR: Reduce the memory footprint of the component tree" 2018-07-17 15:47:02 +00:00
Filipa Lacerda 57c32c7dbd
Adds specs for getters in merge request vuex diff module 2018-07-11 12:48:24 +01:00
Filipa Lacerda 135ead1d83
Merge branch 'master' into 48237-toggle-file-comments
* master: (38 commits)
  Update bitbucket.md to fix typo and small grammar touchups.
  Update time_helper.rb to fix output for exact minutes.
  Document update for GitLab Pages users.
  Support manually stopping any environment from the UI
  Fix link to frontend in handbook
  Shorten CHANGELOG filename to avoid breaking ecryptfs users
  Replace 48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace.yml
  Fix mountComponent helper path in docs
  Fix #48537 - Update avatar only via the projects API
  Add additional headline for Adding SSH keys to GitLab
  Request to be a proofreader.
  Fix specs
  Fix search bar text input alignment
  Fix API docs on unauthenticated projects return
  Adds with_projects optional parameter to /groups/:id API endpoint
  Docs: make it clear that you need a completely separate domain for Pages
  Document that we don't want to wait in tests
  Removes unused store in diffs mr refactor Removes double export for actions in diffs module in mr refactor
  Remove useless return
  Use latest gitlab-styles
  ...
2018-07-10 18:11:19 +01:00
Phil Hughes ca1deb9e5e Merge branch '48951-clean-up' into 'master'
Resolve "MR refactor: All actions under diff module are being exported twice"

Closes #48951

See merge request gitlab-org/gitlab-ce!20499
2018-07-10 07:38:48 +00:00
Filipa Lacerda 8186bb3903
Removes unused store in diffs mr refactor
Removes double export for actions in diffs module in mr refactor
2018-07-09 15:46:36 +01:00
Filipa Lacerda eed8e8ff70
Call correct action in spec 2018-07-09 13:19:26 +01:00