sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
589 stars 831 forks source link

Late expansion and contraction of setInstrument and start sidebar when note value blocks are expanded or contracted #3499

Open kaurjasleen240305 opened 11 months ago

kaurjasleen240305 commented 11 months ago

Description

expansion and contraction of setInstrument and start sidebar takes place when cursor from note value blocks is removed from note value expansion or contraction button .

Expected Behavior

My motive is to add expansion and contraction of setInstrument and start sidebar takes place as soon as onclick takes place on button on note value block;

Screenshots

Uploading Music Blocks is a collection of tools for exploring fundamental musical concepts in a fun way. and 20 more pages - Profile 1 - Microsoft​ Edge 2024-01-01 17-33-36.mp4…

kaurjasleen240305 commented 11 months ago

I would like to work upon it can I take upon it @walterbender

kaurjasleen240305 commented 11 months ago

Screenshot (907) Screenshot (908) Screenshot (909) Screenshot (910)

samyakshah3008 commented 11 months ago

Hi -- @kaurjasleen240305 thanks for raising an issue, you don't need to ask a permission to work on issue, you can directly send us a PR.

kaurjasleen240305 commented 11 months ago

Can u help me where in codebase could I exactly find code for this issue bcz I am new in open source contribution and just I was having difficulty finding it .

walterbender commented 11 months ago

The resize would be triggered in blocks.js and happen in block.js

kaurjasleen240305 commented 11 months ago

Ok I am working upon it .

kaurjasleen240305 commented 11 months ago

hey @walterbender I analyzed in block.js and blocks.js for this issue actually onclick on expand/contract button on note value block the size of settimbre and start both blocks is getting changed but on screen its only displayed after we remove mouse from that button can u guide me in some better way:- Screenshot (911) Screenshot (912) Screenshot (913)

kaurjasleen240305 commented 11 months ago

everything is fine in block and blocks.js

walterbender commented 11 months ago

I don't know what you mean by "after we remove mouse from that button"

kaurjasleen240305 commented 11 months ago

@walterbender it is that removing cursor from expand and collapse button on collapsible blocks and inlinecollapsible blocks.

walterbender commented 11 months ago

I think the relevant code is all in block.js. Maybe it is simply a matter of doing a refresh in the collapse/expand code itself?

kaurjasleen240305 commented 11 months ago

@walterbender If it was so then start block would also not change its size upon expanding/collapsing note blocks but it is like only outermost clamp expands/collapse after clicking on expand/collapse button and inner clamps do not expand/collapse until cursor is moved away from expand/collapse

walterbender commented 11 months ago

So it sounds like a bug in the refresh In terms of how it Cascades through the block hierarchy

kaurjasleen240305 commented 11 months ago

Ya can u give any idea how it can be improved... @walterbender @samyakshah3008

walterbender commented 11 months ago

Well, it seems that the outer most clamp block adjusts right away, but nothing else. We need to figure out why. The answer lies somewhere in block.js.

kaurjasleen240305 commented 11 months ago

OK @walterbender I will again look into it.

arush-webd commented 10 months ago

@walterbender @samyakshah3008 my suggestion is to add an event listener to the button in your note value block, and then call the appropriate methods for expanding and contracting the setInstrument and start sidebar. Will this work?

walterbender commented 10 months ago

It may work. Try experimenting with your idea.

arush-webd commented 10 months ago

It may work. Try experimenting with your idea.

Can you please review my changes in the PR.