Commit Graph

51 Commits

Author SHA1 Message Date
Phil Hughes 27fa7b9ca8
Collapse diff tree is only one file is present
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53139
2019-03-19 11:34:21 +00:00
Phil Hughes c36095b2e3
Fix expand all button not working
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51737
2019-03-11 13:09:36 +00:00
Phil Hughes b14de8e1f5 Add option to expand diff to full file
The user can also toggle between the diff changes and
the full file diff.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19054
2019-03-06 15:51:44 +08:00
Denys Mishunov 0aff8e2753 Set up basic keyboard next/previous navigation in diff list
Mousetrap is used as the help-tool to listen to keystrokes

Added currentDiffIndex getter to store that holds
the index of currently active diff file in the list

Instead of computing it on the component, we will take advantage of it
being available for all components in DiffsApp

Testing keyboard navigation and jumpToFile()
2019-02-27 09:12:13 +00:00
Filipa Lacerda fe10964a68 Merge branch 'fix-diffs-not-rendering' into 'master'
Fix diff files not rendering

See merge request gitlab-org/gitlab-ce!25358
2019-02-18 16:19:19 +00:00
Phil Hughes 512f9624fa
Fix diff files not rendering
Fixes some diff files not rendering when the renderIt
property is updated.
Previously it was using a local copy of renderIt which meant
Vue wouldn't update it when the files renderIt property was updates
2019-02-18 15:16:04 +00:00
Filipa Lacerda fea813ab93 Merge branch 'diff-tree-resizable' into 'master'
Make the file tree in merge requests resizable

Closes #51857

See merge request gitlab-org/gitlab-ce!25097
2019-02-18 12:53:03 +00:00
Natalia Tepluhina bf8f32da7f Replaced part of diff file properties with diff viewer
- replaced file.too_large
- replaced file.text
- replaced file.collapsed
2019-02-15 17:56:50 +00:00
Phil Hughes d17de657fe
Make the file tree in merge requests resizable
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51857
2019-02-15 10:33:33 +00:00
Phil Hughes 6e5461d67f
Added fuzzy file finder to merge requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53304
2019-02-05 11:29:49 +00:00
Phil Hughes 2f40aa68d9
Added dropdown for diff settings
Dropdown includes buttons for tree view rendering mode
and buttons for the compare view (inline or side-by-side)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55491
2019-01-24 14:48:03 +00:00
Phil Hughes 9ff20ad76d
Collapses directory structure in merge request tree
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53069
2019-01-15 13:39:24 +00:00
André Luís 85daddbec9 Resolve "Navigating unresolved discussions on Merge Request page" 2018-12-08 07:19:03 +00:00
Winnie Hellmann e7439c3104 Pass commit when posting diff discussions 2018-12-05 22:36:51 +01:00
Phil Hughes d3a8fb6e79
Fixed expanding diff commit files
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50662
2018-12-05 14:12:51 +00:00
Phil Hughes 9afc3069b0
Fixed diff files not expanding
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54868
2018-12-04 17:51:57 +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
Mike Greiling 5b9495c5db
Prettify all the things 2018-11-20 09:30:01 -06:00
George Tsiolis 4a2b19706c Rename diffs store variable 2018-11-15 18:16:27 +02: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 a3fbde3512
Init task list when creating new note & discussion 2018-11-09 11:09:56 +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
Phil Hughes 0fba7cca36
Update the state, not a param
Also fixed a bug where discussions wouldn't be assigned to a line
when switching from discussion tab to changes tab
2018-10-25 12:04:34 +01:00
Phil Hughes 80a689fab8
Impove diff discussion data
Pre-request to https://gitlab.com/gitlab-org/gitlab-ce/issues/48956
2018-10-24 13:30:30 +01: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
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
André Luís 38beacc926 Resolve "Link to file in Changes tab of MR no longer works for all files after incremental rendering improvement" 2018-09-20 08:21:17 +00:00
André Luís 04c0d12d1a Resolve "Merge requests show outdated discussions on changes tab" 2018-09-08 06:37:41 +00:00
Tim Zallmann d2cbe07398 Adapted so utils + actions don't include any mutations and mutations are always against state 2018-09-07 17:13:11 +02: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 982da16bf2 Made the discussion tests artificial to have them stable, mocked RAF + RIC 2018-09-07 12:25:50 +02:00
Tim Zallmann c9bacfd682 Fixed Resolving, Loading more and Line Bugs 2018-09-07 12:25:50 +02:00
Tim Zallmann cee271ee34 Fix for displaying left side comments when no discussion available 2018-09-07 12:25:50 +02:00
Tim Zallmann f8214f9568 Fixed Left side comments 2018-09-07 12:25:50 +02:00
Tim Zallmann 173ecfc42b Delete Discussions fix 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 d7a5d5b694 Removed the testing console.log's 2018-09-07 12:25:50 +02:00
Tim Zallmann 53def4e2ee Adding new threads to MR page 2018-09-07 12:25:50 +02:00
Tim Zallmann 4164c616e7 Loading Discussions later on Diffs 2018-09-07 12:25:50 +02:00
Tim Zallmann 64d0f1e20e Fixed text removal memory saving + Fixed collapsed non text files 2018-08-08 10:46:17 +02:00
Tim Zallmann 259e54402a ESLint Fixes 2018-08-08 10:46:17 +02:00
Tim Zallmann e70d06dff8 Incremental Rendering of the MR 2018-08-08 10:46:17 +02:00
Filipa Lacerda c5a514de76
Adds specs for toggleFileDiscussions action 2018-07-11 15:30:41 +01: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
Filipa Lacerda ac71675d30
Fixes toggle discussion button not expanding collapsed discussions
Discussions were being toggled by jquery DOM querying them and toggling
visibility but in vue, only the open discussions will be in the DOM
Fix includes:
 - Adds a getter to the store to get the expanded discussions
 - Adds an action to collapse a discussion
 - When the user clicks the button, all data needed is now accessible
   through a getter and we can dispatch an action to toggle the discussion
   within the state, instead of showing/hiding with jQuery
 - Removes hardcoded properties

Resolves #48237
2018-07-10 12:03:00 +01: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
Fatih Acet d690cd9992 Prevent fetching diffs and discussions data unnecessarily on MR page 2018-06-29 07:22:07 +00:00
Tim Zallmann 53f77cfee1 Added Diff Viewer to new VUE based MR page 2018-06-26 18:49:22 +00:00