Comments (16)
Two parts to the solution:
-
Derive a unique url for every state you can reach by manipulating the
interface, and make sure each can be resolved correctly server-side (this
is the harder part) -
Use the HTML5 pushState interface to manipulate the browser history so
that a) the url changes without a refresh, and b) the back/forward buttons
work as expected.
This is how you get the "endless scroll" effect on most news sites
nowadays. You just keep scrolling down to see new articles, and the url
changes, and you can hit "back" to pop back up through them. Yet it's all
AJAX/javascript.
http://spoiledmilk.com/blog/html5-changing-the-browser-url-without-refreshing-page/
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
On Wed, Apr 2, 2014 at 10:20 AM, Daniel Halperin
[email protected]:
Right now we do a lot of automatic AJAX stuff on page load. One side
effect of this is that if you accidentally hit the back button while
writing a query, you lose all state. Yikes! This just bit us twice in a row.The website should pick up where you left off if you hit backwards &
forwards. A good model is GitHub, which somehow does this magically.Reply to this email directly or view it on GitHubhttps://github.com//issues/55
.
from myria-web.
Thanks for tips
from myria-web.
Another solution is just have separate pages for different languages and not use ajax for switching languages. The last query written should be stored though and we could use push state for that.
In general, I am not a friend of Ajax for things that can easily be done as separate pages.
from myria-web.
Before we have this great state aware feature. Can we set the default language to MyriaL?
I use MyriaL most of the time, so have to switch from Datalog to MyriaL each time. How about others and our users other developers?
from myria-web.
This seems like something you can easily submit a PR for, @stechu :)
Daniel Halperin
Director of Research for Scalable Analytics
eScience Institute
University of Washington
On Wed, Apr 16, 2014 at 4:30 PM, Shumo Chu [email protected] wrote:
Before we have this great state aware feature. Can we make the default
language to MyriaL?I use MyriaL most of the time, so have to switch from Datalog to MyriaL
each time. How about others and our users other developers?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-40664963
.
from myria-web.
@dhalperi I want to make sure most people is happy about that :) Do most people primarily using MyriaL?
from myria-web.
👍
from myria-web.
Just another input: @mbalazin has expressed a strong 👍 vote for saving state in the editor if we go back to it.
from myria-web.
It it enough to just save the latest state? That would be much easier since we don't have to mess with the history.
from myria-web.
I don't have an excellent understanding of the low-level implementation
issues here, just the high-level application behavior.
The key constraint is that if I'm writing a query, hit 'Queries', and hit
the back button, I want to be where I was.
Daniel Halperin
Director of Research for Scalable Analytics
eScience Institute
University of Washington
On Tue, May 6, 2014 at 11:48 AM, Dominik Moritz [email protected]:
It it enough to just save the latest state? That would be much easier
since we don't have to mess with the history.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-42342866
.
from myria-web.
#92 implemented much of this; let's refine the list of tasks?
- clicking an example can be undone
- changing language can be undone
from myria-web.
- changing tabs can be undone (or at least is stored in state)
from myria-web.
Thanks! Here's the detailed scenario:
A user is editing a query so he/she writes a simplified version, executes
it, and then goes to see the results.
It's important for that user to then be able to go back to the query editor
and continue editing the query.
The most recent query is enough for this scenario (no need to keep the
entire history).
thanks
magda
On Tue, May 6, 2014 at 1:10 PM, Dominik Moritz [email protected]:
- changing tabs can be undone (or at least is stored in state)
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-42352394
.
from myria-web.
@mbalazin Exactly this scenario works on https://demo.myria.cs.washington.edu now. As long as the page is not reloaded, a user can also use CMD+Z and CMD+Y to undo/redo changes. I think it would be nice to keep this history as well at least for a few steps. We can probably get this information out of http://codemirror.net/doc/manual.html#api_history
from myria-web.
Done in #93
from myria-web.
Thanks Dominik!!!!
magda
On Tue, May 6, 2014 at 2:30 PM, Dominik Moritz [email protected]:
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-42361666
.
from myria-web.
Related Issues (20)
- All results are listed on /datasets, making "real" datasets harder to locate HOT 1
- Add triangle query to list of examples
- Backend dropdown menu disappears on click HOT 1
- Lag when Waiting for Query Results HOT 2
- Wrong time selected
- Remove dependency on myria-python
- JSON dataset link on Results tab of query editor should open new tab/window HOT 2
- "Creating query" is not using https
- Consider sanitizing non-ASCII whitespace characters in queries HOT 1
- Remove unnecessary submodules HOT 3
- Replace raco submodule with install/develop HOT 2
- Move myria-web docs from myria-docs to myria-web HOT 1
- Expose MyriaX version in UI
- Travis is failing HOT 4
- Add a checkbox for push_sql groupby
- Refactor PerfEnforce Myria-Web Interface
- Move myria-web repo to uwdb org
- I'm not presently able to execute any of the data load data from the demo UI HOT 3
- Display informative error message when selected query language is mismatched with query
- Can't instantiate abstract class Fixpoint with abstract methods partitioning 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 myria-web.