[MGNLUI-6342] Do not refresh grids in inactive apps and make DatasourceObservation extendable Created: 22/Oct/20 Updated: 14/Aug/23 Resolved: 13/Mar/23 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0, 6.2.30 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Aleksandr Pchelintcev | Assignee: | Antonín Juran |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Testing, ui-devx-impr | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 1h | Time Spent: | 1h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
||||||||||||||||||||||||||||
| 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)
|
||||||||||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||
| Epic Link: | Datasource observation | ||||||||||||||||||||||||||||
| Sprint: | Nucleus 31 | ||||||||||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||||||||||
| Team: | |||||||||||||||||||||||||||||
| Work Started: | |||||||||||||||||||||||||||||
| Description |
|
Currently DatasourceObservation#register accepts mere Runnables (i.e. actions without without any inbound arguments), pretty much leaving us with only one observation reaction: "refresh the whole thing". For example, the app will still be refreshed even if the change occurred in an item the user doesn't have access to. As an optimisation or improvement of the interface, we could consider including addtional information about changed items (and maybe user This could potentially save us the effort and CPU resources by letting us skip the actual actions when they are irrelevant, or execute the update in a more intelligent way rather than a full refresh. |
| Comments |
| Comment by Roman Kovařík [ 24/Jan/23 ] |
|
Potential areas / problems:
|
| Comment by Thomas Comiotto [ 07/Feb/23 ] |
|
Apart from the inclusion of additional infos in the interface, make the whole thing pluggable. Not really. But still, enhance the interface, please, and let users write custom code that deals with / fits their corner cases.
|
| Comment by Thomas Comiotto [ 07/Feb/23 ] |
|
Not sure how to link issues. This is linked to SUPPORT-15832 |
| Comment by Roman Kovařík [ 10/Feb/23 ] |
|
Hey again, I've checked the plugability question and it seems that although the JcrDatasourceObservation is not directly opened for extensions, it still possible to provide a custom implementation (attached MyJcrDataSourceObservation.java
<components>
<id>admincentral</id>
<component>
<type>info.magnolia.ui.contentapp.observation.JcrDataSourceObservation</type>
<implementation>info.magnolia.ui.MyJcrDataSourceObservation</implementation>
</component>
</components>
<components>
<id>datasource-jcr</id>
<component>
<type>info.magnolia.ui.observation.DatasourceObservation</type>
<implementation>info.magnolia.ui.MyJcrDataSourceObservation</implementation>
</component>
</components>
The example is just a copy of JcrDatasourceObservation with added check for user permissions and location.
Best regards |
| Comment by Thomas Comiotto [ 02/Mar/23 ] |
|
Hello Roman, Best regards,
|
| Comment by Roman Kovařík [ 03/Mar/23 ] |
|
Thanks for the feedback! |