Commit 63201925 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'deploy-widget' into 'master'

Only hide deploy status external link on x-small screens.

## What does this MR do?

Fixes [a regression](https://gitlab.com/gitlab-org/gitlab-ce/commit/03ea01946524a74773b24430c81804c2724b84b6#68dead621eaa630b5150a4d71b59fa3cd19030fd_57_50) where the deploy status widget hides only the text within the widget, and only for screens within bootstrap's 'small' range (≥544px - <768px).
 
## Are there points in the code the reviewer needs to double check?

I changed the viewport width range to hide the widget from `sm` to `xs` because when the external link is removed, it seems to fit comfortably even on xs viewports. 

Given that we were already hiding the external link (along with all of the deploy text) on `sm` viewports, I assume it's okay to hide the external link still, instead of wrapping it to a new line. 

We could remove the conditional hiding altogether though, and allow the external link to wrap. Definitely doesn't look as nice, but if it's important to show the external link along with the deploy status, we could make it look better when it wraps.

## Why was this MR needed?

Looked buggy, and prevented context being given for build passed icon on smaller screens.

## Screenshots (if relevant)

Before: 

![57efae92cd57c192075546](/uploads/22b278756de4ca6ab3949a4a9692994e/57efae92cd57c192075546.gif)

After: 

![57efaeb41b211194979047](/uploads/b178ddfbbdcfe74d2ce9f52e989a6878/57efaeb41b211194979047.gif)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [ ] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/22778

cc: @jschatz1

See merge request !6633
parents 7c8c8088 01af0aab
......@@ -54,6 +54,7 @@ v 8.13.0 (unreleased)
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
- Fix unnecessary escaping of reserved HTML characters in milestone title. !6533
- Add organization field to user profile
- Fix deploy status responsiveness error !6633
- Fix resolved discussion display in side-by-side diff view !6575
- Optimize GitHub importing for speed and memory
- API: expose pipeline data in builds API (!6502, Guilherme Salazar)
......
......@@ -49,11 +49,12 @@
.mr-widget-heading
.ci_widget.ci-success
= ci_icon_for_status("success")
%span.hidden-sm
%span
Deployed to
= succeed '.' do
= link_to environment.name, environment_path(environment), class: 'environment'
- external_url = environment.external_url
- if external_url
= link_to external_url, target: '_blank' do
= icon('external-link', text: "View on #{external_url.gsub(/\A.*?:\/\//, '')}", right: true)
%span.hidden-xs View on #{external_url.gsub(/\A.*?:\/\//, '')}
= icon('external-link', right: true)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment