-
Notifications
You must be signed in to change notification settings - Fork 472
PromptFeature refactoring #10323
Comments
I noticed that the constructor of the PromptFeature is larger than my screen now. 😄 That's usually a sign that the feature surface could possibly be split into several parts where needed. cc: @Amejia481 @gabrielluong who have worked on the feature and may have ideas too. |
Yes, completely agree, I think one first step is to put all the logins/credit cards callbacks into a delegate, we could add a delegate similar to ShareDelegate. |
I additionally we want to remove this function, and any similar, as we only want to delete by UID and be 100% sure that we are removing the right prompt. |
Regarding future refactorings was talking with Arturo about how desktop treats this http://jsfiddle.net/pahund/e9fv3j1m/show (enter some credentials, press submit, wait 5 seconds):
This distinction exists now in the app also (though not really enforced), there are Select*Prompts implemented as Views and then all the others prompts implemented as modal Dialogs.
Don't know where this would leave the FilePicker. Maybe it makes more sense to treat it as a queued prompt though having it opening another app to pick files some time after the user action might seem too intrusive. Could this be one PromptRequest that should just be dropped and not queued if another Prompt (as a Dialog) is shown? |
Here's my quick stab at refactoring this a while back. It's largely incomplete, but perhaps still useful: grigoryk@bf806c2 - I meant to come back to it before we need it for the autofill work, but alas. The idea in that refactor is to admit that there are fundamentally two types of prompts - those that originate from web content, and those that originate from the "chrome", the application itself. You'll notice that we already have this split, basically, but it's all spaghetti'd together. So, the refactor introduce two types - Regarding queuing, my understanding is that we 1) should never display multiple prompts, and 2) should never display prompts from any tab that isn't currently selected (and being actively viewed). I think this applies to all types of prompts that we have? If there are certain prompts/scenarios where this doesn't apply, let's capture that in the types we introduce here. |
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1796356 Change performed by the Move to Bugzilla add-on. |
Following #8989 and #10273 it was seen that there are some situations which can be better handled.
Most of these situations are to the
activePrompt
- what that should represent and how should that be updated. Currently it can be initialized or cleared without a new Prompt being displayed / dismissed and can remain cleared with other Prompts displayed.Things to consider:
Currently all Prompts are modals with new Prompts stacked on top of each other (not sure how common is to get more Prompts but it definitely happens)
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: