Closed RayPlante closed 3 years ago
I found three issues and two of them were fixed:
This is great--thanks for doing this. The refreshTree() looks fairly inexpensive--nice! Hopefully it won't cause any weird blinking. I'll follow up with you on the next step.
It does cause blinking :( So I didn't implement the change in this check in. You can try it to see if it's acceptable.
@chuanlin2018: This last commit (2f9e6d6) hopefully fixes the buggy selection behavior we were seeing (including # 3 in you list above). Can you confirm?
Will do.
I'll note that this fix did not require the "who" capability that I shared in the restruct/cartservice-selwho branch, so I left that out.
OK. I am reading your code while compiling locally.
The problem seems to be fixed. I didn't see it happen again when running locally. Need a while to understand your code though:)
Thanks for the explanation. Now I understand. Seems the conflicts need be resolved before I can approve the changes...
Just ran into couple of minor issues while going through your code:
I fixed the following:
As part of the on-going restructuring of the landing page code, PR #166 ("ODD-940: Data Cart code restructuring") was aimed at improving encapsulation of the code that manages the data cart. That PR centered on the introduction of the
DataCart
class that controls the list of items currently in the cart. This follow-on PR focuses on improving the encapsulation, particularly around the communication between components that use the cart as well as improving the separation of concerns for the different classes within the data cart module.This PR attempts to address the these main concerns:
TreeNode
data structure.TreeNode
is part of the primengTreeTable
widget, that made multiple non-display classes dependent on primeng; this would make it harder to change to a different widget for the display.DataCart
interface.BundleplanComponent
used theDownloadService
to download data, but then used theTreetableComponent
to tell theDownloadService
that the download is complete, so that it can update the cart.)This PR addresses these concerns primarily through these design changes:
DataCart
class is now watchable; thus all communications about changes in the cart, including the download state, goes through theDataCart
.CartService
has been redefined to be about obtaining an instance of aDataCart
.I have also added a description of the Cart framework into
datacart/README.md
that attempts to describe the role of the key classes and explain the communication between them.