Bug 1570821 - limit height for variable tooltip and decrease left padding r=davidwalsh

Added and if statement to `calculateMaxHeight()` to prevent it from exceeding 250, and decreased the padding of the `.object-node` selector.

Differential Revision: https://phabricator.services.mozilla.com/D41478

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Krishnal Ciccolella 2019-08-14 20:52:19 +00:00
Родитель 243b7d4b1e
Коммит 151cfd6cab
2 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -52,6 +52,10 @@
text-decoration: underline;
}
.popover .preview-popup .object-node {
padding-inline-start: 0px;
}
.preview-token:hover {
cursor: default;
}

Просмотреть файл

@ -84,10 +84,14 @@ export class Popup extends Component<Props> {
if (!editorRef) {
return "auto";
}
return (
editorRef.getBoundingClientRect().height +
editorRef.getBoundingClientRect().top
);
const { height, top } = editorRef.getBoundingClientRect();
const maxHeight = height + top;
if (maxHeight < 250) {
return maxHeight;
}
return 250;
};
renderFunctionPreview() {