Coder Social home page Coder Social logo

Syntax error line numbers about blockbuilder HOT 8 CLOSED

enjalot avatar enjalot commented on June 10, 2024
Syntax error line numbers

from blockbuilder.

Comments (8)

enjalot avatar enjalot commented on June 10, 2024

yeah, this is because I'm inserting code before the user's code in the
iframe. We could count the lines and offset the line number given... but
can we intercept iframe errors?

We could probably add a onerror to the window inside the iframe code. it
could then postMessage the error and its metadata to the parent frame which
could then add widgets to the codemirror like we did in tributary

On Tue, Oct 13, 2015 at 12:36 PM, Geoffery Miller [email protected]
wrote:

[image: screen shot 2015-10-13 at 3 35 43 pm]
https://cloud.githubusercontent.com/assets/775628/10466063/22e6b550-71c0-11e5-8715-7932d7d57cf7.png

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.


Reply to this email directly or view it on GitHub
#59.

Ian Johnson - 周彦
http://enja.org

from blockbuilder.

georules avatar georules commented on June 10, 2024

I'll dig into it, thanks for the leads to investigate.

from blockbuilder.

georules avatar georules commented on June 10, 2024

Request for comments: georules@65ffadb#diff-132135bd3a692d173dafa3b21db2c06fR168

from blockbuilder.

georules avatar georules commented on June 10, 2024

Attaching a handler to iframe https://github.com/enjalot/building-blocks/blob/master/public/js/components/renderer.js#L71 did not seem to fire for me. I tried iframe.contentWindow as well, but it did not fire (no complaining about any iframe sandbox security either)

from blockbuilder.

enjalot avatar enjalot commented on June 10, 2024

yeah, from what I can tell you can only listen to the errors from within
the iframe

On Thu, Oct 15, 2015 at 11:33 AM, Geoffery Miller [email protected]
wrote:

Attaching a handler to iframe
https://github.com/enjalot/building-blocks/blob/master/public/js/components/renderer.js#L71
did not seem to fire for me. I tried iframe.contentWindow as well, but it
did not fire (no complaining about any iframe sandbox security either)


Reply to this email directly or view it on GitHub
#59 (comment)
.

Ian Johnson - 周彦
http://enja.org

from blockbuilder.

georules avatar georules commented on June 10, 2024

I wanted to share a prototype of this, to ask what you think about the method of implementation. The styling needs a lot of work.

georules@6662894

https://youtu.be/8zfiCufLnHg

from blockbuilder.

enjalot avatar enjalot commented on June 10, 2024

this is great work! looks awesome so far. I shared a couple of comments in
the commit for things that I think could be improved, but I think the
fundamental approach is correct. 💯

On Sun, Oct 18, 2015 at 10:01 AM, Geoffery Miller [email protected]
wrote:

I wanted to share a prototype of this, to ask what you think about the
method of implementation. The styling needs a lot of work.

georules/building-blocks@6662894
georules@6662894

https://youtu.be/8zfiCufLnHg


Reply to this email directly or view it on GitHub
#59 (comment)
.

Ian Johnson - 周彦
http://enja.org

from blockbuilder.

georules avatar georules commented on June 10, 2024

The tooltip has some visual problems, I'm not sure why more than one is being created. I attempted to specify which ReactTooltip to use with data-for and id's as suggested in the docs when you have more than one, but that didn't seem to help.
screen shot 2015-10-19 at 8 58 18 am

The version of react-tooltip we have is fairly old, I'm not sure if that's an issue. I tried updating it, but it complained about a react peer dependency -- when I updated it it broke everything 😢

I'm a bit new to React, and I think I'm struggling because codemirror is not a react component, and I'm trying to put react components into it. I tried a few ways -- one way by inserting an element with data-tip into an innerHTML, but then you have to mouse over a different ReactTooltip before it will work (I think because it's not firing some kind of update/render for react when manually inserting innerHTML)
georules@28bf330#diff-54d7292f8a4b40b43aa9fad1c622303dR90

I also tried creating my own component class, but that's causing tons of components to be readded rather than reused.
georules@19b8aff#diff-54d7292f8a4b40b43aa9fad1c622303dR97

from blockbuilder.

Related Issues (20)

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.