Closed
Bug 1339745
Opened 8 years ago
Closed 8 years ago
Sort the profile results for autocomplete popup by last used time
Categories
(Toolkit :: Form Manager, enhancement, P3)
Toolkit
Form Manager
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: selee, Assigned: steveck)
References
(Blocks 1 open bug)
Details
(Whiteboard: [form autofill:M3])
Attachments
(1 file)
After having the last used time in ProfileStorage, the profiles got from parent should contain the usage information and sorted by the last used time.
Updated•8 years ago
|
Whiteboard: [form autofill:M1] → [form autofill:MVP]
Updated•8 years ago
|
Whiteboard: [form autofill:MVP] → [form autofill:M3]
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → schung
| Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8879489 [details]
Bug 1339745 - Sort the profile results for autocomplete popup by last used time,
https://reviewboard.mozilla.org/r/150796/#review155584
::: browser/extensions/formautofill/FormAutofillContent.jsm:115
(Diff revision 1)
> this._getAddresses({info, searchString}).then((addresses) => {
> if (this.forceStop) {
> return;
> }
> + // Sort addresses by timeLastUsed for showing the lastest used address at top.
> + addresses.sort((a, b) => b.timeLastUsed - a.timeLastUsed);
Should we add the second factor if two addresses are added but not used? Maybe `timeCreated`?
::: browser/extensions/formautofill/test/mochitest/test_on_address_submission.html:32
(Diff revision 1)
> -// Autofill the address from dropdown menu.
> +let expectingPopup = null;
> +function expectPopup() {
> + info("expecting a popup");
> + return new Promise(resolve => {
> + expectingPopup = resolve;
> + });
> +}
> +function popupShownListener() {
> + info("popup shown for test ");
> + if (expectingPopup) {
> + expectingPopup();
> + expectingPopup = null;
> + }
> +}
Can these be shared from common.js?
Attachment #8879489 -
Flags: review?(lchang)
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 4•8 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8879489 [details]
Bug 1339745 - Sort the profile results for autocomplete popup by last used time,
https://reviewboard.mozilla.org/r/150796/#review155584
> Should we add the second factor if two addresses are added but not used? Maybe `timeCreated`?
Since UX didn't really care about the sorting for addresses with same last used time, maybe we can ignore it unless user complains.
Comment 5•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8879489 [details]
Bug 1339745 - Sort the profile results for autocomplete popup by last used time,
https://reviewboard.mozilla.org/r/150796/#review156672
::: browser/extensions/formautofill/test/mochitest/formautofill_common.js:112
(Diff revision 2)
> +function popupShownListener() {
> + info("popup shown for test ");
> + if (expectingPopup) {
> + expectingPopup();
> + expectingPopup = null;
> + }
> +}
Although I know it's unrelated to your patch, could you futher facilitate this util function by adding something like:
```js
function initPopupListener() {
registerPopupShownListener(popupShownListener);
}
```
Thanks.
::: browser/extensions/formautofill/test/mochitest/test_on_address_submission.html:62
(Diff revision 2)
> + await setInput("#" + key, TEST_ADDRESSES[1][key]);
> + }
> +
> + clickOnElement("input[type=submit]");
> +
> + // The 2nd test address should be on the top since it's the latest one.
nit: "... since it's the last used one".
Attachment #8879489 -
Flags: review?(lchang) → review+
| Comment hidden (mozreview-request) |
Pushed by lchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26c2121cc1ef
Sort the profile results for autocomplete popup by last used time, r=lchang
Keywords: checkin-needed
Comment 9•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•