[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:
relation
is related to MGNLFE-272 vue-editor 1.2.3-beta don't render gr... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLFE-289 Implement Sub-task Completed Phong Le Quoc  
MGNLFE-290 Review Sub-task Completed Canh Nguyen  
MGNLFE-291 PiQA Sub-task Closed Oanh Thai Hoang  
MGNLFE-292 QA Sub-task Completed Chuong Doan Huy  
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: DeveloperX

 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:

  • call refresh for page and component

React editor:

  • call refresh for page and area

Vue editor:

  • call refresh for page, area, and component

 

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);
} 
Generated at Mon Feb 12 05:45:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.