Refactor save to Pocket button messaging system
Categories
(Firefox :: Pocket, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | verified |
People
(Reporter: thecount, Assigned: thecount)
References
Details
Attachments
(1 file)
Right now the messaging system used for the save to Pocket button is standard js element events passing messages to and from the iframe. I think the main message system can be moved to JSWindowActors.
A few goals or advantages to this refactor.
Move to JSWindowActors.
I think a few chunks of the code can be deleted or simplified.
It'll make us less dependent to iframes, opening us up to some future options like: browser element over iframe, and better debugging tools.
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Because of the nature of refactoring messages, almost every interaction in the doorhanger should be tested, to test each of these:
Test panels
- Create or have a Pocket account ready.
- Try to save a page while logged out of pocket.
Expected: Should see a login page. - Log in.
- Try to save a page.
Expected: should see a save confirmation page.
Test premium
- Log in with a premium account, or set extensions.pocket.settings.premium_status to 1
- Try to save a page.
Expected: should see suggested tags.
Expected: Panel height should match the content.
Test regular
- Log in with a regular account, or set extensions.pocket.settings.premium_status to 0
- Try to save a page.
Expected: should not see suggested tags.
Expected: Panel height should match the content.
Test on save recs
- Try to save a page.
Expected: Should see 3 recommended recs.
Expected: Panel height should match the content. - Try to save a page without on save recs, I use https://www.youtube.com/.
Expected: Should not see 3 recommended recs.
Expected: Panel height should match the content.
Test error states
- Go to the page about:robots
- Try to save it.
Expected: Should show an error message.
Expected: Panel height should match the content. - Turn off your local internet connection.
- Try to save a different page.
Expected: Should show a different error message.
Expected: Panel height should match the content.
Test panel heights that were not tested above
- Save https://www.youtube.com/ without premium.
Expected: Panel height should match content. - Save https://www.youtube.com/ with premium.
Expected: panel height should match content.
Test buttons and links
- Log out.
- Click the save to Pocket button.
- Should see 4 links/buttons, learn more, sign up with firefox, sign up with email, and sign in.
- Click each of them.
Expected: Should take you to getpocket.com pages for firefox_learnmore, ff_signup, signup, and login.
Test telemetry
- Set browser.ping-centre.log to true
- Log out of Pocket.
- Try to save a page.
Expected: should see a pocket ping with{"action":"click","source":"save_button"}
and"pocket_logged_in_status":false
- Log in to Pocket.
- Try to save a page.
Expected: should see a similar pocket ping but this time with"pocket_logged_in_status":true
- Try to save a page that shows on save recs
Expected: should see a similar pocket ping but this time with[{"action":"impression","position":0,"source":"on_save_recs"},{"action":"impression","position":1,"source":"on_save_recs"},{"action":"impression","position":2,"source":"on_save_recs"}]
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Comment 5•4 years ago
|
||
We have verified all the scenarios mentioned in comment 2 and sent a Testing Report via email. You can also see it here.
Description
•