1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 13:21:02 +01:00
phorge-phorge/src/applications/transactions
epriestley 7a79131bf2 Replace old hard-coded URI-based "changes saved" jank with new overgeneralized cookie-based "changes saved" jank
Summary:
Ref T13515. Settings currently has some highly specialized code for rendering "Changes saved." messages. The "saved" state is communicated across a redirect-after-POST by adding `/saved/` to the end of the URI.

This isn't great. It needs a lot of moving pieces, including special accommodations in routing rules. It's user-visible. It has the wrong behavior if you reload the page or navigate directly to the "saved" URI.

Try this scheme, which is also pretty sketchy but seems like an upgrade on the balance:

  - Set a cookie on the redirect which identifies the form we just saved.
  - On page startup: if this cookie exists, save the value and clear it.
  - If the current page started with a cookie identifying the form on the page, treat the page as a "saved" page.

This supports passing a small amount of state across the redirect-after-POST flow, and when you reload the page it doesn't keep the message around. Applications don't need to coordinate it, either. Seems somewhat cleaner?

Test Plan: In Firefox, Safari, and Chrome: saved settings, saw a "Saved changes" banner without any URI junk. Reloaded page, saw banner vanish properly.

Maniphest Tasks: T13515

Differential Revision: https://secure.phabricator.com/D21144
2020-04-19 09:04:31 -07:00
..
application Allow EditEngine forms for objects which support subtyping to have a subtype configured 2017-03-02 04:18:06 -08:00
bulk Fix an issue where the "viewer" is not passed to Bulk Edit controls properly 2019-09-26 12:03:49 -07:00
commentaction When you "Request Review" of a draft revision, change the button text from "Submit Quietly" to "Publish Revision" 2018-11-15 20:50:21 -08:00
conduit Fix an error message when calling "transaction.search" with a non-transactional object PHID as an "objectIdentifier" 2019-10-17 09:19:54 -07:00
constants Allow any transaction group to be signed with a one-shot "Sign With MFA" action 2018-12-28 00:09:30 -08:00
controller Inline custom policy rules inside policy capability explanation dialogs 2019-09-12 09:40:50 -07:00
data Don't re-mention users for comment edits 2016-06-13 13:57:59 -07:00
draft Show yellow "draft" bubble in Audit 2017-01-16 10:28:59 -08:00
edges Add "Mute/Unmute" for subscribable objects 2018-02-08 11:06:22 -08:00
editengine Replace old hard-coded URI-based "changes saved" jank with new overgeneralized cookie-based "changes saved" jank 2020-04-19 09:04:31 -07:00
editfield Support "date" custom fields in "*.edit" endpoints 2019-07-31 13:10:14 -07:00
editor When issuing a "no-op" MFA token because no MFA is configured, don't give the timeline story a badge 2020-01-30 07:35:40 -08:00
edittype Accept null via conduit.edit to unassign a task 2018-01-31 15:33:52 -08:00
engine Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
engineextension Allow subtypes to specify "mutations", to control the behavior of the "Change Subtype" action 2019-09-12 16:17:02 -07:00
error Allow users to unset "Editor", tailor short error messages properly on settings forms 2016-06-05 14:03:02 -07:00
exception Raise a warning when mentioning a user in a comment on a draft revision 2018-03-12 17:03:14 -07:00
feed Separate "feed" and "notifications" better, allow stories to appear in notifications only 2018-12-10 16:02:43 -08:00
herald Support "Subtype" in Herald 2019-09-12 14:34:06 -07:00
interface Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
phid Allow ApplicationEditor forms to be reconfigured 2015-11-10 10:24:40 -08:00
query Build a rough transaction-level view of Feed 2019-05-21 12:28:00 -07:00
replyhandler Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
response Pass timeline view data to comment previews, restoring Differential comment previews 2019-01-03 13:06:54 -08:00
storage Correct rendering of workboard column move stories when a single transaction performs moves on multiple boards 2019-11-08 16:57:35 -08:00
typeahead Support filtering feed transactions by object type 2019-05-21 12:39:10 -07:00
view Modularize PhabricatorEditEngineConfigurationTransaction 2019-06-20 16:25:21 -07:00
worker Cache user notification and message counts 2016-06-05 08:52:43 -07:00
xaction Fix incorrect construction of subtype map when validating "subtype" transactions against non-subtypable objects 2019-08-28 06:57:04 -07:00