View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019162 | MMW 5 | Extensions framework | public | 2022-06-10 21:25 | 2022-10-10 00:20 |
Reporter | zvezdan | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | reopened | ||
Target Version | 5.0.4 | Fixed in Version | 5.0.4 | ||
Summary | 0019162: navigate methods of all navigationHandlers should notify when view switch finished | ||||
Description | There are many navigationHandlers that returns undefined, e.g. dbFolder, Year and so on. The navigate methods of these navigationHandlers should return Promise with navUtils.navigateNodePath with resolveWhenFinished = true. | ||||
Tags | No tags attached. | ||||
Fixed in build | 2668 | ||||
|
Fixed in build 5.0.4.2652 BTW: As a workaround there is 'viewchange' method that can be listened on document.body, usage e.g. in filterEditor.js, searchBar.js etc. |
|
I am not sure that listening on 'viewchange' on document.body is the best way since it could fire for so many reasons. I am currently trying to use: app.listen(window.currentTabControl.multiviewControl.mainControl.controlClass.dataSource, 'change' ... and: app.listen(window.currentTabControl.mediatree.controlClass.dataSource, 'change' ... but neither is perfect. I am waiting to see how your fix is applied and if it is better. |
|
Listening 'viewchange' on document.body is better way as in MM5 the nodes can be navigated even if the Media tree is disabled (e.g. via breadcrumbs or via node grids) and 'viewchange' will always fire. My fix in 2652 was just adding the Promise (as return value of all navigationHandlers) |
|
This doesn't work always, tried with dbFolder. I copied your window.navigationHandlers.dbFolder.navigate function to my script, added true as the second resolveWhenFinished argument to navigateNodePath(nodePath), and now it works fine. By the way, it would be nice if you modify this particular navigate method to conditionally accept the first argument (path) as a string. I could continue using my modification of that method, but it would be better if you do that in the built-in script. |
|
Implementation verified 2667 @Ludek please close/triage after reviewing @Zvezdan question at 0019162:0068642 |
|
Fixed in 2668 |
|
Verified 2670 |