-
Notifications
You must be signed in to change notification settings - Fork 35
On tab stale event, don't refresh tabs which are queryOnLoad but are not the active tab #795
Comments
@teosarca we were thinking about the solution, that in the moment of update (patch response processing or modal closing) we have no information (or access is really expensive) if tab is queried on activate (update relays on data, queryOnActivate is the case of layout), what do you say if you would send us, exactly that tabs that should be marked as stale? |
hmmm, let me think about it... but sounds good. |
Waiting for API – i.e. send only
|
UPDATE: Reason: wdyt? |
In my opinion, we want to make optimization that in total cost is less efficient than before. QueryOnActivate is part of layout, passing it to protocol GENERATING PATCH -> PROCESS RESPONSE is very antipattern. If we want to make patch response responsible for such a things like managing window layout and data, refreshing tabs and so on, we have to rebuild our protocol, create some sort of service that is responsible for responses processing, it has to live at low level of application, and it cant be static, because we have to be connected to model. Still i dont know that it is good idea. We have really lightweight solution now, and i want to keep it as it is for performance and pattern. Btw. refreshing tabs should be made the same as it is for Document List updating by WS? Patch response is update (originally) for the document that was origin of that change. |
What I believe Teo has in mind is that only front-end knows which tab is currently opened – this way QueryOnActivate/queryOnLoad can be considered to refresh or not and decision is on front-end side. I'm not aware of implementation though, just trying to find logical explanation. I would be +1 for utilizing WS since we have it in the system... |
(Was also considering WS, but i think that's another topic because then we need to think and implement a WS endpoint for each document.. else it would be to much noise....) But even with the WS, the requirement stays: if u got a tab stale notification from websocket and that tab is QueryOnActivate/queryOnLoad and it's not active then don't refresh it. |
Not so sure about that. Precisely for a case like the one that i've described in the issue summary, how much we would save in terms on time and bandwidth it's not so neglectable i would say. |
But there is no problem. WS are connected strictly to component. Responses from patch not. |
Agree, but when we will have the "one WS endpoint for each document" feature implemented. |
Do you want to rebuild important and big node in whole structure in front-end, instead of improving it by WS? I think that with these "quickfixes" we are breaking separation of concerns that we tried hard to keep. |
let's talk when you have time. I don't see it so dramatic. |
After discussions, we have two options, both would probably take same amount of time.
Both implementations are not small, both are "not a feature we could sneak in as a part of a fix/optimization" actually. :) Of we go with 1st option – we will make things two times, because finally we all want to use WS. :) |
@teosarca please provide some info about future implementation on agreed WS. |
API provided and documented here: metasfresh/metasfresh-webui-api-legacy#435 (comment) |
API ready and rolled out on w101 |
[#878](metasfresh/metasfresh-webui-frontend-legacy#878) Error firework when logout [#880](metasfresh/metasfresh-webui-frontend-legacy#880) Change Icon for URL Link [#881](metasfresh/metasfresh-webui-frontend-legacy#881) Error when pressing Action Menu in Collapsible Grid Window [#883](metasfresh/metasfresh-webui-frontend-legacy#883) hu editor doesn't update [#451](metasfresh/metasfresh-webui-api-legacy#451) Provide view sticky filters to be displayed by frontend [#456](metasfresh/metasfresh-webui-api-legacy#456) Outbound Mail endpoint prototype [#1807](#1807) Fix "Create primary key" process [#879](metasfresh/metasfresh-webui-frontend-legacy#879) Avatar Picture not deleted from Header when cleared in Profile Settings [#1802](#1802) picking terminal is not opening [#436](metasfresh/metasfresh-webui-api-legacy#436) Manufacturing Order Issue not possible after barcode filtering [#453](metasfresh/metasfresh-webui-api-legacy#453) Password process parameters shall allow showing the password [#849](metasfresh/metasfresh-webui-frontend-legacy#849) manufacturing order doesn't open [#437](metasfresh/metasfresh-webui-api-legacy#437) Load/ Reload of delivery Days window takes too long. [#446](metasfresh/metasfresh-webui-api-legacy#446) Cannot open the menu when logged in as System Administrator [#433](metasfresh/metasfresh-webui-api-legacy#433) Show Manufacturing Order number in window header [#1793](#1793) fix jasper document for vendor returns [#848](metasfresh/metasfresh-webui-frontend-legacy#848) notifications don't update [#400](metasfresh/metasfresh-webui-api-legacy#400) minimum password length error message not displayed [#444](metasfresh/metasfresh-webui-api-legacy#444) Make Dashboard Translatable [#447](metasfresh/metasfresh-webui-api-legacy#447) Truncate WEBUI_ViewSelection tables on startup [#847](metasfresh/metasfresh-webui-frontend-legacy#847) Loading of empty delivery Days Window take long [#1735](#1735) istransferwhennull not working in webUI but in java client [#1748](#1748) Project Documentation: Screenshots [#795](metasfresh/metasfresh-webui-frontend-legacy#795) On tab stale event, don't refresh tabs which are queryOnLoad but are not the active tab me-45
Results of IT Tested on webui
|
Type of issue
Bug
Steps to reproduce / Expected behavior
In network tab, take a look at what happened.
This is a follow-up of #769
The text was updated successfully, but these errors were encountered: