diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 36d229d64f5..d432afd7dad 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -16,25 +16,24 @@ review-cleanup: - ruby -rrubygems scripts/review_apps/automated_cleanup.rb - gcp_cleanup -# Temporarily disabling review apps -#review-build-cng: -# extends: -# - .default-retry -# - .review:rules:review-build-cng -# image: ruby:2.6-alpine -# stage: review-prepare -# before_script: -# - source scripts/utils.sh -# - install_api_client_dependencies_with_apk -# - install_gitlab_gem -# needs: -# - job: compile-production-assets -# artifacts: false -# script: -# - BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng -# # When the job is manual, review-deploy is also manual and we don't want people -# # to have to manually start the jobs in sequence, so we do it for them. -# - '[ -z $CI_JOB_MANUAL ] || play_job "review-deploy"' +review-build-cng: + extends: + - .default-retry + - .review:rules:review-build-cng + image: ruby:2.6-alpine + stage: review-prepare + before_script: + - source scripts/utils.sh + - install_api_client_dependencies_with_apk + - install_gitlab_gem + needs: + - job: compile-production-assets + artifacts: false + script: + - BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng + # When the job is manual, review-deploy is also manual and we don't want people + # to have to manually start the jobs in sequence, so we do it for them. + - '[ -z $CI_JOB_MANUAL ] || play_job "review-deploy"' .review-workflow-base: extends: @@ -42,6 +41,7 @@ review-cleanup: image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-helm3-kubectl1.14 variables: HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" + REVIEW_APPS_DOMAIN: "temp.gitlab-review.app" # FIXME: using temporary domain DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" GITLAB_HELM_CHART_REF: "master" environment: @@ -50,37 +50,37 @@ review-cleanup: on_stop: review-stop auto_stop_in: 48 hours -# Temporarily disabling review apps -#review-deploy: -# extends: -# - .review-workflow-base -# - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise -# stage: review -# dependencies: [] -# resource_group: "review/${CI_COMMIT_REF_NAME}" -# before_script: -# - export GITLAB_SHELL_VERSION=$( environment_url.txt -# - source ./scripts/utils.sh -# - install_api_client_dependencies_with_apk -# - source scripts/review_apps/review-apps.sh -# script: -# - check_kube_domain -# - ensure_namespace -# - install_external_dns -# - download_chart -# - date -# - deploy || (display_deployment_debug && exit 1) -# # When the job is manual, review-qa-smoke is also manual and we don't want people -# # to have to manually start the jobs in sequence, so we do it for them. -# - '[ -z $CI_JOB_MANUAL ] || play_job "review-qa-smoke"' -# - '[ -z $CI_JOB_MANUAL ] || play_job "review-performance"' -# artifacts: -# paths: [environment_url.txt] -# expire_in: 2 days -# when: always +review-deploy: + extends: + - .review-workflow-base + - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise + stage: review + dependencies: [] + resource_group: "review/${CI_COMMIT_REF_NAME}" + before_script: + - export GITLAB_SHELL_VERSION=$( environment_url.txt + - source ./scripts/utils.sh + - install_api_client_dependencies_with_apk + - source scripts/review_apps/review-apps.sh + script: + - check_kube_domain + - ensure_namespace + - install_external_dns + - download_chart + - date + - deploy || (display_deployment_debug && exit 1) + - disable_sign_ups + # When the job is manual, review-qa-smoke is also manual and we don't want people + # to have to manually start the jobs in sequence, so we do it for them. + - '[ -z $CI_JOB_MANUAL ] || play_job "review-qa-smoke"' + - '[ -z $CI_JOB_MANUAL ] || play_job "review-performance"' + artifacts: + paths: [environment_url.txt] + expire_in: 2 days + when: always .review-stop-base: extends: .review-workflow-base @@ -113,110 +113,110 @@ review-stop: script: - delete_release -# Temporarily disabling review apps -#.review-qa-base: -# extends: -# - .default-retry -# - .use-docker-in-docker -# image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.6 -# stage: qa -# # This is needed so that manual jobs with needs don't block the pipeline. -# # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. -# dependencies: ["review-deploy"] -# variables: -# QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa" -# QA_CAN_TEST_GIT_PROTOCOL_V2: "false" -# QA_DEBUG: "true" -# GITLAB_USERNAME: "root" -# GITLAB_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}" -# GITLAB_ADMIN_USERNAME: "root" -# GITLAB_ADMIN_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}" -# GITHUB_ACCESS_TOKEN: "${REVIEW_APPS_QA_GITHUB_ACCESS_TOKEN}" -# EE_LICENSE: "${REVIEW_APPS_EE_LICENSE}" -# before_script: -# - export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_REF_SLUG}" -# - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)" -# - echo "${CI_ENVIRONMENT_URL}" -# - echo "${QA_IMAGE}" -# - source scripts/utils.sh -# - install_api_client_dependencies_with_apk -# - gem install gitlab-qa --no-document ${GITLAB_QA_VERSION:+ --version ${GITLAB_QA_VERSION}} -# artifacts: -# paths: -# - ./qa/gitlab-qa-run-* -# expire_in: 7 days -# when: always -# -#review-qa-smoke: -# extends: -# - .review-qa-base -# - .review:rules:review-qa-smoke -# script: -# - gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -# -#review-qa-all: -# extends: -# - .review-qa-base -# - .review:rules:mr-only-manual -# parallel: 5 -# script: -# - export KNAPSACK_REPORT_PATH=knapsack/master_report.json -# - export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb -# - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation -# -#review-performance: -# extends: -# - .default-retry -# - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise -# image: -# name: sitespeedio/sitespeed.io:6.3.1 -# entrypoint: [""] -# stage: qa -# # This is needed so that manual jobs with needs don't block the pipeline. -# # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. -# dependencies: ["review-deploy"] -# before_script: -# - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)" -# - echo "${CI_ENVIRONMENT_URL}" -# - mkdir -p gitlab-exporter -# - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js -# - mkdir -p sitespeed-results -# script: -# - /start.sh --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}" -# after_script: -# - mv sitespeed-results/data/performance.json performance.json -# artifacts: -# paths: -# - sitespeed-results/ -# reports: -# performance: performance.json -# expire_in: 31d -# -#parallel-spec-reports: -# extends: -# - .review:rules:mr-only-manual -# image: ruby:2.6-alpine -# stage: post-qa -# dependencies: ["review-qa-all"] -# variables: -# NEW_PARALLEL_SPECS_REPORT: qa/report-new.html -# BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/" -# script: -# - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/* -# - gem install nokogiri --no-document -# - cd qa/gitlab-qa-run-*/gitlab-* -# - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_) -# - cd - -# - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}' -# - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm -# artifacts: -# when: always -# paths: -# - qa/report-new.html -# - qa/gitlab-qa-run-* -# reports: -# junit: qa/gitlab-qa-run-*/**/rspec-*.xml -# expire_in: 31d +.review-qa-base: + extends: + - .default-retry + - .use-docker-in-docker + image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.6 + stage: qa + # This is needed so that manual jobs with needs don't block the pipeline. + # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. + dependencies: ["review-deploy"] + variables: + QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa" + QA_CAN_TEST_GIT_PROTOCOL_V2: "false" + QA_DEBUG: "true" + GITLAB_USERNAME: "root" + GITLAB_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}" + GITLAB_ADMIN_USERNAME: "root" + GITLAB_ADMIN_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}" + GITHUB_ACCESS_TOKEN: "${REVIEW_APPS_QA_GITHUB_ACCESS_TOKEN}" + EE_LICENSE: "${REVIEW_APPS_EE_LICENSE}" + SIGNUP_DISABLED: "true" + before_script: + - export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_REF_SLUG}" + - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)" + - echo "${CI_ENVIRONMENT_URL}" + - echo "${QA_IMAGE}" + - source scripts/utils.sh + - install_api_client_dependencies_with_apk + - gem install gitlab-qa --no-document ${GITLAB_QA_VERSION:+ --version ${GITLAB_QA_VERSION}} + artifacts: + paths: + - ./qa/gitlab-qa-run-* + expire_in: 7 days + when: always + +review-qa-smoke: + extends: + - .review-qa-base + - .review:rules:review-qa-smoke + script: + - gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" + +review-qa-all: + extends: + - .review-qa-base + - .review:rules:mr-only-manual + parallel: 5 + script: + - export KNAPSACK_REPORT_PATH=knapsack/master_report.json + - export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb + - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation + +review-performance: + extends: + - .default-retry + - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise + image: + name: sitespeedio/sitespeed.io:6.3.1 + entrypoint: [""] + stage: qa + # This is needed so that manual jobs with needs don't block the pipeline. + # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. + dependencies: ["review-deploy"] + before_script: + - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)" + - echo "${CI_ENVIRONMENT_URL}" + - mkdir -p gitlab-exporter + - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js + - mkdir -p sitespeed-results + script: + - /start.sh --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}" + after_script: + - mv sitespeed-results/data/performance.json performance.json + artifacts: + paths: + - sitespeed-results/ + reports: + performance: performance.json + expire_in: 31d + +parallel-spec-reports: + extends: + - .review:rules:mr-only-manual + image: ruby:2.6-alpine + stage: post-qa + dependencies: ["review-qa-all"] + variables: + NEW_PARALLEL_SPECS_REPORT: qa/report-new.html + BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/" + script: + - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/* + - gem install nokogiri --no-document + - cd qa/gitlab-qa-run-*/gitlab-* + - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_) + - cd - + - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}' + - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm + artifacts: + when: always + paths: + - qa/report-new.html + - qa/gitlab-qa-run-* + reports: + junit: qa/gitlab-qa-run-*/**/rspec-*.xml + expire_in: 31d danger-review: extends: diff --git a/Gemfile b/Gemfile index 099cf5477dc..c86874201fc 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,7 @@ gem 'u2f', '~> 0.2.1' gem 'validates_hostname', '~> 1.0.10' gem 'rubyzip', '~> 2.0.0', require: 'zip' # GitLab Pages letsencrypt support -gem 'acme-client', '~> 2.0.5' +gem 'acme-client', '~> 2.0', '>= 2.0.6' # Browser detection gem 'browser', '~> 2.5' diff --git a/Gemfile.lock b/Gemfile.lock index ae35fa30e6e..ca0884db4a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,8 +4,8 @@ GEM RedCloth (4.3.2) abstract_type (0.0.7) ace-rails-ap (4.1.2) - acme-client (2.0.5) - faraday (~> 0.9, >= 0.9.1) + acme-client (2.0.6) + faraday (>= 0.17, < 2.0.0) actioncable (6.0.3.1) actionpack (= 6.0.3.1) nio4r (~> 2.0) @@ -1169,7 +1169,7 @@ PLATFORMS DEPENDENCIES RedCloth (~> 4.3.2) ace-rails-ap (~> 4.1.0) - acme-client (~> 2.0.5) + acme-client (~> 2.0, >= 2.0.6) activerecord-explain-analyze (~> 0.1) acts-as-taggable-on (~> 6.0) addressable (~> 2.7) diff --git a/app/assets/javascripts/alert_management/components/alert_details.vue b/app/assets/javascripts/alert_management/components/alert_details.vue index 3da338bf13f..d3dca22e1e1 100644 --- a/app/assets/javascripts/alert_management/components/alert_details.vue +++ b/app/assets/javascripts/alert_management/components/alert_details.vue @@ -12,13 +12,15 @@ import { GlTable, } from '@gitlab/ui'; import { s__ } from '~/locale'; -import query from '../graphql/queries/details.query.graphql'; +import alertQuery from '../graphql/queries/details.query.graphql'; +import sidebarStatusQuery from '../graphql/queries/sidebar_status.query.graphql'; import { fetchPolicies } from '~/lib/graphql'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import highlightCurrentUser from '~/behaviors/markdown/highlight_current_user'; import initUserPopovers from '~/user_popovers'; import { ALERTS_SEVERITY_LABELS, trackAlertsDetailsViewsOptions } from '../constants'; -import createIssueQuery from '../graphql/mutations/create_issue_from_alert.graphql'; +import createIssueMutation from '../graphql/mutations/create_issue_from_alert.graphql'; +import toggleSidebarStatusMutation from '../graphql/mutations/toggle_sidebar_status.mutation.graphql'; import { visitUrl, joinPaths } from '~/lib/utils/url_utility'; import Tracking from '~/tracking'; import { toggleContainerClasses } from '~/lib/utils/dom_utils'; @@ -52,28 +54,27 @@ export default { AlertSidebar, SystemNote, }, - props: { + inject: { + projectPath: { + default: '', + }, alertId: { type: String, - required: true, + default: '', }, projectId: { type: String, - required: true, - }, - projectPath: { - type: String, - required: true, + default: '', }, projectIssuesPath: { type: String, - required: true, + default: '', }, }, apollo: { alert: { fetchPolicy: fetchPolicies.CACHE_AND_NETWORK, - query, + query: alertQuery, variables() { return { fullPath: this.projectPath, @@ -88,15 +89,18 @@ export default { Sentry.captureException(error); }, }, + sidebarStatus: { + query: sidebarStatusQuery, + }, }, data() { return { alert: null, errored: false, + sidebarStatus: false, isErrorDismissed: false, createIssueError: '', issueCreationInProgress: false, - sidebarCollapsed: false, sidebarErrorMessage: '', }; }, @@ -132,10 +136,10 @@ export default { this.sidebarErrorMessage = ''; }, toggleSidebar() { - this.sidebarCollapsed = !this.sidebarCollapsed; + this.$apollo.mutate({ mutation: toggleSidebarStatusMutation }); toggleContainerClasses(containerEl, { - 'right-sidebar-collapsed': this.sidebarCollapsed, - 'right-sidebar-expanded': !this.sidebarCollapsed, + 'right-sidebar-collapsed': !this.sidebarStatus, + 'right-sidebar-expanded': this.sidebarStatus, }); }, handleAlertSidebarError(errorMessage) { @@ -147,7 +151,7 @@ export default { this.$apollo .mutate({ - mutation: createIssueQuery, + mutation: createIssueMutation, variables: { iid: this.alert.iid, projectPath: this.projectPath, @@ -197,7 +201,7 @@ export default {
- + { const domEl = document.querySelector(selector); const { alertId, projectPath, projectIssuesPath, projectId } = domEl.dataset; + const resolvers = { + Mutation: { + toggleSidebarStatus: (_, __, { cache }) => { + const data = cache.readQuery({ query: sidebarStatusQuery }); + data.sidebarStatus = !data.sidebarStatus; + cache.writeQuery({ query: sidebarStatusQuery, data }); + }, + }, + }; + const apolloProvider = new VueApollo({ - defaultClient: createDefaultClient( - {}, - { - cacheConfig: { - dataIdFromObject: object => { - // eslint-disable-next-line no-underscore-dangle - if (object.__typename === 'AlertManagementAlert') { - return object.iid; - } - return defaultDataIdFromObject(object); - }, + defaultClient: createDefaultClient(resolvers, { + cacheConfig: { + dataIdFromObject: object => { + // eslint-disable-next-line no-underscore-dangle + if (object.__typename === 'AlertManagementAlert') { + return object.iid; + } + return defaultDataIdFromObject(object); }, }, - ), + }), + }); + + apolloProvider.clients.defaultClient.cache.writeData({ + data: { + sidebarStatus: false, + }, }); // eslint-disable-next-line no-new new Vue({ el: selector, + provide: { + projectPath, + alertId, + projectIssuesPath, + projectId, + }, apolloProvider, components: { AlertDetails, }, render(createElement) { - return createElement('alert-details', { - props: { - alertId, - projectPath, - projectId, - projectIssuesPath, - }, - }); + return createElement('alert-details', {}); }, }); }; diff --git a/app/assets/javascripts/alert_management/graphql/mutations/alert_set_assignees.graphql b/app/assets/javascripts/alert_management/graphql/mutations/alert_set_assignees.graphql index efeaf8fa372..88c374ccf62 100644 --- a/app/assets/javascripts/alert_management/graphql/mutations/alert_set_assignees.graphql +++ b/app/assets/javascripts/alert_management/graphql/mutations/alert_set_assignees.graphql @@ -1,4 +1,4 @@ -mutation($projectPath: ID!, $assigneeUsernames: [String!]!, $iid: String!) { +mutation alertSetAssignees($projectPath: ID!, $assigneeUsernames: [String!]!, $iid: String!) { alertSetAssignees( input: { iid: $iid, assigneeUsernames: $assigneeUsernames, projectPath: $projectPath } ) { diff --git a/app/assets/javascripts/alert_management/graphql/mutations/create_issue_from_alert.graphql b/app/assets/javascripts/alert_management/graphql/mutations/create_issue_from_alert.graphql index 664596ab88f..18c9652b262 100644 --- a/app/assets/javascripts/alert_management/graphql/mutations/create_issue_from_alert.graphql +++ b/app/assets/javascripts/alert_management/graphql/mutations/create_issue_from_alert.graphql @@ -1,4 +1,4 @@ -mutation ($projectPath: ID!, $iid: String!) { +mutation createAlertIssue($projectPath: ID!, $iid: String!) { createAlertIssue(input: { iid: $iid, projectPath: $projectPath }) { errors issue { diff --git a/app/assets/javascripts/alert_management/graphql/mutations/toggle_sidebar_status.mutation.graphql b/app/assets/javascripts/alert_management/graphql/mutations/toggle_sidebar_status.mutation.graphql new file mode 100644 index 00000000000..d9c4813f8e8 --- /dev/null +++ b/app/assets/javascripts/alert_management/graphql/mutations/toggle_sidebar_status.mutation.graphql @@ -0,0 +1,3 @@ +mutation toggleSidebarStatus { + toggleSidebarStatus @client +} diff --git a/app/assets/javascripts/alert_management/graphql/mutations/update_alert_status.graphql b/app/assets/javascripts/alert_management/graphql/mutations/update_alert_status.graphql index 09151f233f5..d07d65bd76c 100644 --- a/app/assets/javascripts/alert_management/graphql/mutations/update_alert_status.graphql +++ b/app/assets/javascripts/alert_management/graphql/mutations/update_alert_status.graphql @@ -1,4 +1,4 @@ -mutation ($projectPath: ID!, $status: AlertManagementStatus!, $iid: String!) { +mutation updateAlertStatus($projectPath: ID!, $status: AlertManagementStatus!, $iid: String!) { updateAlertStatus(input: { iid: $iid, status: $status, projectPath: $projectPath }) { errors alert { diff --git a/app/assets/javascripts/alert_management/graphql/queries/sidebar_status.query.graphql b/app/assets/javascripts/alert_management/graphql/queries/sidebar_status.query.graphql new file mode 100644 index 00000000000..0836f702189 --- /dev/null +++ b/app/assets/javascripts/alert_management/graphql/queries/sidebar_status.query.graphql @@ -0,0 +1,3 @@ +query sidebarStatus { + sidebarStatus @client +} diff --git a/app/assets/javascripts/design_management_new/components/design_destroyer.vue b/app/assets/javascripts/design_management_new/components/design_destroyer.vue index 62460ca551c..7ae569216f0 100644 --- a/app/assets/javascripts/design_management_new/components/design_destroyer.vue +++ b/app/assets/javascripts/design_management_new/components/design_destroyer.vue @@ -13,13 +13,14 @@ export default { type: Array, required: true, }, + }, + inject: { projectPath: { - type: String, - required: true, + default: '', }, iid: { - type: String, - required: true, + from: 'issueIid', + defaut: '', }, }, computed: { diff --git a/app/assets/javascripts/design_management_new/components/design_notes/design_note.vue b/app/assets/javascripts/design_management_new/components/design_notes/design_note.vue index b1f3a43a66d..172e61920ef 100644 --- a/app/assets/javascripts/design_management_new/components/design_notes/design_note.vue +++ b/app/assets/javascripts/design_management_new/components/design_notes/design_note.vue @@ -60,7 +60,7 @@ export default { }, mounted() { if (this.isNoteLinked) { - this.$refs.anchor.$el.scrollIntoView({ behavior: 'smooth', inline: 'start' }); + this.$el.scrollIntoView({ behavior: 'smooth', inline: 'start' }); } }, methods: { @@ -80,7 +80,7 @@ export default {