Closed Bug 668976 Opened 13 years ago Closed 10 years ago

Active "Add to Firefox" button needs CSS class "active" for the multiple platform case

Categories

(addons.mozilla.org Graveyard :: Discovery Pane, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

()

Details

If an add-on has different XPI files for different platforms all buttons will be included but only one is shown. Right now it's really hard to figure out which of those buttons is visible. The only way is to use getComputedStyle. We want to use querySelector with a simple CSS definition like ".install-button a.active". Please add the "active" class to the link element.
We don't do this in JS on purpose. It's slower and unnecessary. Why don't you use the query selector we're using to make a button visible or use something like jquery's :visible?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
(In reply to comment #1) > Why don't you use the query selector we're using to make a button visible or > use something like jquery's :visible? Which query selector are you using? Would be nice if you could also tell us the details. I'm not sure about which code you are referring to. We don't use jQuery with Mozmill. I reopen the bug until we have found a solution for the reported issue.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
We don't use JQuery with Mozmill. Jeff, can you please tell us if there is any other way to determine the button's visibility?
Flags: needinfo?(mozilla)
(In reply to Daniela Petrovici from comment #3) > We don't use JQuery with Mozmill. > > Jeff, can you please tell us if there is any other way to determine the > button's visibility? `getNode().visibility`?
Flags: needinfo?(mozilla)
That won't work since all the buttons have visibility set to visible so we can't differentiate between them based on visibility CSS property. Also getNode().hidden returns false for all these buttons.
Is there any chance of adding a simple class to the active button as suggested in comment 0? It would simplify our locator and make our tests much more robust. As mentioned, Mozmill does not use JQuery, so we can't use :visible. If not, do you have any other suggestions for how we might locate the appropriate button? We're currently looking at picking the first one where display is not none, but this doesn't feel robust enough for me, as some are hidden by parent elements.
Thanks for filing this. Due to resource constraints we are closing bugs which we won't realistically be able to fix. If you have a patch that applies to this bug please reopen. For more info see http://micropipes.com/blog/2014/09/24/the-great-add-on-bug-triage/
Status: REOPENED → RESOLVED
Closed: 13 years ago10 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.