Giter Club home page Giter Club logo

blockbuilder's People

Contributors

curran avatar dependabot[bot] avatar enjalot avatar erikhazzard avatar georules avatar gitter-badger avatar gordyd avatar hydrosquall avatar leitzler avatar micahstubbs avatar ocarneiro avatar pavelloz avatar shobhitg avatar steltenpower avatar tungs avatar vicapow 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

blockbuilder's Issues

Test on other browsers / platforms

Here are some issues I encountered with cross-browser testing:

  1. On Safari 8.0.7 on OS X 10.10.4, scrolling through the code doesn't expand the code view.

  2. On Firefox 39.0.3 on OS X 10.10.4, the scrolling for the code box works but the focus doesn't reset to the result view on hover.

There are potentially more that I haven't found, so feel free to leave a comment on this PR if you find other bugs. Thanks!

add error modals

when we have a problem saving or other app-level problems we should let the user know via a modal, rather than silently failing as we do now (console.logs aren't enough...)

we can make something like https://github.com/rackt/react-modal available on the app to make it easy to throw up a modal from anywhere

default html boilerplate

Let's figure out what html should be included by default in a fresh block.

Currently the most important thing would be the cdn link for d3.js

Cannot scroll README

I'm looking at the Matrix: Reboot example, and the README is just barely too long to fit in the rendered markdown view panel. When I try to scroll, the source area scrolls up over the README. I would like some way to see the entire rendered markdown.

Better default block

It would be great if, upon creating a new block, the margin convention was set up for me.

It would also be cool, though less essential, to have some basic D3 code to copy and work with. It shouldn't be took complicated that it takes more than a moment to understand.

improve file adding/editing UX

Because we count on loading the raw data from github our edits aren't immediate, and that isn't obvious.

If you add data.json to the block via the file adding UI, it will save and reload the page. Let's say you have an error in the json file, or want to edit it slightly. Edits will seem like they are refreshing the display, but aren't actually doing anything. If you click save and reload the page you will see the results, but that sucks.

potential hacky but seamless solution

hijack d3.ajax and short-circuit the function to return text found in the file contents rather than a real ajax request.
This would mean injecting some javascript after d3 is loaded but before the user code is run... and would only work with d3 function calls. If this solution breaks for some reason it would be very unclear to the user why their code is broken.

worse UX but simpler solution

Make it very clear in the UI that editing files requires a roundtrip. Make it easy for the user to save+refresh from the file editing ui?

Text editing in browser

I have tried using simple plugin extensions for chrome like "Search & Replace" to be able to do basic tasks like finding a name and replacing all instances with a new name. Unfortunately these don't work to well (at least in my hands). Would be great to know how to maybe implement some extra text editor capabilities. Thanks.

use #hashtag urls to save view state

this could be useful for keeping a certain file tab open when refreshing or embedding. could also use it to control rendering of code & display windows (sidebyside vs. standard vs code only vs display only)

get back to original value after sliding slider

Often after using a slider I just want to get back to the original value, especially if I'm just using the slider to explore what the value affects visually. But, by the time I stop sliding, I've lost the original value. The only way to get back is to do a ton of "control Z".

Would be nice to have a way to keep track of the original value and easily get back to it. And/or to see the diff and choose if I want the new or old value.

Slider widget 'sticks' when switching between standard and side-by-side view

Description

The slider widget stays on the screen when clicking a numeric value in standard mode and then switching to side-by-side mode.

Steps to reproduce

  1. View a project
  2. click a numeric value (such as font-size, width, margin-top, etc)
  3. switch a to side-by-side mode

Observed behavior

The slider widget stays visible on the page, and can not be cleared.
sticky-slider-widget

Expected behavior

The slider widget should be cleared from the page.

Environment

I am using Firefox 40.0.3 on Xubuntu 15.04.

deal with large files

problem

Files over 1mb get truncated by the gist API
https://developer.github.com/v3/gists/#truncation

Since we are currently relying solely on the client's version of the gist this will break forking/saving of blocks with large files.

Keep in mind that we can't fork using the gist API for 2 reasons:

  1. we want our fork to include local modifications
  2. github won't let you fork your own gists

potential solution

According to the docs we can use the raw URL to download the file up to 10mb, after that we would need to clone the gist using git. So for any block with files larger than 10mb we need to throw up our hands (the size of each file is included in the gist data). For files between 1mb and 10mb we need to add extra logic to download the data so we can properly fork from the client, and we need to let the user know whats happening as it will probably take a while to download the data before they are able to fork.

first-run annotations

I've gotten some good feedback about adding more explicit annotations when a user first comes to a block (or the homepage). These could be in the form of small text call-outs to the right of the block/code as well as tooltips:

  • click me to popup the renderer, or hit esc while editing
  • this is the output, this is the code
  • gist/block navigation explanations

Crashes when protocol left out

I'm not sure what is going on, but when I leave out the protocol from the include (e.g. removing the https: part from https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js to make the line <script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>, the program doesn't render any html.

I have a hunch this is a trivial bug, but can definitely be a showstopper for someone just trying to learn.

Building blocks is already nice and useable

It will find skyrocketing beta adoption if its demo could be permanently hosted as well which could be updated with the most stable version (based on npm semver's minor digit).

Lets discuss ideas around this topic.

Some minor design suggestions

From a discussion with Nils:

  1. Some sort of different background color / subtle indicator for the mouseover area when the code is fullscreen to provide affordance to the user that something will happen if they mouse over it
  2. Immediately showing / hiding the block is slightly jarring - perhaps a quick transition would make it so when the block canvas area appears, it's not as jarring
  3. different icon / symbol / text for the side-by-side. Perhaps we can start off by using more labels, and then imrpove over time reducing the number of labels (explict vs. implict - try to keep the UI as unambigious as possible). At a bare minimum, all labels / images should have a title tag and images an alt tag

Block output not automatically updating with code changes

Description

When making a code change in a block example, the display does not update to reflect new changes.

Steps to reproduce

  1. View a project
  2. make a code change

Observed behavior

The rendered result stays the same until some page event, such as switching to side-by-side mode, causes re-render.

Expected behavior

The rendered output should change to reflect the state of the code, or the user should be encouraged to manually refresh the output.

Environment

I am using Firefox 40.0.3 on Xubuntu 15.04.

add "save private" checkbox

if we change the public: true property to false before we fork/create a gist it will be made private (meaning only people with the link will be able to see it). We could provide some special UI indications that the gist being viewed/edited/saved is private.

Slider not rendering when clicking numeric values in side-by-side mode

Description

The slider widget does not render when clicking a numeric value in side-by-side mode.

Steps to reproduce

  1. View a project
  2. switch a to side-by-side mode
  3. click a numeric value (such as font-size, width, margin-top, etc)

Observed behavior

When clicking a numeric value, the cursor is placed at the point of click.

Expected behavior

The cursor should be placed at the point of click and a slider should render above the value.

Environment

I am using Firefox 40.0.3 on Xubuntu 15.04.

defer attribute in script tag doesn't work with local files

Since building-blocks directly replaces script references to local files with code, the defer attribute in script tags does not work (it only works with non-inline code). This can create issues with blocks where there are internal and external scripts with defer tags; the internal scripts will load and execute before any external scripts with the defer tag, which may not be the intended behavior.

Example of the issue. MDN reference to script/defer.

login via modal rather than leaving page

This way you don't risk losing work when you realize you haven't logged in.

It is possible to login via a different tab, the cookie will then be valid but nobody will really discover this or risk trying it.

media cards for better twitter/slack sharing

We can add metadata to a blockbuilder page so that it has a nice description and thumbnail when shared on slack or twitter: https://dev.twitter.com/cards/getting-started

e.g.

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@nytimes">
<meta name="twitter:creator" content="@[TWITTER NAME]">
<meta name="twitter:title" content="[TITLE]">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="http://graphics8.nytimes.com/images/2012/02/19/us/19whitney-span/19whitney-span-articleLarge.jpg">

this will likely involve rendering the tags using handlebars

add About page

Once I receive all of the survey results I can add backer names + links to the about page.

handle when a relative path is referenced and failed

Many (of mbostock's) example blocks have a required file with a relative path, especially for geo examples.

For example: Coastal Graph Distance
http://bl.ocks.org/mbostock/9744818

When bringing it into building blocks, it just shows up blank. :(

The path is passed to d3.json as: "/mbostock/raw/4090846/us.json"

I'm not sure what the answer is, but should be handled in some way. On a simple level, maybe just a warning message. Better if there is a workaround to bring in the file somehow. Best if something happens automatically to make it work :)

external JS files should be edited in CodeMirror

I made all files that weren't the index.html or README.md editable via HTML5 textarea rather than using CodeMirror. This is mostly to avoid performance problems when trying to render large csv or json files. For external code files we should easily be able to support new editor instances (e.g. for .js or .coffee, maybe even .jsx, .jade etc)

You can see how the editor components are loaded dynamically depending on which file is being used:
https://github.com/enjalot/building-blocks/blob/master/public/js/components/editor.js#L50

the implementations for HTML: https://github.com/enjalot/building-blocks/blob/master/public/js/components/editor__html.js
Markdown: https://github.com/enjalot/building-blocks/blob/master/public/js/components/editor__md.js

add gallery page

One of the reward tiers was to allow backers to choose their favorite block for inclusion in a special gallery. Once I receive the list of blocks from the backer survey this page should be quick to construct!

Add link to the kickstarter campaign

You might want to add a note and a link to the kickstarter page for the folks who land on this repo through other channels (for instance seeing it starred by a friend).

Replace links at the bottom by tabs

Currently, the file-switcher is non-existent and is basically a set of links at the bottom of the page which links directly to Github. Here's what it looks like right now:
old_file_switcher_example

Here's what I'd like it to look like: (note that this will be at the top of the file and not the bottom, also, ignore placeholder text)
new_file_switcher_example

I'm fairly confident that both me and @enjalot want the files to show up in the tab on clicking on them, but I'm not sure about the 'More' dropdown.
Should we have a dropdown? Should it try to render the files locally to the best of its ability or redirect to the raw Github file like its doing right now (might be beneficial if the file is 200 MB for example)? Thoughts and suggestions greatly welcome.

Also, what tab switcher should we use? I quickly hacked up the prototypes based on the Bootstrap tab switcher, but maybe there is a better one that doesn't require importing such a huge library?

Anything else I may not be considering? Thanks!

Optional transition from one property to a next when possible

It would be nice if there was a global "duration" property and any change in a style or attribute was actually transitioned to the new style/attribute, rather than a complete rerendering.

I realize this is a major feature request, but animated transitions are in data visualization because we know it helps people to follow how one thing changes to another.

Syntax error line numbers

screen shot 2015-10-13 at 3 35 43 pm

It's hard to find where your error is because the code loaded in from the blob doesn't have a map to the line number you are working on in the editor.

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.