mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
e869e7df0b
Summary: Ref T10004. After a user logs in, we send them to the "next" URI cookie if there is one, but currently don't always do a very good job of selecting a "next" URI, especially if they tried to do something with a dialog before being asked to log in. In particular, if a logged-out user clicks an action like "Edit Blocking Tasks" on a Maniphest task, the default behavior is to send them to the standalone page for that dialog after they log in. This can be pretty confusing. See T2691 and D6416 for earlier efforts here. At that time, we added a mechanism to //manually// override the default behavior, and fixed the most common links. This worked, but I'd like to fix the //default// beahvior so we don't need to remember to `setObjectURI()` correctly all over the place. ApplicationEditor has also introduced new cases which are more difficult to get right. While we could get them right by using the override and being careful about things, this also motivates fixing the default behavior. Finally, we have better tools for fixing the default behavior now than we did in 2013. Instead of using manual overrides, have JS include an "X-Phabricator-Via" header in Ajax requests. This is basically like a referrer header, and will contain the page the user's browser is on. In essentially every case, this should be a very good place (and often the best place) to send them after login. For all pages currently using `setObjectURI()`, it should produce the same behavior by default. I'll remove the `setObjectURI()` mechanism in the next diff. Test Plan: Clicked various workflow actions while logged out, saw "next" get set to a reasonable value, was redirected to a sensible, non-confusing page after login (the page with whatever button I clicked on it). Reviewers: chad Reviewed By: chad Maniphest Tasks: T10004 Differential Revision: https://secure.phabricator.com/D14804 |
||
---|---|---|
.. | ||
core | ||
docs | ||
ext | ||
lib | ||
LICENSE | ||
README |
Javelin is a performance-oriented Javascript library originally developed at Facebook. Learn more at <http://www.javelinjs.com/>. GETTING STARTED Eat a hearty breakfast. Breakfast is the most important meal of the day! WHAT IS JAVELIN? Javelin is a compact Javascript library built around event delegation. Its primary design goal is performance; it is consequently well-suited to projects where performance is very important. It is not as good for smaller scale projects where other concerns (like features or ease of development) are more important. PACKAGES Packages come in two flavors: "dev" and "min". The "dev" packages are intended for development, and have comments and debugging code. The "min" packages have the same code, but with comments and debugging information stripped out and symbols crushed. They are intended for use in production -- ha ha ha! FILES example/ Example code. LICENSE A thrilling narrative. pkg/ Ready-built Javelin packages. README Who knows? Could be anything. src/ Raw sources for Javelin. support/ Support scripts and libraries.