Commit Graph
15369 Commits
Author SHA1 Message Date
Rémy Coutable 07b32287e5 Merge branch 'git-http-controller' into 'master'
Dismantling Grack::Auth part 1: Git HTTP clients

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/14501

This does not completely get rid of Grack::Auth yet because Git LFS
support is 'behind' it and I would like to not make this MR bigger
than needed.

- changed tests to make HTTP requests instead of calling Rack apps
- added missing test cases for Git HTTP authentication
- moved Git HTTP requests into a 'normal' Rails controller

See merge request !3361
2016-06-08 14:03:27 +00:00
Rémy Coutable 99ea32714b Merge branch 'fix-endless-redirect' into 'master'
Fix endless redirections when accessing user OAuth applications when they are disabled

## What does this MR do?

This MR fixes a bug where the browser would be redirect endlessly when attempting to access the user's OAuth applications when an admin has disabled this system-wide setting.

## Are there points in the code the reviewer needs to double check?

I assume disabling the nav button is better than showing a page that says, "OAuth applications are disabled by the admin."

## Why was this MR needed?

Lots of users were confused when they hit endless redirect errors.

## What are the relevant issue numbers?

#14770 

See merge request !4525
2016-06-08 13:57:58 +00:00
Stan Hu 3b50d96b8a Fix endless redirections when accessing user OAuth applications when they are disabled
Also hides the "Applications" nav button if OAuth applications are disabled by the admin.

Closes #14770
2016-06-08 05:52:04 -07:00
Jacob Vosmaer bebe110dff Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-http-controller
Conflicts:
	lib/gitlab/workhorse.rb
2016-06-08 10:31:33 +02:00
Jacob Schatz 915ad255cd Merge branch '18080-project-header-alignment' into 'master'
Add flexbox to project header

## What does this MR do?
Adds flexbox to project header to keep components vertically centered regardless of description presence/length

## What are the relevant issue numbers?
Closes  #18080 

## Screenshots (if relevant)
![Screen_Shot_2016-06-01_at_12.02.42_PM](/uploads/edd769110b52ec34046f4079619e45eb/Screen_Shot_2016-06-01_at_12.02.42_PM.png)     
![Screen_Shot_2016-06-01_at_12.02.35_PM](/uploads/c5c2828ba5688a2588d3721a2d21d5fe/Screen_Shot_2016-06-01_at_12.02.35_PM.png)

See merge request !4417
2016-06-08 03:39:59 +00:00
Jacob Schatz 402767e0f5 Merge branch '18074-cancel-pipeline-text' into 'master'
Change color of canceled ci text to gray

## What does this MR do?
Change text color of Canceled builds from `$gl-danger` to `$gl-gray`

## What are the relevant issue numbers?
Closes #18074 

## Screenshots (if relevant)
<img src="/uploads/f2ac59c5081c31cfb34bdc0470e31384/Screen_Shot_2016-06-01_at_10.38.17_AM.png" width="600px">

See merge request !4412
2016-06-08 03:39:48 +00:00
Robert Speicher fd248392dd Merge branch 'optimise-email-css' into 'master'
Optimise email CSS for speed with Premailer

Speed up emails-on-push by removing all descendant selectors from the
CSS they use, which can make the CSS inlining much more efficient in
certain cases.

See: https://gitlab.com/gitlab-org/gitlab-ee/issues/490

See merge request !4511
2016-06-07 20:42:52 +00:00
Jacob Schatz babf20c8ab Merge branch 'notification-dropdown-labels' into 'master'
Notifications dropdown on project page now has descriptions

## What does this MR do?

Adds descriptions to the notification settings dropdown on project pages. Also changed the order of them to make more sense.

## What are the relevant issue numbers?

Part of #12758

## Screenshots (if relevant)

![Screen_Shot_2016-05-31_at_09.35.24](/uploads/b30d82701a13ec15f672139e1225acf5/Screen_Shot_2016-05-31_at_09.35.24.png)

See merge request !4374
2016-06-07 18:06:37 +00:00
Jacob Schatz c3ce61ba41 Merge branch '18058-sub-nav' into 'master'
Sub navigation

## What does this MR do?
Styles sub nav   
cc @dzaporozhets  @skyruler @jschatz1 

## What are the relevant issue numbers?
#18058 and #17983 

