ElementalCode / elemental

A drag and drop block-based coding environment for front-end web technologies.
http://elementalcode.herokuapp.com
35 stars 10 forks source link

How are we going to implement the blocks? #26

Closed BookOwl closed 9 years ago

BookOwl commented 9 years ago

see title.

matthewr6 commented 9 years ago

DOM elements

BookOwl commented 9 years ago

OK.

quat1024 commented 9 years ago

Dom elements with canvas block rendering like pixie? I tried to render cblocks with CSS and got nowhere useful. But maybe I suck at css

PullJosh commented 9 years ago

Just had a brilliant idea: SVG.

BookOwl commented 9 years ago

That is a good idea! It sounds much better than HTML + CSS

an-OK-squirrel commented 9 years ago

YES I LOVE S'VG

quat1024 commented 9 years ago

Svg :grinning:

matthewr6 commented 9 years ago

How do you type in an SVG?

quat1024 commented 9 years ago

I don't know much about the ins and outs of svg but stackoverflow says contentEditable works on text.

Hmm svg sounds like a bit of a hassle actually

PullJosh commented 9 years ago

Ah, I forgot about inputs. :P

BookOwl commented 9 years ago

Canvas?

BookOwl commented 9 years ago

We could use this: https://github.com/nathan/visual

PullJosh commented 9 years ago

If anyone can get it up and running, I'd love to see what it's capable of!

BookOwl commented 9 years ago

I'll try and make a simple project with it to see if it will work for us.

PullJosh commented 9 years ago

Okay, cool! :D

BookOwl commented 9 years ago

STOP THE PRESS!!! (Wait, we don't have press :P) I just found https://developers.google.com/blockly/ what do you guys think of it?

an-OK-squirrel commented 9 years ago

It's okay. It has my suggestion for properties implemented, but I still like making stuff ourselfs.

robinp7720 commented 9 years ago

http://codepen.io/robinp7720/pen/JdmJYo I know, it looks horrible and the design needs to be improved but this would be very easy to expand and would work for us as html is a markup language. Not a scripting lanuage. Blocky seams to be better for scripting languages. Could be used as a javascript IDE?

Also, I expected something like this to already exists, but this idea is apparently one of a type! This project might explode! :D Lets hope it doesnt die like go-anywhere or whatever it was called

PullJosh commented 9 years ago

@BookOwl I thought everyone had seen that... Apparently not. :P

@robinp7720 You're right - it doesn't look great now, but could be easily expanded on to be quite usable! :D

BookOwl commented 9 years ago

Status Report: Blocky: as @robin7720 said, it would work great as a script editor, but not for markup. I don't think that it will work for elemental. Visual: I tried to make the test. Really, I did! But visual is a long, cryptic piece of of code with no comments or documentation, and the only demo is pixie, which is equally confusing. It might work, but only if somebody smarter than me can figure out how to use it. @robin7720's block thingie: It. Looks. AWSOME! It still needs a little work, but I think we can use it!

BookOwl commented 9 years ago

Unless anybody has another idea, we will work on @robin7720's css block styles and use that.

PullJosh commented 9 years ago

I'd say try to adapt those styles and make them work, but I wouldn't set it in stone - if things don't go well, we should still be open to other options.

matthewr6 commented 9 years ago

Agreed also could you check out the ToS issue?

robinp7720 commented 9 years ago

@PullJosh I tried to use that with Jquery click events but if you clicked on a block inside a loop, it would always result in the loop also calling the event. Not only the block.

As a side note. I've started working on my own editor right now. if you guys play nice for a while, I might merge my block editor into this because right now, apparently no one respects me trying to help.

@BookOwl its robinp7720 not robin7720

matthewr6 commented 9 years ago

We are "playing nice". "Playing nice" is very different from automatically accepting your suggestions.

and ew guys try not to use jQuery I really do suggest RiotJS (or ReactJS, but it's slightly more complicated)

PullJosh commented 9 years ago

We're totally fine with you helping out! However, it seems that we often have a hard time understand what you're trying to expain. I reccomend re-reading what you've written before posting. I almost never write something perfect on the first go. Even with comments, I revise quite a bit before posting in order to sound like an intelligent human being (which may or may not be the case.)

It would be much more helpful if you were willing to work with us on the editor we have started - it's unlikely that we'll be able to use anything you create if it isn't made in conjunction with what we're working on.

As for click events, there are two things. 1) Don't use jquery unless it is absolutely 100% necessary. In this case, it isn't. 2) It probably is a z-index issue. The outer elements are appearing on top of the inner elements (though I could be wrong).

