Commit 3283e439 authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by Kushal Pandya

Revert "Fixed comparing value to undefined"

This reverts commit d754beb74fbc06a2c744e15be4aa2831d8cef1c0.
parent fd92bd24
......@@ -36,6 +36,10 @@ MarkdownPreview.prototype.showPreview = function($form) {
mdText = $form.find('textarea.markdown-area').val();
if (mdText === undefined) {
return;
}
if (mdText.trim().length === 0) {
preview.text(this.emptyMessage);
this.hideReferencedUsers($form);
......
......@@ -27,7 +27,6 @@ export default {
return {
width: 0,
height: 0,
isLoaded: false,
};
},
computed: {
......@@ -63,8 +62,6 @@ export default {
this.height = contentImg.naturalHeight;
this.$nextTick(() => {
this.isLoaded = true;
this.$emit('imgLoaded', {
width: this.width,
height: this.height,
......
......@@ -3,7 +3,7 @@
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/660) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.2.
CAUTION: **Warning:**
This an __alpha__ feature and is subject to change at any time without
This an **alpha** feature and is subject to change at any time without
prior notice.
## Overview
......@@ -56,3 +56,14 @@ of the design, and will replace the previous version.
Images on the Design Management page can be enlarged by clicking on them.
## Adding annotations to designs
When a design image is displayed, you can add annotations to it by clicking on
the image. A badge is added to the image and a form is displayed to start a new
discussion. For example:
![Starting a new discussion on design](img/adding_note_to_design_1.png)
When submitted, the form saves a badge linked to the discussion on the image. Different discussions have different badge numbers. For example:
![Discussions on design annotations](img/adding_note_to_design_2.png)
......@@ -75,3 +75,18 @@ global.MutationObserver = () => ({
disconnect: () => {},
observe: () => {},
});
Object.assign(global, {
requestIdleCallback(cb) {
const start = Date.now();
return setTimeout(() => {
cb({
didTimeout: false,
timeRemaining: () => Math.max(0, 50 - (Date.now() - start)),
});
});
},
cancelIdleCallback(id) {
clearTimeout(id);
},
});
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