Closed Bug 498825 Opened 15 years ago Closed 15 years ago

Rewrite install/download buttons so they don't have so many problems

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: rdoherty)

References

Details

Attachments

(3 files, 1 obsolete file)

We have a bunch of bugs with the install/download buttons and we've talked about rewriting the code for a long time. It seems like we touch that code a lot and every time we do we collectively cringe and QA senses our concern and gets stressed out. If we rewrite them with all the edge cases in mind we can make them easier to work on and more correct for the users.
Blocks: 497478
Blocks: 498714
Blocks: 429009
Blocks: 496364
Blocks: 495309
Blocks: 468653
Blocks: 424532
Blocks: 439912
Blocks: 488409
Depends on: 491446
Blocks: 488407
Blocks: 488406
Blocks: 427346
Blocks: 496286
Blocks: 491446
No longer depends on: 491446
Blocks: 500940
Priority: -- → P3
Target Milestone: --- → 5.0.8
Target Milestone: 5.0.8 → 5.0.9
Blocks: 504481
Blocks: 507212
Blocks: 507214
Assignee: buchanae → rdoherty
<3
::gulp::
Priority: P3 → P2
Attached image omg
If you just got into the office you might want to grab some more coffee before you open this.
That is my new wallpaper.
Blocks: 504393
Blocks: 511686
Target Milestone: 5.0.9 → 5.1
Attached patch Rough outline of plan (obsolete) — Splinter Review
Here's a small patch to show the direction I'm going. Would like feedback earlier rather than later so I don't have to rewrite it twice ;)
Attachment #395968 - Flags: review?(clouserw)
Attachment #395968 - Flags: review?(jbalogh)
Comment on attachment 395968 [details] [diff] [review] Rough outline of plan I think the plan looks good
Attachment #395968 - Flags: review?(clouserw) → review+
Attachment #395968 - Flags: review?(jbalogh) → review+
Comment on attachment 395968 [details] [diff] [review] Rough outline of plan I wish you good luck sir.
Blocks: 513075
Blocks: 513046
Target Milestone: 5.1 → 5.2
This is P1 for 5.2 as it will block another 5.2 P1.
Priority: P2 → P1
Blocks: 518705
Attached patch v1Splinter Review
PHP rewrite review commence! JS rewrite is for next week.
Attachment #395968 - Attachment is obsolete: true
Attachment #404390 - Flags: review?(clouserw)
Attachment #404390 - Flags: review?(jbalogh)
Comment on attachment 404390 [details] [diff] [review] v1 I think it's looking good. There are still some corner cases, but we can tweak it after the main classes have landed. Also, it would be nice to fix this while you are creating the methods: $buttonMessage = sprintf(___('Add to %1$s %2$s'), APP_PRETTYNAME, "%s");
Attachment #404390 - Flags: review?(clouserw) → review+
r52887 For QA: Install buttons can be tested now, backend code was re-written. I'll put together a list of where they are displayed.
(In reply to comment #11) > Also, it would be nice to fix this while you are creating the methods: > > $buttonMessage = sprintf(___('Add to %1$s %2$s'), APP_PRETTYNAME, "%s"); This involves changes to the JavaScript too, I'll make it part of my next patch.
Blocks: 494195
Ryan, so far, I think the changes are looking pretty good (haven't found anything obvious, anyway); how extensive is the JS rewrite, and what will it touch? Thanks!
The JS rewrite isn't as extensive as the PHP one, there is a lot less JS. But it will touch all button functions: * Platform detection (FF too old/new) * Experimental status (checkbox, etc) * Thunderbird/sunbird install instructions * Show/hide correct platform buttons Rewrite will probably finish friday.
Attached patch v2 (js)Splinter Review
Finally done (I hope)
Attachment #405815 - Flags: review?(clouserw)
Comment on attachment 405815 [details] [diff] [review] v2 (js) works well for me! Thanks. Can you add L10n comments for any strings with substitutions in them? I'd also like to see this die: > + $buttonMessage = sprintf(___('Add to %1$s %2$s'), $appName, "%s"); but I realize it was grandfathered in. We can do a separate bug if you don't get to it this time around.
Attachment #405815 - Flags: review?(clouserw) → review+
(In reply to comment #18) > > + $buttonMessage = sprintf(___('Add to %1$s %2$s'), $appName, "%s"); Oh, yeah. I took a look at that and wasn't sure how to fix it initially. I'm guessing this would be better? $buttonMessage = sprintf(___('Add to %1$s %%s'), $appName); In JS, the string is then sprintf'd again to add the platform name.
I think a switch/case. :-/ switch (appName): case 'firefox': sprintf(___(/* L10n: %s is a platform name. Example: Windows*/ 'Add to Firefox (%s)'), $platform); break; ... Substituting the platform like that isn't the best, but I think it works.
r53267 will spin off string fixes.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Keywords: push-needed
Attachment #404390 - Flags: review?(jbalogh)
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: