Giter VIP home page Giter VIP logo

Comments (6)

SaintPeter avatar SaintPeter commented on August 24, 2024

From @terakilobyte on November 25, 2015 1:47

The file loaded in the browser isn't the file from the file system, it's a copy.

I can think of a way but it requires adding a watcher to look for changes to any files in the directory and sending that data over sockets. Thinking about streaming the data back and forth instead of caching all changes in the client until the export button is hit..., the application will have to completely change how data is represented internally.

from com1000.

SaintPeter avatar SaintPeter commented on August 24, 2024

I'm not proposing a watcher, I'm proposing a reload file button. What I was thinking is that rather than "upload" the file, we could just as easily stream it up from the server, then allowing us to reload it on demand.

It's just a thought.

from com1000.

SaintPeter avatar SaintPeter commented on August 24, 2024

From @terakilobyte on November 25, 2015 12:16

Streaming up from the server or down to the server will require sockets. The HTTP request/response cycle is just not the answer as once the cycle is finished the contract has been fulfilled by both parties.

For a reload button, we can use the activeFile information and ask for that file from the server though.

from com1000.

SaintPeter avatar SaintPeter commented on August 24, 2024

@terakilobyte Why not just request it via AJAX and the filename?

New API endpoint: /filelist - lists out the *.JSON files in the output folder.
New Component: Filelist, takes that list and display is in some nice, select-able way.
New API endpoint: /sendFile/:filename - returns a file from the output folder

Reload just makes a request against sendFile, same as load a file does.

from com1000.

terakilobyte avatar terakilobyte commented on August 24, 2024

The way you mentioned it I thought you wanted the server to stream to the browser any changes outside of the browser, say to the raw json. There is no way for the server or browser to know if a file has changed without some kind of watcher. Also, unless we do a very naive timer to constantly request the file (a bad idea for many reasons), there is no way for the server to notify the browser of a change.

from com1000.

SaintPeter avatar SaintPeter commented on August 24, 2024

Let's not use any technical terms at all, because that's confusing the issue. Let me say it this way:

  • I want a button/dropdown on COM that lets me "open" a file directly from my local file system. IE: the same as "Choose file" but without needing to load stuff.
  • If a file has been "opened" in this way, I can click a "reload" button that will re-read it from the local file system.

Mostly this is about reducing friction and streamlining the interface.
Say I am testing a PR, I can easily load a file into COM and/or re-load it so I can see the elements without loading it on the site.
This is certainly not a critical feature. That it saves locally is already awesome.

from com1000.

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.