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
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
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)


See merge request !4417
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
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
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)

See merge request !4374
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)


See merge request !4468
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)


cc @dzaporozhets
See merge request !4447
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
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
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.
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:

After:

cc: @jschatz1
See merge request !4490
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)

See merge request !4400
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)

See merge request !4402
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.


See merge request !4442
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:



cc: @jschatz1 @dzaporozhets
See merge request !4473