[MGNLFE-281] Review refresh calling Created: 19/Jul/22 Updated: 23/Oct/23 Resolved: 27/Jul/22 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Phong Le Quoc | Assignee: | Phong Le Quoc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 3d 1h | Time Spent: | 2d 2.5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
|||||||||||||||||||||||||
| Epic Link: | Headless Phase 2 | |||||||||||||||||||||||||
| Sprint: | DevX 15 | |||||||||||||||||||||||||
| Story Points: | 3 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Description |
|
Currently, refresh calling is different on 3 editors (angular, react, vue). We should make them consistent or put some comments to describe why the calling is missed/added.
Angular editor:
React editor:
Vue editor:
By the way, we might keep a reference to setTimeout for refresh calling so that we might destroy the old one before creating a new one. |
| Comments |
| Comment by Phong Le Quoc [ 20/Jul/22 ] |
|
A solution on Angular: /** ID for setTimeout(refresh) */ refreshTimeoutID = null; public refresh(): void { if (this.refreshTimeoutID != null) { clearTimeout(this.refreshTimeoutID); } this.refreshTimeoutID = setTimeout(EditorContextHelper.refresh); } |