Comments (6)
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.
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.
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.
@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.
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.
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)
- Make it work with new seed structure
- Support CTRL+S key binding to save challenge
- Unsaved changes modal warning z-index
- Change default function of "home" and "end" keys
- Standardized output order
- Insert Copies directly after the origional
- Append Newline at end of file
- Add Dropdown for Challenge Type
- Add Date Picker for "releasedOn" field
- Position header fixed at the top HOT 1
- Empty Arrays are excluded from JSON output HOT 1
- Spell check, Open file and Tab key
- "Choose File" should rescan challenge directory
- Warn about unsaved changes on Refresh
- Highlight currently active tab in header
- COM not respecting property types, breaking production
- lodash-es-4.6.0.tgz 404 error on npm install. HOT 2
- major accessibility issues HOT 1
- add hints to COM interface
- Add translations field HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from com1000.