-
Notifications
You must be signed in to change notification settings - Fork 890
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
Crearting 'View Trash' option in Musicblocks #4191
base: master
Are you sure you want to change the base?
Conversation
@walterbender Sir, I think it will definitely help users. Please check it. |
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.
This is good
I like the basic idea (we have something similiar in the Python version of Turtle Blocks). But I am loath to add yet another button to the toolbar. Maybe this is the default behavior of the restore button? @pikurasa what do you think? |
Sir which should be the default behavior previous functionality or the functionality in this PR ? |
@walterbender @pikurasa Sir can we add this feature to the current Restore button so we don't need to create a new button in toolbar again. |
Let's wait to hear from @pikurasa |
I think that the implementation in the python Turtle Art is better than this, and I think, if we do it at all, we should do it more similar to that. I think the design should be:
|
Okay I am working on it. |
@walterbender @pikurasa Sir, I have changed it like this. If any changes required please let me know Screen.Recording.2024-12-31.004222.mp4 |
I like that design, in general. The blocks showing as black and white; I can't decide on whether that's a good thing or not. It may be nice that they don't render in color, as that kind of indicates that they are " currently trashed". |
Looks good. I think the only change would be to put the buttons all the way to the top so the blocks don't appear above the buttons. |
If I understand it correctly, the button on the piemenu pops one item off the trash stack, while the toolbar button displays the trash list? I think that is a good decision. |
js/activity.js
Outdated
trashView.id = 'trashView'; | ||
trashView.classList.add('trash-view'); | ||
|
||
trashView.style = `position: relative; background-color: white; max-width: 396px; max-height: 200px; |
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.
Maybe we should move this to the CSS file?
js/activity.js
Outdated
|
||
// Sticky buttons | ||
const buttonContainer = document.createElement('div'); | ||
buttonContainer.style = `position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; background: white; |
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.
And these other style definitions?
@walterbender Sir I have changed according to you said. Please review |
@walterbender Sir I have tested in my local machine and different browsers also it works as expected. |
I will try again. I am using the latest Firefox on Fedora. |
I don't see anything in the logs. |
text-align: left; | ||
} | ||
|
||
.button-container { |
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.
Maybe the background for this container should be the same blue we use for toolbars.
Maybe the buttons should be icons with hover help text instead of labels. (We'll need to decide on what icons.)
js/activity.js
Outdated
buttonContainer.classList.add('button-container'); | ||
|
||
const restoreLastBtn = document.createElement('button'); | ||
restoreLastBtn.textContent = 'Restore Last'; |
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.
This string needs i18n. _("Restore Last")
Same for Restore All on Line 3477.
Also, we should use "Restore last" and "Restore all" to be consistent with the other menu labels.
Sir I have tested in a different machine with latest firefox but it works...I am trying to find |
@walterbender @pikurasa Sir, what should we kept it button or icon ? |
resolves #4190
I have created a new Restore option in Musicblocks ( View Trash ). From here we can see the list of all trashed items. By selecting item from the list the specific item will be restored. We don't need to restore item multiple time to restore the specific item from trash.
Screen Record
Screen.Recording.2024-12-27.175506.mp4