Skip to content
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

NewPalette #2392

Merged
merged 12 commits into from
Jul 28, 2020
Merged

NewPalette #2392

merged 12 commits into from
Jul 28, 2020

Conversation

sksum
Copy link
Member

@sksum sksum commented Jul 7, 2020

#2385
removed any createjs code used to make palettes.
Implemented basic drag and drop(html,vanilla js) ,updating of action/box blocks ,paletteScroll
There Is still some redundant code from the previous implementation.

remove any createjs code used to make  palettes.
@sksum
Copy link
Member Author

sksum commented Jul 7, 2020

Should we continue with this old-style palette structure, or should we explore new Ideas,
also any ideas for the placement of the search widget
@walterbender

@sksum sksum added the WF3-Needs design review Assign this label after Design has been completed. label Jul 7, 2020
@walterbender
Copy link
Member

This looks great so far... Dragging from the palette works well. Can someone test on a tablet device?

@walterbender
Copy link
Member

Let's get this set of changes landed and then we can revisit new ideas.

@@ -1435,3 +1435,6 @@ input.timbreName {
height: 28px;
filter: invert(100%);
}
::-webkit-scrollbar {
display: none;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always add new line at eof.

js/palette.js Outdated
@@ -1906,6 +1618,42 @@ function Palette(palettes, name) {
this.palettes.pluginsDeleteStatus = false;
this.palettes.paletteObject = null;
}

let palDiv = docById("palette");
if (palDiv.children.length>1)palDiv.removeChild(palDiv.children[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(palDiv.children.length > 1)
format this

remove unused code .,
add search widget
Added touch events to drag and drop .
@sksum
Copy link
Member Author

sksum commented Jul 11, 2020

added drag and drop for touch devices.

My method for testing -- served localhost to home wifi network and used http://(Ip Address):8000 to open the same in my tablet .

@walterbender
Copy link
Member

walterbender commented Jul 12, 2020

Check list:

  • eliminate CreateJS
  • replicate current functionality (palette select)
  • replicate current functionality (drag new blocks)
  • replicate current functionality (scroll palettes)
  • check to ensure adding/removing entries works (e.g., add/remove action blocks)
  • does the open palette block work?
  • add search widget
  • use block API for generating palette block artwork
  • do the hide/show blocks blocks work?

  • implement advanced blocks as a submenu??? (needs design)

@walterbender
Copy link
Member

I am seeing these erroRs with the latest commits... fails to fully loD.

updating palette 
js/palette.js:485 Uncaught (in promise) TypeError: Cannot read property '_resetLayout' of undefined
    at Palettes.updatePalettes (js/palette.js:485)
    at processPluginData (js/utils/utils.js:633)
    at Activity.init (js/activity.js:5110)
    at async Activity.domReady (js/activity.js:4496)
js/palette.js:119 makeSelectorButton 0
js/palette.js:119 makeSelectorButton 1
js/palette.js:119 makeSelectorButton 2
js/palette.js:1580 Time to show the palettes.

js/activity.js:2453 Uncaught TypeError: Cannot set property 'x' of null
    at _onResize (js/activity.js:2453)
    at Activity.window.onresize (js/activity.js:2499)

change palette display when opening palette and initial setup
@sksum sksum added the WF6-Needs testing Please test label Jul 16, 2020
@walterbender
Copy link
Member

I my latest tests, I confirmed that the open palette block works. But the hide block doesn't hide the palette.
I needed to make this change beginning at L489

	    if (showPalette in myPalettes.dict) {
		myPalettes.dict[showPalette].hideMenu();
		myPalettes.dict[showPalette].show();
	    }

@walterbender
Copy link
Member

walterbender commented Jul 20, 2020

The MyBlocks Palette is showing up even though I have nothing in it.

@walterbender
Copy link
Member

Adding/removing action and box blocks works.

@walterbender
Copy link
Member

Three design issues:

(1) the selector for which of the three palette groups should have a light blue background so that the selectors don't have a white space between them.

(2) the Palette title should have a dark blue background.

(3) the Palette should extend to the bottom of the screen.

Screenshot from 2020-07-20 17-01-13

@walterbender
Copy link
Member

walterbender commented Jul 26, 2020

  • Please add a small space above the top-most block in the palette
  • Please add some indication that a palette can scroll
  • Please hide the palettes when "hide blocks" is clicked

@walterbender
Copy link
Member

walterbender commented Jul 27, 2020

  • Please align the icons with the labels for the palette list

@pikurasa
Copy link
Collaborator

The down arrow does not disappear when I am at the bottom of the palette (any palette)

Screenshot at 2020-07-27 08:18:40

@walterbender walterbender merged commit 9c4db3f into sugarlabs:master Jul 28, 2020
@pikurasa
Copy link
Collaborator

It looks like #2392 (comment) was fixed -- great!

When the palette already displays all possible blocks within the screen, the down arrow appears. This may be confusing as it seems to indicate you can scroll down for more blocks.

Screenshot at 2020-07-28 08:03:43

@pikurasa
Copy link
Collaborator

FYI, the images for some of the blocks in the media palette are not being displayed.

Screenshot at 2020-07-28 08:06:15

@walterbender
Copy link
Member

Oh. I had not noticed the image problem.

@pikurasa
Copy link
Collaborator

Japanese is rendering a little funny as well (tested on rawgit). It looks like it is trying to render the letters top to bottom.

Screenshot at 2020-07-28 10:07:07

@walterbender
Copy link
Member

    label.setAttribute("style","width: 10px ; height: 12px");

10px width is causing the label to wrap in Japanese

But if you increase the width, it causes the selector buttons to mis-align.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WF3-Needs design review Assign this label after Design has been completed. WF6-Needs testing Please test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants