Closed
Bug 1417238
Opened 7 years ago
Closed 5 years ago
"Open Link in New Container Tab" submenu active but empty when there are no containers
Categories
(Firefox :: Menus, defect, P3)
Tracking
()
VERIFIED
FIXED
Firefox 70
Tracking | Status | |
---|---|---|
firefox70 | --- | verified |
People
(Reporter: 08xjcec48, Assigned: Gijs)
Details
(Whiteboard: [testday-20190719])
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171112125346 Steps to reproduce: - Go to about:preferences#containers and delete all containers - Open example.org - Right-click on the link Actual results: "Open Link in New Container Tab" is visible and not greyed-out, even though it has no purpose with no sub-entries. Expected results: When there are currently no containers, the ""Open Link in New Container Tab" entry in the link context menu should be greyed-out, or it should offer the option to create a new container, or show a link to "Manage containers" (about:preferences#containers).
Comment 1•7 years ago
|
||
Please report the issue to https://github.com/mozilla/multi-account-containers/issues Thank you!
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Comment 2•7 years ago
|
||
This is a platform-level bug - not an issue with the add-on.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INCOMPLETE → ---
Comment 3•6 years ago
|
||
I'm thinking at two possible components for this issue: one is Core::XP Toolkit/Widgets: Menus and the other one is Firefox:: Menus. Since Containers is an add-on, I'm thinking this may not be a Core issue, but more like a Firefox issue. I'm going to move this to Firefox:: Menus for now, please correct me if I'm wrong.
Component: Untriaged → Menus
Comment 4•6 years ago
|
||
Jonathan, is this something you would be interested in?
Flags: needinfo?(jkt)
Comment hidden (mozreview-request) |
Comment 6•6 years ago
|
||
I'm not sure if it is a good idea to measure the number of containers when a context menu opens but we shall see if there are any issues in try I guess. I would actually prefer just to show a "No containers available" or even "Add a container" linking to the about:preferences in this case.
Flags: needinfo?(jkt)
Assignee | ||
Comment 7•6 years ago
|
||
mozreview-review |
Comment on attachment 8938889 [details] Bug 1417238 - Hide container context menu when there are no items to display. https://reviewboard.mozilla.org/r/209364/#review215170 ::: browser/base/content/nsContextMenu.js:358 (Diff revision 1) > } > > var shouldShow = this.onSaveableLink || isMailtoInternal || this.onPlainTextLink; > var isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window); > - var showContainers = Services.prefs.getBoolPref("privacy.userContext.enabled"); > + var showContainers = Services.prefs.getBoolPref("privacy.userContext.enabled") > + && ContextualIdentityService.getPublicIdentities().length; Here and in the test, please use trailing instead of leading operators (ie move `&&` to the end of the previous line), as this is convention in our codebase and also earlier in this method. We already go over 80ch per line within only a few lines of context, so I'm not so worried about that - though we might as well make the pref a lazy getter here...
Attachment #8938889 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•6 years ago
|
Assignee: nobody → jkt
Status: REOPENED → ASSIGNED
Priority: -- → P1
Comment 8•6 years ago
|
||
I think this can be done as part of this work.
> Remove sub menu when there's only one container
> The links context menu "open in new container tab" is a droplist, but when there's only one entry it's pointless, we could save one click.
I also don't think the priority needs to be this high.
Priority: P1 → P3
Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/d14daa02fb88 hide 'open link in container' menu when there are no containers, r=jkt
Assignee | ||
Updated•5 years ago
|
Assignee: jkt → gijskruitbosch+bugs
Comment 11•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago → 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Comment 12•5 years ago
|
||
I have reproduced this bug with Nightly 59.0a1 (2017-11-14) on Windows 10 , 64 Bit !
This bug's fix is Verified with latest Nightly 70.0a1 !
Build ID :--- 20190720095435
User Agent:--- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Whiteboard: [testday-20190719]
Comment 13•5 years ago
|
||
Thank you Sajedul for helping with the verification of this issue!
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•