Giter Club home page Giter Club logo

wizzywid's Introduction

wizzywid

This is a very simple UI getting-started-tool for HTML, Custom Elements, and Polymer.

It does not have all of the features that a full UI designer app should -- making that kind of app is really hard, and requires a lot of work and maintenance.

๐Ÿ‘‰ I've built this with the idea that if you want to customize it (i.e. add your own custom elements to it, or very specific features), you should be able to clone it, make changes, and deploy it somewhere. Bug fixes are always appreciated โค๏ธ.

screenshot of wizzywid

Developing

  • Install dependencies
  $ npm install -g bower
  $ bower install
  • Run the app in a local server
  $ python3 -m http.server --bind localhost 8000

Configuring

Disclaimer: to configure the app to have other elements than the ones it already has, you should clone it, build it, and make one of the changes below. I don't want to add a "anyone should add any element to this exact deployed app" feature because that invites a database and a bunch of XSS opportunities in the house, and that's not really the point of this project. That being said, I would like the steps below to be as easy as possible. โค๏ธ

Also, start all of the sentences below with "In theory, ...". ๐Ÿ˜…

Adding another native element

Add another entry to the elements-native.json file. If this is a weird native element, you might have to do some code changes:

  • if it doesn't have a closing tag (like <input> or <img>), update dumpElementEndTag in code-view.html
  • if it doesn't have a "slot", i.e. you shouldn't be able to drop children in it (like <input>), you need to make 1 change each in app-shell.html. canvas-view.html and canvas-controls.html (just search for input, you'll find it.). Yes I should probably make this only exist in one place, but you know what, communicating between siblings is hard.

Adding another custom element

Add the element you want to the devDependencies section of this project's bower.json file, then run bower install. This element needs to use HTML Imports for it to work. If the import isn't of the form element-name/element-name.html, you'll have to hand craft dumpImports() in code-view.html.

Adding another sample

Add the name of the sample in elements-samples.json, and create a file in the samples directory with the same name. This file should contain a <template>, and in the template the contents of your new sample. Note that this template obviously has no shadow DOM (unless you add just a custom element), so if in it you add a <style> div {color: red}</style>, this will, of course, style all the divs in the app, and you'll have a hard time removing that code :(

Adding a new theme

To reskin the app, you need to define a set of custom properties. Check the retheme method in app.js for the list. Or see it in action.

wizzywid's People

Contributors

cristianiacobanu avatar dfreedm avatar jrstanley avatar notwaldorf avatar syu93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wizzywid's Issues

Custom/Native/Samples palette behaviour is broken on Safari

Safari 10.1.2 (12603.3.8)
MacOS 10.12.6 (16G29)

  • Scroll doesn't work (mentioned this in #13 )
  • Filtering doesn't work (that is, when you type into the filter field, it lets you type, but no actual filtering is done, the list remains as is)

Additinoally:

  • Open "Custom"
  • Click inside the filter input
  • <Tab> to the list
  • Keep <Tab>ing until you've scrolled a couple of items past the edge of the screen so that the filter input disappears
  • Switch to "Samples" or "Native"
  • It looks like the list is re-used and it remains "scrolled"

Refactorings needed

  • element-stuff should be one thing, with the subelements hidden behind it
  • same with palette
  • separate all the element actions into a canvas-controls
  • app-shell should pass selectedElement to canvas-controls (and everyone else who cares about it)
  • like this.$.propertiesContainer.display(el);
  • also app-shell blows as a name

Support Polymer 3 without putting me into a funk

This looks great, love the name! Feel free to close this issue right away, this is just my rambling, half-baked feedback / thoughts.

It causes me pain just thinking about what this gem will look like when migrating it to Polymer 3. Okay, I'm sure I'll be proven wrong, but... I wonder if it makes sense to:

  • Separate the tool into "crafting" components vs "assembling" pages/fragments which can reference the components.
    • The craft part would help with writing a custom element using JavaScript / template literals (sigh).

    • As for assembling, introduce into Polymer a Polymer-supported custom element that does client-side includes - something like my favorite angular 1 directive: "ng-include," as a custom element that the polymer IDE and other polymer tools would know about. It just retrieves a snippet of html and pastes it inside the custom element. And maybe caches it. And handles script tags. And maybe uses HTML templates somehow for better performance. And supports lazy loading. And during build, optionally supports embedding (in cases where the HTML was split only to make files easier to manage, not for reuse). This would also be useful for applications that use some server-side generation, like asp.net mvc or J2EE MVC. I think.

    • Add support for assembling html snippets together in wizzywid, to build old-fashioned HTML declarative designs.

Theia IDE as good base

Open from JSFiddle

Dear ladies and gents, it would be super nice to be able to open a wizziwid design from JSFiddle (or any other online "repo"). I'm using wizzywid to learn Polymer 2.0 and it's super motivating to see instant results. I'd wish there was a save function, or some way which allows me to pick up where I left off, by not having to add my incomplete app design to the sample components.
Thanks very much.

Color picker shows a black background for transparent colours

Ugh, <input type=color> has a default value of black in chrome, and nulling it will just use the defaultValue. It seems impossible not to show a color in the picker itself, so we probably have to do something smarter, like hiding the color picker? (sigh)

Remove the bower_components folder

Is there any strong reason for maintaining the bower stuff in the git history? IMO almost people checking out this repo are familiar with the process of installing those.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.