PullJosh commented 9 years ago

@Firedrake969 By arguing about the fact that you are "playing nice", you are paradoxically proving yourself wrong.

Just something to wrap your head around.

matthewr6 commented 9 years ago

PullJosh - I really really really would love for you to at least read through RiotJS's docs because I think it has the potential to be extremely helpful.

@PullJosh Not quite sure what he means by "playing nice", I guess, because I interpreted it as him wanting us to do what he wants more of the time.

PullJosh commented 9 years ago

Just realized something...

Your username is "Firedrake969". "Fire" means the same as "flame". "Drake" is, according to dictionary.com, a male duck. Ducks can detect the earth's magnetic poles. Magnets. Flame. You are a flame war magent. Thus, cheerios are illuminati.

As for RiotJS, I'll take a look. :)

matthewr6 commented 9 years ago

k then o.o

PullJosh commented 9 years ago

Looking at the page, I can't even tell how riot is supposed to be helpful.

PullJosh commented 9 years ago

Could you explain for me?

matthewr6 commented 9 years ago

So let's say we have a block - [______]. We're rendering based on DOM (IIRC), so we have a div for that. <div class='block-name'>children</div> Using Riot, we can use a tag <my-custom-block-element option1='test' option2='test2'> and pass in options to be able to have repeatable DOM elements without rewriting the interior over and over. Just a thought, I've never used Riot for this type of thing.

PullJosh commented 9 years ago

I still don't see how that's helpful. :/

My current understanding is this:

With riot, you can... 1) Grab variables that were never defined and magically get strings out of them (such as <h3>{ opts.title }</h3> in the demos) 2) Write js without wrapping it in a script tag in order to confuse your fellow programmers 3) Have indentation randomly cause errors in your code, such as this example (taken directly from the website):

<!-- works -->
<my-tag>

</my-tag>

<!-- also works -->
<my-tag></my-tag>

  <!-- this fails, because of indentation -->
  <my-tag>

  </my-tag>

4) Use a bunch of preprocessors that none of us know how to use 5) Put random style elements everywhere (bad coding) and have them be automatically fixed for us, but only in the behind-the-scenes code that we'll never look at anyway 6) "Mounting", except the page never actually explained what that is. They just said it could be done.

As far as I can tell, it doesn't seem that helpful. I'm sure there's something I don't understand, but I really can't see any example that would be helpful in any way. What am I missing? :/

matthewr6 commented 9 years ago

To be honest, I have no idea how it would help in this specific case, but it's really powerful for stuff I've been working on and I was just brainstorming.

But it is quite powerful, I assure you. Not that we should use it because I still have no idea how to apply it for this project.

PullJosh commented 9 years ago

Okay! Awesome that you found it, but I don't think we should use it in this case. ;)

matthewr6 commented 9 years ago

Yeah, just throwing everything I can think of out there. Also look at ReactJS and then get your mind blown for a while :P

PullJosh commented 9 years ago

lol okay

matthewr6 commented 9 years ago

lololol http://prntscr.com/7wyivt

PullJosh commented 9 years ago

+1 for banning yourself

matthewr6 commented 9 years ago

no, that was my test account named -_-

PullJosh commented 9 years ago

Is it bad that I can't understand a blog post titled "ReactJS for Stupid People"?

matthewr6 commented 9 years ago

sorry

PullJosh commented 9 years ago

xD

matthewr6 commented 9 years ago

I promise I'm not Andrew Ray

matthewr6 commented 9 years ago

btw, if we want ajax, which we will, NO JQUERY. Agreed?

PullJosh commented 9 years ago

Agreed.

Go tell @robinp7720 that.

matthewr6 commented 9 years ago

shall we make an executive decision right here?

matthewr6 commented 9 years ago

Also, Axios is a great HTTP library. https://github.com/mzabriskie/axios

PullJosh commented 9 years ago

Always talk to others before making executive decisions. ^ Borderline all caps worthy

Me, 6 days ago