@quenty/transitionmodel 2.1.0 → 2.1.2-canary.433.80025dc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.1.2-canary.433.80025dc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/transitionmodel@2.1.1...@quenty/transitionmodel@2.1.2-canary.433.80025dc.0) (2023-12-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * TransitionModel would sometimes stall if no callback was specified ([981cb47](https://github.com/Quenty/NevermoreEngine/commit/981cb4725b4567e3efd6d3ade2566b5a596fea8d))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/transitionmodel@2.1.0...@quenty/transitionmodel@2.1.1) (2023-10-28)
18
+
19
+ **Note:** Version bump only for package @quenty/transitionmodel
20
+
21
+
22
+
23
+
24
+
6
25
  # [2.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/transitionmodel@2.0.0...@quenty/transitionmodel@2.1.0) (2023-10-18)
7
26
 
8
27
  **Note:** Version bump only for package @quenty/transitionmodel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/transitionmodel",
3
- "version": "2.1.0",
3
+ "version": "2.1.2-canary.433.80025dc.0",
4
4
  "description": "Helps with Gui visiblity showing and hiding",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,20 +25,20 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/baseobject": "^7.0.0",
29
- "@quenty/basicpane": "^8.1.0",
30
- "@quenty/blend": "^7.1.0",
31
- "@quenty/instanceutils": "^8.1.0",
32
- "@quenty/loader": "^7.0.0",
33
- "@quenty/maid": "^2.6.0",
34
- "@quenty/promise": "^7.0.0",
35
- "@quenty/rx": "^8.1.0",
36
- "@quenty/signal": "^3.0.0",
37
- "@quenty/timedtween": "^2.1.0",
38
- "@quenty/valueobject": "^8.1.0"
28
+ "@quenty/baseobject": "7.0.1-canary.433.80025dc.0",
29
+ "@quenty/basicpane": "8.1.2-canary.433.80025dc.0",
30
+ "@quenty/blend": "7.1.2-canary.433.80025dc.0",
31
+ "@quenty/instanceutils": "8.1.2-canary.433.80025dc.0",
32
+ "@quenty/loader": "7.0.1-canary.433.80025dc.0",
33
+ "@quenty/maid": "2.6.0",
34
+ "@quenty/promise": "7.0.1-canary.433.80025dc.0",
35
+ "@quenty/rx": "8.1.2-canary.433.80025dc.0",
36
+ "@quenty/signal": "3.0.1-canary.433.80025dc.0",
37
+ "@quenty/timedtween": "2.1.2-canary.433.80025dc.0",
38
+ "@quenty/valueobject": "8.1.2-canary.433.80025dc.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "ad451bee2ee34d9cad70ff72d0af360db1f91a34"
43
+ "gitHead": "80025dcd926765b502d322bb84e013b973409d8c"
44
44
  }
@@ -226,10 +226,10 @@ function TransitionModel:_promiseIsHidden()
226
226
  end
227
227
 
228
228
  function TransitionModel:_executeShow(doNotAnimate)
229
- local maid = Maid.new()
229
+ self._maid._transition = nil
230
230
 
231
- local promise = Promise.new()
232
- maid:GiveTask(promise)
231
+ local maid = Maid.new()
232
+ local promise = maid:Add(Promise.new())
233
233
 
234
234
  self._isHidingComplete.Value = false
235
235
  self._isShowingComplete.Value = false
@@ -242,6 +242,9 @@ function TransitionModel:_executeShow(doNotAnimate)
242
242
  promise:Reject()
243
243
  error(string.format("[TransitionModel] - Expected promise to be returned from showCallback, got %q", tostring(result)))
244
244
  end
245
+ else
246
+ -- Immediately resolve
247
+ promise:Resolve()
245
248
  end
246
249
 
247
250
  promise:Then(function()
@@ -252,14 +255,14 @@ function TransitionModel:_executeShow(doNotAnimate)
252
255
  end
253
256
 
254
257
  function TransitionModel:_executeHide(doNotAnimate)
258
+ self._maid._transition = nil
259
+
255
260
  local maid = Maid.new()
261
+ local promise = maid:Add(Promise.new())
256
262
 
257
263
  self._isHidingComplete.Value = false
258
264
  self._isShowingComplete.Value = false
259
265
 
260
- local promise = Promise.new()
261
- maid:GiveTask(promise)
262
-
263
266
  if self._hideCallback then
264
267
  local result = self._hideCallback(maid, doNotAnimate)
265
268
  if Promise.isPromise(result) then
@@ -268,6 +271,9 @@ function TransitionModel:_executeHide(doNotAnimate)
268
271
  promise:Reject()
269
272
  error(string.format("[TransitionModel] - Expected promise to be returned from hideCallback, got %q", tostring(result)))
270
273
  end
274
+ else
275
+ -- Immediately resolve
276
+ promise:Resolve()
271
277
  end
272
278
 
273
279
  promise:Then(function()