Douwe Maan
eeb41c759e
Add endpoints to resolve diff notes and discussions
2016-07-25 22:45:23 -06:00
Phil Hughes
4af0146fa5
Assigns to variable rather than using VueJS method
2016-07-24 13:10:54 -06:00
Phil Hughes
a55c1232b5
Resolve all endpoint
2016-07-24 13:10:54 -06:00
Phil Hughes
b550e6ee67
Posts to rails to update note eventually
2016-07-24 13:10:38 -06:00
Douwe Maan
79214be727
Add Discussion model to represent MR/diff discussion
2016-07-20 16:18:18 -06:00
Douwe Maan
29d574868a
Display new diff notes and allow creation through the web interface
2016-07-06 18:51:00 -04:00
Yorick Peterse
d470f3d195
Support for rendering/redacting multiple documents
...
This commit changes the way certain documents are rendered (currently
only Notes) and how documents are redacted. Previously both rendering
and redacting would run on a per document basis. The result of this was
that for every document we'd have to run countless queries just to
figure out if we could display a set of links or not.
This commit changes things around so that redacting Markdown documents
is no longer tied into the html-pipeline Gem. This in turn allows it to
redact multiple documents in a single pass, thus reducing the number of
queries needed.
In turn rendering issue/merge request notes has been adjusted to take
advantage of this new setup. Instead of rendering Markdown somewhere
deep down in a view the Markdown is rendered and redacted in the
controller (taking the current user and all that into account). This has
been done in such a way that the "markdown()" helper method can still be
used on its own.
This particular commit also paves the way for caching rendered HTML on
object level. Right now there's an accessor method Note#note_html which
is used for setting/getting the rendered HTML. Once we cache HTML on row
level we can simply change this field to be a column and call a "save"
whenever needed and we're pretty much done.
2016-06-24 11:46:39 +02:00
ZJ van de Weg
2f9c2149a3
Backend awardables on comments
2016-06-06 11:03:39 +02:00
Fatih Acet
6c89e2fd41
Merge branch 'awardables' of gitlab.com:gitlab-org/gitlab-ce into awardables
2016-05-18 13:23:40 -05:00
Fatih Acet
bb883387f9
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into awardables
...
# Conflicts:
# app/controllers/projects/merge_requests_controller.rb
# app/models/note.rb
# db/schema.rb
# spec/models/note_spec.rb
2016-05-18 13:05:53 -05:00
Dmitriy Zaporozhets
253a017b01
Merge branch 'meinac/gitlab-ce-change_deprecated_render_usage'
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-05-18 12:48:23 -05:00
ZJ van de Weg
e0cabb67d0
Fix latests concerns
2016-05-18 08:47:15 -05:00
Douwe Maan
99d3e21f19
Extract LegacyDiffNote out of Note
2016-05-13 17:31:43 -05:00
Zeger-Jan van de Weg
dccf8a9fc8
Add tests on Awardables and Award Emoji
2016-05-10 12:03:13 +02:00
Zeger-Jan van de Weg
3bdc57f0a7
Create table for award emoji
2016-05-06 10:47:11 +02:00
Robert Schilling
9aefaa41ab
Fix code review issues
2016-04-12 14:24:05 +02:00
Robert Schilling
ba21c00f01
Delete notes via API
2016-04-12 14:24:05 +02:00
Mehmet Emin İNAÇ
6a0ea605e8
Change deprecated usage of rendering without response body
...
`render nothing: true` has been deprecated.
For more information see [pr](https://github.com/rails/rails/pull/20336 )
2016-03-16 03:16:25 +02:00
Josh Frye
f9218898ec
[WIP] Background process note logic for #3948
2016-01-28 13:04:42 -05:00
Rémy Coutable
491c2248c0
Fix diff comments loaded by AJAX to load comment with diff in discussion tab
...
This commits also fixes two minor issues:
- Ensure notes that the current user is not allowed to see are not
returned in the AJAX notes loading
- Ensure the notes counter badge is decremented of 1 instead of 2
2016-01-19 18:22:01 +01:00
Valery Sizov
a48dd40a92
base implementation of emoji picker [ci skip]
2015-12-22 23:12:23 +02:00
Dmitriy Zaporozhets
40104746d6
Merge remote-tracking branch 'origin/feature/update-rubocop'
2015-12-16 13:44:50 +01:00
Gabriel Mazetto
b5291f9599
Fixed Rubocop offenses
2015-12-15 00:53:52 -02:00
Robert Speicher
118d96906a
Fix note polling
...
Closes #4032
2015-12-12 12:38:12 -05:00
Grzegorz Bizon
a527f5c27f
Notify user when award-emoji comment is invalid
2015-12-03 13:38:59 +01:00
Grzegorz Bizon
bfce5d7168
Render json message with errors if note didn't pass validation
2015-12-03 13:38:59 +01:00
Valery Sizov
3fc10d46f1
Emoji bug: Invalid url to image
2015-11-22 01:51:00 +02:00
Valery Sizov
fbac9e106d
Award: merge request fix
2015-11-21 19:17:06 +02:00
Valery Sizov
f31ee52507
Fix for Emoji
2015-11-20 11:13:43 +02:00
Valery Sizov
bdf4007cb7
adressing comments
2015-11-19 18:12:17 +02:00
Valery Sizov
a2912074be
satisfy rubocop
2015-11-19 01:31:15 +02:00
Valery Sizov
23df515fd0
Emoji: fix image of emoji when it is submitted via comment
2015-11-19 01:26:00 +02:00
Valery Sizov
fd2c0fe446
award emoji
2015-11-19 01:25:27 +02:00
Robert Speicher
c8e53d4467
Revert "Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list"
...
This reverts commit 63144cd062 , reversing
changes made to 8ab5df9d87 .
2015-11-16 13:08:08 -05:00
Jason Lee
1974087114
Avoid render edit_form in each notes.
...
Use RJS to render edit note feature.
Before:
```
Rendered projects/notes/_note.html.haml (27.9ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.7ms)
Rendered projects/_md_preview.html.haml (3.9ms)
Rendered projects/notes/_edit_form.html.haml (6.9ms)
Rendered projects/notes/_note.html.haml (17.7ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.6ms)
Rendered projects/_md_preview.html.haml (3.4ms)
Rendered projects/notes/_edit_form.html.haml (7.0ms)
```
After:
```
Rendered projects/notes/_note.html.haml (13.8ms)
Rendered projects/notes/_note.html.haml (7.1ms)
Rendered projects/notes/_note.html.haml (9.5ms)
Rendered projects/notes/_note.html.haml (8.5ms)
```
This change reduce at least 6ms * N ('N' - number of notes).
2015-11-12 13:16:35 +08:00
Stan Hu
9bfc531ec6
Redirect to a default path if HTTP_REFERER is not set
...
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.
Closes #3122
Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Douwe Maan
36bd6c8494
Show who last edited a comment if it wasn't the original author
2015-07-30 14:45:54 +02:00
Dmitriy Zaporozhets
d63371ad78
Update controller filters
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 16:44:21 +02:00
Stan Hu
a7932fe2fd
Support commenting on a diff in side-by-side view
...
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
2015-06-16 06:11:59 -07:00
Jeroen van Baarsen
5a4ebfb47a
Fixed the Rails/ActionFilter cop
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Stan Hu
b8c9257fb1
Fix bug where editing a comment with "+1" or "-1" would cause a server error
...
Closes #1151
2015-03-02 15:26:00 -08:00
Vinnie Okada
5700842ba8
Add Markdown preview to more forms
...
Enable Markdown previews when creating and editing issues, merge
requests, and milestones, and when editing notes.
2014-10-15 23:52:33 -05:00
Dmitriy Zaporozhets
01520d5d77
Dont allow edit or remove of system notes
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-29 15:19:35 +03:00
Dmitriy Zaporozhets
16a0a4aecc
Note strong_params
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 16:49:22 +03:00
Dmitriy Zaporozhets
907548a0fb
dont render discussion diff unless note is for diff
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-25 10:14:35 +03:00
Dmitriy Zaporozhets
30912c75b8
Improve merge request comments
...
When add diff note on 'Changes' page - and then go to 'Discussions' tab
you will not see this discussion unless you reload a page. This commit
fixes it by rendering discussion on 'Discussion' page as soon as you
submit comment on 'Changes' page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-24 14:57:59 +03:00
Dmitriy Zaporozhets
6149dba518
Remove NotesObserver
2014-06-17 22:09:01 +03:00
Jacob Vosmaer
285926918b
Serialize last_fetched_at as a string with seconds
2014-04-28 12:42:01 +02:00
Jacob Vosmaer
7ec5ff4dba
Pass last_fetched_at for notes to javascript
2014-04-28 12:21:49 +02:00
Dmitriy Zaporozhets
645e8d4705
Move services for collecting items to Finders
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 19:15:08 +02:00