## Screenshots (if relevant)
![Screen_Shot_2016-06-03_at_12.10.26_PM](/uploads/8b948c32699a93ab0a390bda31e0e411/Screen_Shot_2016-06-03_at_12.10.26_PM.png)
![Screen_Shot_2016-06-03_at_12.10.34_PM](/uploads/241115c35d0618f3de739be9a670416d/Screen_Shot_2016-06-03_at_12.10.34_PM.png)

See merge request !4468
2016-06-07 17:13:21 +00:00
Jacob Schatz 7d315aecfb Merge branch '18013-compact-sidebar' into 'master'
Implement compact side nav

## What does this MR do?
Implements new compact nav design   
Note- new navbar icons are in a separate MR (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4268)

## What are the relevant issue numbers?
Closes #18013 

## Screenshots (if relevant)
![Screen_Shot_2016-06-02_at_3.20.37_PM](/uploads/d31bd17ae47743f1a20d7429b4396e84/Screen_Shot_2016-06-02_at_3.20.37_PM.png)   
![Screen_Shot_2016-06-02_at_3.20.43_PM](/uploads/d03a080a57707b6a2161127f3904fcd5/Screen_Shot_2016-06-02_at_3.20.43_PM.png)

cc @dzaporozhets 

See merge request !4447
2016-06-07 17:00:44 +00:00
Jacob Schatz 5b83abcc01 Merge branch 'issue_14189' into 'master'
Ability to prioritize labels

Closes #14189 

See merge request !4009
2016-06-07 15:15:07 +00:00
Annabel Dunstone ae6591081a Fix alignment of wiki top area 2016-06-07 10:05:10 -05:00
Annabel Dunstone ef37b57f1f Update charcoal theme colors 2016-06-07 09:16:59 -05:00
Annabel Dunstone 2293100d95 Update nav link font size and spacing; fix hamburger icon 2016-06-07 09:16:59 -05:00
Annabel Dunstone e8a0cafc7d Fix control btn position 2016-06-07 09:16:59 -05:00
Annabel Dunstone ffbd9cd02d Test impersonation using img data attribute instead of username 2016-06-07 09:16:59 -05:00
Annabel Dunstone 7c501895a3 Implement compact side nav 2016-06-07 09:16:59 -05:00
Annabel Dunstone 04dba0e5f8 Align links and tabs 2016-06-07 09:08:15 -05:00
Annabel Dunstone a528b649bf Add scrolling tabs to code subnav 2016-06-07 09:08:15 -05:00
Annabel Dunstone 5db95f5e69 Finish styling sub nav 2016-06-07 09:08:15 -05:00
Phil Hughes f62df363b5 Updated colors 2016-06-07 15:02:00 +01:00
Phil Hughes 51a62fce04 Fixed failing tests 2016-06-07 15:02:00 +01:00
Phil Hughes e141a1c6f1 Notifications dropdown on project page now has descriptions
This is part of #12758
2016-06-07 15:02:00 +01:00
Annabel Dunstone 664afebbe9 Start styling sub nav 2016-06-07 08:59:40 -05:00
Sean McGivern ee26c3cab4 Fix label order by priority on labels page 2016-06-07 14:01:30 +01:00
Jacob Vosmaer (GitLab) afa21054fa Merge branch 'zj-workhorse-to-serve-diffs' into 'master'
Workhorse to serve raw diffs

Fixes (partially) #13999

Dependent on: gitlab-org/gitlab-workhorse!45

See merge request !4130
2016-06-07 12:50:29 +00:00
Douwe Maan 8c356ac550 Merge branch 'rename-ci-commit-phase-3' into 'master'
Rename ci_commit in application code

This is third iteration of renaming `[ci_]commit(s)` in application code to `pipeline(s)`.


See merge request !4464
2016-06-07 12:47:25 +00:00
Douwe Maan 3368afd767 Merge branch 'rename-ci-commit-phase-2' into 'master'
Rename Ci::Commit in specs

This is second iteration of renaming Ci::Commit occurences, this time I try to rename all `let's` and `factories` to match what type of object is created:

1. Rename factories: `ci_[...]_commit_[...]` to `ci_[...]_pipeline_[...]`,
2. Rename all `let's(:[ci_]commit)` to `let(:pipeline)`,
3. Rename all occurrences of `[ci_]commit` to `pipeline` if Pipeline object is created

cc @grzesiek @DouweM 

See merge request !4463
2016-06-07 12:45:59 +00:00
Sean McGivern f4cedacc7b Optimise email CSS for speed with Premailer
Remove all descendant selectors from the push email styling, to
drastically reduce CPU time when inlining the CSS for syntax-highlighted
diffs.

