diff options
-rw-r--r-- | .gitlab-ci.yml | 16 | ||||
-rw-r--r-- | .ruby-version | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue | 7 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/note_form.scss | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/notes.scss | 50 | ||||
-rw-r--r-- | app/views/projects/diffs/_text_file.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/notes/_note.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/notes/_notes_with_form.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/sh-bump-ruby-2-5-3.yml | 5 | ||||
-rw-r--r-- | doc/install/installation.md | 6 | ||||
-rw-r--r-- | spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js | 20 |
11 files changed, 83 insertions, 35 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 422da05ba5f..eb112de1451 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.5-golang-1.9-git-2.18-chrome-69.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29" +image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.5.3-golang-1.9-git-2.18-chrome-69.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29" .dedicated-runner: &dedicated-runner retry: 1 @@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.5-golang-1.9-git - gitlab-org .default-cache: &default-cache - key: "debian-stretch-ruby-2.4.5-node-10.x" + key: "debian-stretch-ruby-2.5.3-node-10.x" paths: - vendor/ruby - .yarn-cache/ @@ -121,7 +121,7 @@ stages: <<: *except-docs-and-qa .single-script-job: &single-script-job - image: ruby:2.4-alpine + image: ruby:2.5-alpine stage: test cache: {} dependencies: [] @@ -227,6 +227,8 @@ stages: script: - git fetch https://gitlab.com/gitlab-org/gitlab-ce.git v9.3.0 - git checkout -f FETCH_HEAD + - sed -i "s/gem 'oj', '~> 2.17.4'//" Gemfile + - bundle update google-protobuf grpc - bundle install $BUNDLE_INSTALL_FLAGS - date - cp config/gitlab.yml.example config/gitlab.yml @@ -316,7 +318,7 @@ review-docs-cleanup: # Trigger a docker image build in CNG (Cloud Native GitLab) repository # cloud-native-image: - image: ruby:2.4-alpine + image: ruby:2.5-alpine before_script: [] dependencies: [] stage: test @@ -369,7 +371,7 @@ update-tests-metadata: flaky-examples-check: <<: *dedicated-runner - image: ruby:2.4-alpine + image: ruby:2.5-alpine services: [] before_script: [] variables: @@ -589,7 +591,7 @@ static-analysis: script: - scripts/static-analysis cache: - key: "debian-stretch-ruby-2.4.5-node-10.x-and-rubocop" + key: "debian-stretch-ruby-2.5.3-node-10.x-and-rubocop" paths: - vendor/ruby - .yarn-cache/ @@ -696,7 +698,7 @@ gitlab:setup-mysql: # Frontend-related jobs gitlab:assets:compile: <<: *dedicated-no-docs-and-no-qa-pull-cache-job - image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-git-2.18-chrome-69.0-node-8.x-yarn-1.2-graphicsmagick-1.3.29-docker-18.06.1 + image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.5.3-git-2.18-chrome-69.0-node-8.x-yarn-1.2-graphicsmagick-1.3.29-docker-18.06.1 dependencies: [] services: - docker:stable-dind diff --git a/.ruby-version b/.ruby-version index 59aa62c1fa4..aedc15bb0c6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.5 +2.5.3 diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue index e68a2aa73fa..d7f24c1afc5 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue @@ -44,8 +44,11 @@ export default { isNew() { return this.diffMode === diffModes.new; }, + isRenamed() { + return this.diffMode === diffModes.renamed; + }, imagePath() { - return this.isNew ? this.newPath : this.oldPath; + return this.isNew || this.isRenamed ? this.newPath : this.oldPath; }, }, methods: { @@ -114,7 +117,7 @@ export default { }]" > <slot - v-if="isNew" + v-if="isNew || isRenamed" slot="image-overlay" name="image-overlay" > diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index 855d73a9939..45b921a2fbb 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -176,8 +176,10 @@ background-color: $white-light; } -.discussion-form-container { - padding: $gl-padding-top $gl-padding $gl-padding; +table { + .discussion-form-container { + padding: $gl-padding-top $gl-padding $gl-padding; + } } .discussion-notes .disabled-comment { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index adcc3577a9c..35e01c9c807 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -13,12 +13,32 @@ $note-form-margin-left: 72px; } } +@mixin outline-comment() { + margin: $gl-padding; + border: 1px solid $border-color; + border-radius: $border-radius-default; +} + .note-wrapper { padding: $gl-padding; + + &.outlined { + @include outline-comment(); + } +} + +.main-notes-list { + @include vertical-line(39px); } -.issuable-discussion { - .notes.timeline > .timeline-entry { +.notes { + display: block; + list-style: none; + margin: 0; + padding: 0; + position: relative; + + &.timeline > .timeline-entry { border: 1px solid $border-color; border-radius: $border-radius-default; margin: $gl-padding 0; @@ -51,18 +71,6 @@ $note-form-margin-left: 72px; border-top: 1px solid $border-color; } } -} - -.main-notes-list { - @include vertical-line(36px); -} - -.notes { - display: block; - list-style: none; - margin: 0; - padding: 0; - position: relative; > .note-discussion { .card { @@ -476,9 +484,7 @@ $note-form-margin-left: 72px; } .note-wrapper { - margin: $gl-padding; - border: 1px solid $border-color; - border-radius: $border-radius-default; + @include outline-comment(); } .discussion-reply-holder { @@ -488,6 +494,16 @@ $note-form-margin-left: 72px; } } +.commit-diff { + .notes { + @include vertical-line(52px); + } + + .discussion-reply-holder { + border-top: 1px solid $border-color; + } +} + .discussion-header, .note-header-info { a { diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index e8a5e63e59e..bc9f6c71fa8 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -3,7 +3,7 @@ .suppressed-container %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show. -%table.text-file.diff-wrap-lines.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' } +%table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' } = render partial: "projects/diffs/line", collection: diff_file.highlighted_diff_lines, as: :line, diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml index 84adbd444c5..bc918430823 100644 --- a/app/views/shared/notes/_note.html.haml +++ b/app/views/shared/notes/_note.html.haml @@ -5,7 +5,7 @@ - note_editable = can?(current_user, :admin_note, note) - note_counter = local_assigns.fetch(:note_counter, 0) -%li.timeline-entry{ id: dom_id(note), +%li.timeline-entry.note-wrapper.outlined{ id: dom_id(note), class: ["note", "note-row-#{note.id}", ('system-note' if note.system)], data: { author_id: note.author.id, editable: note_editable, diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index ec1e10bb0c1..4c4050c6054 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -8,7 +8,7 @@ - if can_create_note? .notes.notes-form.timeline - .timeline-entry + .timeline-entry.note-form .timeline-entry-inner .flash-container.timeline-content diff --git a/changelogs/unreleased/sh-bump-ruby-2-5-3.yml b/changelogs/unreleased/sh-bump-ruby-2-5-3.yml new file mode 100644 index 00000000000..13cadc73e9c --- /dev/null +++ b/changelogs/unreleased/sh-bump-ruby-2-5-3.yml @@ -0,0 +1,5 @@ +--- +title: Upgrade to Ruby 2.5.3 +merge_request: 2806 +author: +type: performance diff --git a/doc/install/installation.md b/doc/install/installation.md index 316411d1047..cac97b63d92 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -132,9 +132,9 @@ Remove the old Ruby 1.8 if present: Download Ruby and compile it: mkdir /tmp/ruby && cd /tmp/ruby - curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz - echo '4d650f302f1ec00256450b112bb023644b6ab6dd ruby-2.4.5.tar.gz' | shasum -c - && tar xzf ruby-2.4.5.tar.gz - cd ruby-2.4.5 + curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz + echo 'f919a9fbcdb7abecd887157b49833663c5c15fda ruby-2.5.3.tar.gz' | shasum -c - && tar xzf ruby-2.5.3.tar.gz + cd ruby-2.5.3 ./configure --disable-install-rdoc make diff --git a/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js b/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js index 2d3e178d249..7f2e246d656 100644 --- a/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js +++ b/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js @@ -97,6 +97,26 @@ describe('ImageDiffViewer', () => { }); }); + it('renders image diff for renamed', done => { + vm = new Vue({ + components: { + imageDiffViewer, + }, + template: ` + <image-diff-viewer diff-mode="renamed" new-path="${GREEN_BOX_IMAGE_URL}" old-path=""> + <span slot="image-overlay" class="overlay">test</span> + </image-diff-viewer> + `, + }).$mount(); + + setTimeout(() => { + expect(vm.$el.querySelector('img').getAttribute('src')).toBe(GREEN_BOX_IMAGE_URL); + expect(vm.$el.querySelector('.overlay')).not.toBe(null); + + done(); + }); + }); + describe('swipeMode', () => { beforeEach(done => { createComponent({ |