Commit Graph

90 Commits

Author SHA1 Message Date
Sean McGivern e8f29569bc Resolve outdated diff discussions on push 2017-09-06 10:08:03 +01:00
Douwe Maan 7c491d4fef Misc tweaks 2017-08-17 19:27:11 +02:00
Sean McGivern 6f5f7e4049 Convert ?full_data=1 -> ?view=full_data 2017-08-07 12:59:34 +01:00
Douwe Maan 8b68b69572 Merge branch 'fix-replying-to-commit-comment-in-mr-from-fork' into 'master'
Fix replying to commit comments on merge requests created from forks

Closes #31772

See merge request !13137
2017-07-28 16:53:10 +00:00
Sean McGivern 75d04f6a29 Fix replying to commit comments on MRs from forks
A commit comment shows in the MR, but if the MR is from a fork, it will have a
different project ID to the MR's target project. In that case, add an
note_project_id param so that we can pick the correct project for the note.
2017-07-28 16:25:13 +01:00
Phil Hughes 205090fcfb Removed inline JS in shared HAML files 2017-07-25 11:56:41 +01:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Bryce Johnson 81e9c28425 Render add-diff-note button with server.
This commit moves the rendering of the button back to the server, and
shows/hides it using opacity rather than display. It also removes the
transform applied to the button on hover (scale). Previously, both of these
factors automatically triggered a reflow, which creates a performance
bottleneck on pages with larger DOM size.

MR: !12103
2017-06-29 12:50:45 -04:00
Eric Eastwood ea090291bb Rename "Slash commands" to "Quick actions"
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070

Deprecate "chat commands" in favor of "slash commands"

We looked for things like:

 - `slash commmand`
 - `slash_command`
 - `slash-command`
 - `SlashCommand`
2017-06-15 09:01:56 -05:00
Luke "Jared" Bennett 32cac59727 Added more actions and report as abuse to all notes 2017-06-07 18:33:50 +00:00
Douwe Maan 34fcade1fd Fix replying to a commit discussion displayed in the context of an MR 2017-06-01 09:52:11 -05:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Jarka Kadlecova e4f7b87ddb Support comments for personal snippets 2017-05-05 15:45:49 +02:00
Douwe Maan f8fabfcc6f Allow commenting on older versions of the diff and comparisons between diff versions 2017-05-03 14:47:21 -05:00
Douwe Maan 1817f877e1 Some code tweaks 2017-04-08 14:58:08 -05:00
Douwe Maan a8339fe1aa Fix views after rebase 2017-04-08 14:37:46 -05:00
Douwe Maan 50eae640db Fix specs and make tweaks 2017-04-08 14:37:46 -05:00
Douwe Maan d65d245e06 Add link to diff header too 2017-04-08 14:37:46 -05:00
Douwe Maan c319f21141
Address review comments 2017-04-05 17:44:14 +01:00
Douwe Maan 21e10888c3
Address review comments 2017-04-05 17:44:14 +01:00
Douwe Maan fe26b8af94
Correctly display multiple separate discussions on the same diff line 2017-04-05 17:44:14 +01:00
Douwe Maan bb8cc94668
Don't use original_discussion_id 2017-04-05 17:44:14 +01:00
Douwe Maan 9c30b0e918
Fix some specs 2017-04-05 17:44:14 +01:00
Douwe Maan 08bbb9fce6
Add option to start a new discussion on an MR 2017-04-05 17:44:14 +01:00
Rémy Coutable 3970640b48 Fix note form hint showing slash commands supported for commits
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-20 13:58:14 +02:00
Douwe Maan 4a13aa9f34 Store discussion_id on Note for faster discussion lookup. 2016-08-17 12:16:46 -05:00
Phil Hughes 433f1c42c3 Comment & resolve button no longer looks for can-resolve attribute
Fixed some bugs when removing notes
2016-08-04 09:52:17 +01:00
Douwe Maan 538e66d71c Merge branch 'master' into diff-line-comment-vuejs
# Conflicts:
#	app/models/discussion.rb
#	db/schema.rb
2016-08-03 15:32:00 -07:00
Paco Guzman 8716ff7f63 Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible
- Preloading noteable we share the same noteable instance when more than one 
discussion refers to the same noteable.
- Any other call to that object that is cached in that object will be for any 
discussion.
- In those cases where merge_request_diff has all the sha stored to build a diff_refs get that 
diff_refs using directly those sha instead accessing to the git repository to first get the 
commits and later the sha.
2016-08-02 16:04:15 +02:00
Phil Hughes efb74875cf Moved most of the data handling into discussion & notes models
Reduced some duplicated code with compiling components
Fixed bug with resolve button tooltip not updating after resolving discussion
2016-07-29 11:19:56 +01:00
Douwe Maan ce1843b7de Merge branch 'master' into diff-line-comment-vuejs
# Conflicts:
#	db/schema.rb
2016-07-28 16:57:42 -06:00
Stan Hu d1ea2bca61 Optimize maximum user access level lookup in loading of notes
NotesHelper#note_editable? and ProjectTeam#human_max_access currently
take about 16% of the load time of an issue page. This MR preloads
the maximum access level of users for all notes in issues and merge
requests with several queries instead of one per user and caches
the result in RequestStore.
2016-07-26 15:33:05 -07:00
Phil Hughes e786c2b21c Comment & resolve button text is done through VueJS 2016-07-26 17:45:48 +01:00
Douwe Maan 35ce7aae01 Use sha1 of discussion ID. 2016-07-25 22:51:26 -06:00
Phil Hughes c1fe066b4b Added resolve button to discussions
Top count displays how many resolved discussions
2016-07-24 13:12:58 -06:00
Douwe Maan 79214be727 Add Discussion model to represent MR/diff discussion 2016-07-20 16:18:18 -06:00
Douwe Maan ce30827ccb Do not set `@use_legacy_diff_notes` 2016-07-07 23:44:04 +00:00
Douwe Maan 71e4175f65 Fix behavior around MRs that need legacy diff notes 2016-07-07 18:09:19 -04:00
Douwe Maan 5a8f727fd5 Merge branch 'master' into faster-diffs
# Conflicts:
#	app/helpers/notes_helper.rb
#	app/views/projects/diffs/_line.html.haml
#	app/views/projects/diffs/_parallel_view.html.haml
#	app/views/projects/diffs/_text_file.html.haml
#	features/steps/shared/diff_note.rb
2016-07-07 18:05:34 -04:00
Douwe Maan 29d574868a Display new diff notes and allow creation through the web interface 2016-07-06 18:51:00 -04:00
Douwe Maan a27462a5c6 Extract parts of LegacyDiffNote into DiffOnNote concern and move part of responsibility to other classes 2016-07-06 18:50:59 -04:00
Douwe Maan 375193455a Style diff and blob file headers the same way 2016-07-06 18:50:59 -04:00
Paco Guzman 39b6e678da Simplify HAML code using unless condition and nesting
Extract diff line data attributes to helper methods
2016-07-06 09:02:53 +02:00
Jacob Schatz e065f4848b Diffs will create button/diff form on demand no on server side 2016-07-06 08:29:57 +02:00
Stan Hu 20688cdf07 Be explicit which project and user ID are memoized 2016-06-29 13:42:15 -07:00
Stan Hu 8c29b0b065 Memoize the maximum access level for the author of notes
In #19273, we saw that retrieving ProjectTeam#human_max_access for each
note takes the bulk of the time when rendering certain issues or merge requests.
We observe that most of the comments in an issue are typically done by the
same users. This MR memoizes the max access level by user ID.
2016-06-29 06:26:00 -07:00
Douwe Maan 99d3e21f19 Extract LegacyDiffNote out of Note 2016-05-13 17:31:43 -05:00
Annabel Dunstone 6ee2069768 Fix lint errors 2016-04-07 15:33:18 -07:00
Annabel Dunstone dab4ac54b6 Diff design updates 2016-04-07 15:33:18 -07:00
Annabel Dunstone de63de18d7 Update diff colors and icons 2016-04-07 15:33:18 -07:00