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

you can STILL add other attributes, eg style, using inspect element #243

Closed glacialcascade closed 7 years ago

glacialcascade commented 8 years ago

Basically there are a lot of attributes that arent in the dropdown, you can acces them with Inspect element

matthewr6 commented 8 years ago

Not an issue, IMO. If you can do that, you're probably not Elemental's target audience anyways :P @ElementalCode/programmers Thoughts?

TheInitializer commented 8 years ago

why is that a problem

matthewr6 commented 8 years ago

The real problem is that we don't have enough attributes available :P

TheInitializer commented 8 years ago

:point_up:

TheInitializer commented 8 years ago

Just add all the possible attributes, or a few basic ones and a text box to enter your own, and it will become even less of a problem :package:

matthewr6 commented 8 years ago

@TheInitializer https://github.com/ElementalCode/elemental/blob/78714abe8734b3a4c85bd074cecbd72e5485aa17/apps/projects/static/js/editor/files.js#L58

TheInitializer commented 8 years ago

lol. problem is not all of those apply to every element (<strong href="bobby.com">?)

matthewr6 commented 8 years ago

You can put them on every element, though :P

mrjacobbloom commented 8 years ago

You can put them on every element, though :P

We shouldn't just limit the available attributes to what's applicable. I'd rather give the user all of them and force them to learn what they actually do.

Also it's less work on our end

joker314 commented 7 years ago

I think that you should give bad attribute blocks a yellow-ish border, and a ⚠️ symbol is placed to the right of the block. When you click it, it shows you a picture of what you might mean, and what the attribute is usually used for, and if you click "Change" then it automatically replaces it.

For example, img ( [href] = [google.com] ) then it might replace it with

a ( [href] = [google.com] ){
  img
}

and then put a warning on the inner block, saying that according to the spec you need an alt and src attribute. When you click on the warning, it might change it to

 img (src = ?) (alt = ?)

so that you can edit it.

I think this system would work best.

Also, could you please make the z-index of blocks that are currently being dragged very high, so that they appear above other blocks as well as on-top of the block pallet.

Sorry for intruding on your project.

mrjacobbloom commented 7 years ago
Also, could you please make the z-index of blocks that are currently being dragged very high, so that they appear above other blocks as well as on-top of the block pallet.

We have that fixed in our staging ground, we just haven't pushed it to the main website yet

joker314 commented 7 years ago

Ah, ok.

mrjacobbloom commented 7 years ago

Resolving since #245 added more attributes