1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42:42 +01:00
phorge-phorge/src/applications
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
..
almanac Give "Config" a full-width, hierarchical layout 2020-02-04 06:59:51 -08:00
aphlict Reduce the verbosity of the "Aphlict" log 2020-04-14 13:24:44 -07:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit When publishing a commit, copy "Related Tasks" from the associated revision (if one exists) 2020-02-04 07:05:09 -08:00
auth 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
badges Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
base Give the Phortune external portal an order view 2019-08-26 07:49:17 -07:00
cache Straighten out replication/cache behavior in "bin/storage dump" 2019-08-28 08:25:40 -07:00
calendar Merge a small amount of remaining "libphutil/" code with Phabricator, break libphutil dependency 2020-02-12 15:17:36 -08:00
celerity Fix "Actions" button on Phame standalone/live pages (bonus: JX.sprintf()) 2019-04-04 06:10:14 -07:00
chatlog Replace "getRequestURI()->setQueryParams(array())" with "getPath()" 2019-02-12 14:43:33 -08:00
conduit In Conduit responses, assert that Phabricator supports a "gzip" capability 2020-04-14 16:51:03 -07:00
config Hide "notification.servers" configuration and don't follow redirects from Aphlict 2020-04-15 07:00:51 -07:00
conpherence Improve Conpherence behavior for logged out users. 2019-04-02 14:03:08 -07:00
console Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
countdown Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
daemon Fix missing display cell in daemon summary table 2019-08-12 12:46:48 -07:00
dashboard Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView" 2020-02-04 06:52:23 -08:00
differential Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
diffusion Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
diviner Refine handling of "@task" attributes in Diviner 2020-04-06 11:51:33 -07:00
doorkeeper Remove all readers and all nontrivial writers for "accountType" and "accountDomain" on "ExternalAccount" 2020-02-22 17:48:46 -08:00
draft/storage When purging drafts after a transaction edit, purge all drafts 2018-02-11 06:01:09 -08:00
drydock Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView" 2020-02-04 06:52:23 -08:00
fact Return empty data if fact dimension is missing, not yet available 2019-10-30 16:34:22 +02:00
favorites Make "Favorites" work more like other customizable menus 2019-04-09 13:59:35 -07:00
feed Support export of feed transactions to CSV/Excel/etc 2019-05-21 12:47:46 -07:00
files Compress file downloads if the client sends "Accept-Encoding: gzip" and we guess the file might compress alright 2020-04-15 11:53:35 -07:00
flag Add a "Remove flag" action to Herald 2019-09-09 13:15:52 -07:00
fund Update a straggling "getAuthorities()" call in Fund 2019-09-04 07:15:20 -07:00
guides Remove legacy "DashboardInstall" table 2019-04-14 10:27:52 -07:00
harbormaster Update some Phabricator behaviors for changes to Futures 2020-04-03 12:28:16 -07:00
help Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
herald Update Herald rule creation workflow to use more modern UI elements 2020-02-04 07:37:54 -08:00
home Make "Favorites" work more like other customizable menus 2019-04-09 13:59:35 -07:00
legalpad Don't present users with Herald fields/actions for uninstalled applications, unless the rule already uses them 2019-09-12 14:33:28 -07:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro Improve timeline rendering for old macros 2019-04-18 18:25:17 -07:00
maniphest Remove Ferret function aliases and overrides 2020-04-16 13:40:17 -07:00
meta Fix a straggling callsite to "renderApplicationPolicy()" 2019-09-12 16:26:57 -07:00
metamta Remove old code for sending email to external users who create objects via inbound mail 2020-02-20 12:41:51 -08:00
multimeter Fix a PhutilURI issue in Multimeter 2019-02-17 17:39:34 -08:00
notification Hide "notification.servers" configuration and don't follow redirects from Aphlict 2020-04-15 07:00:51 -07:00
nuance Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
oauthserver Lightly modernize OAuth server application view pages 2019-07-02 05:15:37 -07:00
owners When Owners packages are archived, annotate them in tokenizer results 2020-04-17 06:18:04 -07:00
packages Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
passphrase Correctly identify more SSH private key problems as "formatting" or "passphrase" related 2019-11-13 10:22:00 -08:00
paste Add Ferret support to Paste 2020-04-16 14:10:23 -07:00
people Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
phame Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
phid Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
phlux Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
pholio Fix an out-of-date API call on the destruction pathway for Pholio mocks 2020-04-10 08:01:34 -07:00
phortune Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
phrequent Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
phriction Fix an XSS issue with certain high-priority remarkup rules embedded inside lower-priority link rules 2019-12-13 10:37:50 -08:00
phurl Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
policy Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
ponder Fix a missing pht() in Ponder 2019-04-12 12:18:56 -07:00
project Fix an issue where loading a mangled project graph could fail too abruptly 2020-02-03 08:54:04 -08:00
releeph Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
remarkup Recognize self-URI links to Diffusion files and give them special rendering behavior 2019-05-21 13:07:37 -07:00
repository Improve performance when marking commits as unreachable after multiple ref deletions 2020-04-03 13:28:42 -07:00
search Modularize Ferret fulltext functions 2020-04-16 13:41:13 -07:00
settings 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
slowvote Deprecate ancient "slowvote.info" API method 2019-07-31 11:28:08 -07:00
spaces Remove "Editable By" description fields in Passphrase, Phame, and Spaces 2019-09-12 09:36:50 -07:00
subscriptions When sorting subscriber references for display in the curtain UI, sort without case sensitivity 2020-02-04 15:26:05 -08:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Update repository identities after all mutations to users and email addresses 2019-11-19 09:41:59 -08:00
tokens Allow tokens to be awarded to MFA-required objects 2018-12-28 00:14:48 -08:00
transactions 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
typeahead Make Portals indexable with Ferret 2019-04-10 13:33:54 -07:00
uiexample Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
xhprof Allow XHProf profiles to be drag-and-dropped to upload them 2017-02-23 11:16:19 -08:00