-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic composite bar #48037
Dynamic composite bar #48037
Conversation
- Sequential order for in-built viewlets
@sandy081 thanks for the PR. This makes sense. |
@isidorn If you always pin it, then it will override the existing pinned viewlet when refreshed. Edit: I see, the newly registered viewlets will not get pinned which is not expected. So we need a way to pin it but not show it by default. |
I will update the PR to handle following correctly
Hope I cover all cases. |
Can you please clarify this with an example. Just so we are on the same page. |
I think pinning is not the issue. It is about showing the viewlet. When adding a viewlet, it pins and shows automatically. This is overriding the viewlet that is currently shown (after refresh). |
Ok. Yeah compositeBar should support to show a new pinned viewlet without it being the active one. |
- Retain the composites states - Compute pinned composites from loaded composite states and current composites - Store on shutdown - Parameter in add api to activate the added composite - Pin the added composite at currect location
@isidorn Updated the PR with following changes
|
@sandy081 I took a look at the PR and previsouly we were storing a list of pinned composite ids. |
@isidorn Composite bar has the following state
It determines which composite has to be pinned or not and in which order (also consults its history sometimes). So I think it is the right one to store this information. If we move this to the owner, then everybody has to compute, if newly added composite has to be pinned or not by checking the previous state. They should also store the order. It means the composite bar state has to be shared which I think is not a good design. I also think there is still some general improvements to be done to Composite bar.
I wanted to replace |
Also for your question,
This is to check if a newly added composite has to be pinned or not which needs initial state. |
this.pin(compositeData.id, true, i); | ||
|
||
const compositeState = this.initialCompositesStates.filter(c => c.id === compositeData.id)[0]; | ||
if (!compositeState /* new composites are pinned by default */ || compositeState.pinned) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@isidorn This is the reference why we need initial states
Ok this makes sense. I tried it out and nothing seems broken.
|
I tried with the contributed viewlets and some of the test cases you mentioned. Will test all cases and confirm. |
@isidorn Tried out all scenarios and it looks good. |
@sandy081 great, then feel free to merge this in. A test plan item would also be good. |
Thanks and will have the testing part of activity groups contributions. |
Required for #43645