Skip to content

Commit a1145a5

Browse files
authored
Merge pull request #118 from mmmmaaaaarrrrrrkkkkkkkk/develop
[URGENT] HUGE fix for Animation addon
2 parents 2cafc18 + 1f6c9c4 commit a1145a5

File tree

7 files changed

+76
-6
lines changed

7 files changed

+76
-6
lines changed

src/addons/addons/animations/_manifest_entry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const manifest = {
2-
"name": "Animation Types",
3-
"description": "Change the intensity of animations that appear in the editor. Some moderate animations come with the editor by default.",
2+
"name": "Reactive",
3+
"description": "Adds animations and reactiveness to parts of the editor. (formerly Animation Types)",
44
"credits": [
55
{
66
"name": "Reflow"
@@ -13,7 +13,7 @@ const manifest = {
1313
],
1414
"info": [
1515
{
16-
"text": "If you enabled a reduced motion setting on your device, these settings will not apply.",
16+
"text": "If you enabled a reduced motion setting on your device, these settings will not apply. See how to re-enable motion: https://mgik.dev/turn-on-motion",
1717
"id": "reduced-motion"
1818
}
1919
],

src/addons/modal.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@ export const createEditorModal = (tab, title, {isOpen = false} = {}) => {
99
className: tab.scratchClass('modal_modal-overlay'),
1010
dir: tab.direction
1111
});
12+
setTimeout(() => {
13+
container.classList.add(tab.scratchClass('modal_modal-overlay-visible'));
14+
});
1215
container.style.display = isOpen ? '' : 'none';
1316
document.body.appendChild(container);
17+
const modalOuter = Object.assign(document.createElement('div'), {
18+
className: tab.scratchClass('modal_modal-container')
19+
});
1420
const modal = Object.assign(document.createElement('div'), {
15-
className: tab.scratchClass('modal_modal-content')
21+
className: tab.scratchClass('modal_modal-content-addons')
22+
});
23+
modalOuter.appendChild(modal);
24+
setTimeout(() => {
25+
modalOuter.classList.add(tab.scratchClass('modal_modal-visible'));
1626
});
1727
modal.addEventListener('click', e => e.stopPropagation());
18-
container.appendChild(modal);
28+
container.appendChild(modalOuter);
1929
const header = Object.assign(document.createElement('div'), {
2030
className: tab.scratchClass('modal_header')
2131
});
@@ -45,7 +55,7 @@ export const createEditorModal = (tab, title, {isOpen = false} = {}) => {
4555
});
4656
modal.appendChild(content);
4757
return {
48-
container: modal,
58+
container: modalOuter,
4959
content,
5060
backdrop: container,
5161
closeButton,

src/components/icon-button/icon-button.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
1010
color: $motion-primary;
1111
border-radius: 0.5rem;
12+
transition: transform 0.15s cubic-bezier(0.63, 0.32, 0.08, 0.95);
13+
}
14+
15+
.container:hover {
16+
transform: scale(1.06);
17+
}
18+
19+
.container:active {
20+
transform: scale(0.94);
1221
}
1322

1423
.container + .container {

src/components/modal/modal.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@
7676
overflow: hidden;
7777
}
7878

79+
.modal-content-addons {
80+
margin: auto auto;
81+
outline: none;
82+
border: 4px solid $ui-white-transparent;
83+
padding: 0;
84+
border-radius: $space;
85+
user-select: none;
86+
87+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
88+
color: $text-primary-light;
89+
overflow: hidden;
90+
}
91+
7992
.modal-content.full-screen {
8093
position: absolute;
8194

src/components/sound-editor/sound-editor.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,21 @@ $border-radius: 0.25rem;
8686
transition: 0.2s;
8787
user-select: none;
8888
margin: 0px;
89+
transition: transform 0.15s cubic-bezier(0.63, 0.32, 0.08, 0.95);
8990
}
9091
[theme="dark"] .button {
9192
background-color: $ui-primary;
9293
}
9394

95+
96+
.button:hover {
97+
transform: scale(1.02);
98+
}
99+
100+
.button:active {
101+
transform: scale(0.95);
102+
}
103+
94104
.button > img {
95105
flex-grow: 1;
96106
max-width: 100%;

src/containers/sound-editor.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,10 @@ class SoundEditor extends React.Component {
667667
const box = document.createElement("div");
668668
div.append(box);
669669
box.classList.add(confirmStyles.promptBox);
670+
setTimeout(() => {
671+
div.classList.add(confirmStyles.baseVisible);
672+
box.classList.add(confirmStyles.promptVisible);
673+
}, 0);
670674
box.style.width = `${width}px`;
671675
box.style.height = `${height}px`;
672676
const header = document.createElement("div");
@@ -689,12 +693,20 @@ class SoundEditor extends React.Component {
689693
accept.classList.add(confirmStyles.accept);
690694
accept.innerHTML = okname ? okname : "OK";
691695
accept.onclick = () => {
696+
div.classList.remove(confirmStyles.baseVisible);
697+
box.classList.remove(confirmStyles.promptVisible);
698+
setTimeout(() => {
692699
div.remove();
693700
if (accepted) accepted();
701+
}, 150);
694702
}
695703
deny.onclick = () => {
704+
div.classList.remove(confirmStyles.baseVisible);
705+
box.classList.remove(confirmStyles.promptVisible);
706+
setTimeout(() => {
696707
div.remove();
697708
if (cancelled) cancelled();
709+
}, 150);
698710
}
699711
return {
700712
popup: div,

src/css/confirm-dialog.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
display: flex;
1010
align-items: center;
1111
justify-content: center;
12+
opacity: 0;
13+
transition: opacity 0.15s cubic-bezier(0.63, 0.32, 0.08, 0.95);
1214
}
1315
[theme="dark"] .base {
1416
background-color: #333a;
1517
}
1618

19+
.baseVisible {
20+
opacity: 1;
21+
}
22+
1723
.promptBox {
1824
width: 540px;
1925
height: 380px;
@@ -25,12 +31,22 @@
2531
overflow: hidden;
2632
position: relative;
2733
color: black;
34+
opacity: 0;
35+
transform: scale(0.7) rotateX(-45deg);
36+
transition: opacity 0.15s cubic-bezier(0.63, 0.32, 0.08, 0.95), transform 0.2s cubic-bezier(0.63, 0.32, 0.08, 0.95);
2837
}
2938
[theme="dark"] .promptBox {
3039
color: $text-primary;
3140
background: $ui-primary;
3241
}
3342

43+
44+
.promptVisible {
45+
opacity: 1;
46+
transform: scale(1) rotateX(0deg);
47+
}
48+
49+
3450
.header {
3551
width: 100%;
3652
height: 3.125em;

0 commit comments

Comments
 (0)