Background:

Premailer is a Ruby gem that inlines CSS styles from an external
stylesheet before emails are sent, so that they are compatible with
Gmail. At a high level, it parses the CSS files it finds, and parses the
email body with Nokogiri. It then loops through the selectors in the
CSS, using Nokogiri to find matching elements, and adds inline
styles. (It does more than this, like merging styles applied to the same
element, but that's not relevant to this issue.)

Nokogiri converts CSS selectors to XPath first, like so:
    Nokogiri::CSS.xpath_for('foo bar')
    # => ["//foo//bar"]

On documents with high node counts (say, a syntax-highlighted copy of
jQuery), having both descendant selectors is very expensive. Both
`//foo/bar` and `//bar` will be much more efficient, although neither
are directly equivalent.

An example, on a document containing two syntax-highlighted copies of
jQuery:
    Benchmark.realtime { p doc.search('.o').count }
    # 9476
    # => 0.3462457580026239
    Benchmark.realtime { p doc.search('.code.white .o').count }
    # 9476
    # => 85.51952634402551

The performance is similar for selectors which _don't_ match any
elements, and as Premailer loops through all the available selectors, we
want to avoid all descendant selectors in push emails.

Because of the theming support in the web UI, all syntax highlighting
selectors are descendant selectors of classes like `.code.white` or
`.code.monokai`. There are over 60 CSS classes for syntax highlighting
styles alone, all of which are expressed in the inefficient form above.

In emails we always use the white theme, and were reusing the same CSS
file. But in emails, we don't need to descend from `.code.white` as that
will always be the theme, and we can also remove some other selectors
that are only applicable to the web UI. For the remaining descendant
selectors, we can convert them to child selectors, type selectors, or
class selectors as appropriate.

As in the example above, having no descendant selectors at all in the
push email CSS can provide a drastic (and surprising) performance
improvement.
2016-06-07 12:33:19 +01:00
Kamil Trzcinski b0eb4cb4a7 Rename @ci_commit to @pipeline in MergeRequestController 2016-06-07 13:19:15 +02:00
Douwe Maan 8c5712a422 Merge branch 'gh-disable-webhooks' 2016-06-07 13:06:43 +02:00
Kamil Trzcinski 9839bbae9c Merge branch 'rename-ci-commit-phase-2' into rename-ci-commit-phase-3 2016-06-07 10:27:27 +02:00
Kamil Trzcinski 6e64d1ac76 Merge remote-tracking branch 'origin/master' into rename-ci-commit-phase-2 2016-06-07 10:26:27 +02:00
Kamil Trzcinski dbf235f514 Fix tests failures 2016-06-07 10:25:57 +02:00
Alejandro Rodríguez fbd2169f99 Use better_errors editor links in sherlock
Remember to configure your `better_errors` editor to point to your program of preference
2016-06-06 18:27:26 -04:00
Jacob Schatz 740a6ecba0 Merge branch 'wiki-bottom-padding' into 'master'
Add padding to bottom of wiki page, fix #12921.

## What does this MR do?
Adds padding to the bottom of the wiki page so it's not right up against the edge of the browser window.

## What are the relevant issue numbers?
#12921

## Screenshots (if relevant)

Before:

![Screen_Shot_2016-06-06_at_12.21.22_PM](/uploads/9710682a57f5e521253f17a65f896f4d/Screen_Shot_2016-06-06_at_12.21.22_PM.png)

After:

![Screen_Shot_2016-06-06_at_12.20.50_PM](/uploads/002068b072050e0f8146757a0386d30f/Screen_Shot_2016-06-06_at_12.20.50_PM.png)

cc: @jschatz1 

See merge request !4490
2016-06-06 20:29:12 +00:00
Jacob Schatz f73292e471 Merge branch 'activity-links' into 'master'
Fixed issue with activity links not being consistent

## What does this MR do?

Previously, links for opening an issue/merge request & commenting where different. Opening would only have a link on the number whereas commenting would have link on the text as well. This standardises it to include the type as well (ie. issue)

## What are the relevant issue numbers?

Closes #17621 

## Screenshots (if relevant)

![Screen_Shot_2016-06-01_at_12.12.09](/uploads/c778b007e6b6c068fcae30e34409ce98/Screen_Shot_2016-06-01_at_12.12.09.png)

See merge request !4400
2016-06-06 19:07:19 +00:00
Jacob Schatz 37afdb076f Merge branch 'edit-mobile' into 'master'
Shows the edit comment button on mobile

## What does this MR do?

Shows the edit comment button on mobile.

## What are the relevant issue numbers?

Closes #17214 

## Screenshots (if relevant)

![Screen_Shot_2016-06-01_at_12.33.13](/uploads/d46b800c175a53821ea8e8af49c07641/Screen_Shot_2016-06-01_at_12.33.13.png)

See merge request !4402
2016-06-06 19:05:51 +00:00
Jacob Schatz 410130b807 Merge branch '18026-consider-removing-issue-merge-request-previous-next-buttons' into 'master'
Remove prev/next buttons on issues and merge requests

## What does this MR do?

Remove prev/next buttons on issues and merge requests sidebar

## Are there points in the code the reviewer needs to double check?

No

## Why was this MR needed?

The buttons were rarely used and added at least 1 query each on every page load which we could live without.

## What are the relevant issue numbers?

#18026

## Screenshots (if relevant)

Below is how it looks. Not sure if it's too much empty space. #17697 discusses a possible substitute for what to put there.

![Captura_de_pantalla_2016-06-06_a_las_11.09.26_a.m.](/uploads/7b379327aa6c608775f99bf47a9c3352/Captura_de_pantalla_2016-06-06_a_las_11.09.26_a.m..png)

![Captura_de_pantalla_2016-06-06_a_las_11.09.38_a.m.](/uploads/68bcae6754ed5ac48f1a6925fdd17d3f/Captura_de_pantalla_2016-06-06_a_las_11.09.38_a.m..png)

See merge request !4442
2016-06-06 18:40:42 +00:00
Jacob Schatz ed9b1bd63f Merge branch 'confidential-issue-notice' into 'master'
Add confidential issue notice in comment box.

## What does this MR do?

Adds a warning about confidential issues to the comment field when the issue is confidential.

## Are there points in the code the reviewer needs to double check?

I don't think so.

## Why was this MR needed?

It wasn't clear to users that they were commenting on a confidential issue, this makes it more explicit.

## What are the relevant issue numbers?

Fixes #15288 

## Screenshots (if relevant)

This is what it looks like at various screen sizes:

![Screen_Shot_2016-06-03_at_2.56.54_PM](/uploads/eb7f318bc19101f8514d7a4f10a77d73/Screen_Shot_2016-06-03_at_2.56.54_PM.png)

![Screen_Shot_2016-06-03_at_2.58.51_PM](/uploads/13674c3f1227b0d566b1d2aafc6712ed/Screen_Shot_2016-06-03_at_2.58.51_PM.png)

![Screen_Shot_2016-06-03_at_2.58.37_PM](/uploads/14ad419ed3ed86b7fbc080152e4030fa/Screen_Shot_2016-06-03_at_2.58.37_PM.png)

cc: @jschatz1 @dzaporozhets 

See merge request !4473
2016-06-06 18:29:48 +00:00
Kamil Trzcinski 1311f8c2c1 Merge branch 'rename-ci-commit-phase-2' into rename-ci-commit-phase-3 2016-06-06 20:24:30 +02:00
Kamil Trzcinski 4e38d88df5 Merge remote-tracking branch 'origin/master' into rename-ci-commit-phase-2 2016-06-06 20:24:21 +02:00
Kamil Trzcinski 8562cb5f78 Merge branch 'rename-ci-commit' into rename-ci-commit-phase-2 2016-06-06 20:24:13 +02:00
Connor Shea d2b7c39a55 Add padding to bottom of wiki page, fix #12921. 2016-06-06 12:22:59 -06:00
Alfredo Sumaran a04897b76b Typo 2016-06-06 11:59:49 -05:00
Sean McGivernandAlfredo Sumaran bf193eb78b Remove unnecessary null-specific order 2016-06-06 11:59:49 -05:00
Sean McGivernandAlfredo Sumaran 77f30af017 Tidy up Ruby style in templates 2016-06-06 11:59:49 -05:00
Alfredo Sumaran a966e6e451 Initialize LabelManager only when necessary 2016-06-06 11:59:49 -05:00
Alfredo Sumaran b4e4e61184 Show functionality only for users with the ability to edit labels 2016-06-06 11:59:49 -05:00
Alfredo Sumaran e487b0995c Improve functionality 2016-06-06 11:59:49 -05:00