Question about SidePanel

397 views
Skip to first unread message

Pavel Aronovich

unread,
Jun 7, 2023, 1:39:37 PM6/7/23
to Chromium Extensions
Hi,

I expected my sidePanel to open immediately when calling chrome.sidePanel.setOptions (tabId, ..., enabled: true) and only on this tab. But I have to open it explicitly and also choose my extension from the list. This is extremely inconvenient. And at the same time, the  sidePanel remains open on other tabs! But why is that?I would like the sidebar to open automatically from the code and immediately with the page I need, while it is not needed on other tabs. What use case did the developers envisage?

Thanks.

Message has been deleted

Oliver Dunk

unread,
Jun 12, 2023, 7:35:54 AM6/12/23
to Howard Abrams, Chromium Extensions, Pavel Aronovich
Hi both,

Pavel - do you have the side_panel.default_panel key set in your manifest? If so, I'd suggest removing this - that will prevent your extension from showing on other tabs by default. Assuming you've already removed that, what you may be hitting is the fact that when the side panel is manually opened it opens across all tabs. Things behave slightly differently if the action icon is applicable and you use that instead: https://developer.chrome.com/docs/extensions/reference/sidePanel/#open-action-icon

We are doing some early experiments around a sidePanel.open API and if we ship that (which may or may not happen) then that would provide some additional flexibility here: https://bugs.chromium.org/p/chromium/issues/detail?id=1446022

I think that helps with your situation too Howard :)
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


On Mon, Jun 12, 2023 at 12:28 PM Howard Abrams <howard...@devfactory.com> wrote:
I have a very similar problem.

I'd like to open my sidePanel when choosing a menu item (e.g. "settings") or from a deep link (protocol handler).  I tried chrome.sidePanel.setOptions, but as Pavel points out, it doesn't actually open the sidePanel. Ideally there would be a way to open the sidePanel across all tabs, just like when clicking action toolbar icon, but I'd settle for only a specific tab. At least in this case, I don't want to close the panel on other tabs.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/8629c3b3-5e04-4d99-996a-5b00eaf52307n%40chromium.org.

Pavel Aronovich

unread,
Jun 12, 2023, 9:23:26 AM6/12/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Pavel Aronovich, Howard Abrams
Hi Oliver.

Thank you.

sidePanel.open API: Yes, I think this is what we need. 

I would not like to ask the user for actions to open the sidePanel.

понедельник, 12 июня 2023 г. в 14:35:54 UTC+3, Oliver Dunk:

Robbi

unread,
Aug 11, 2023, 3:03:55 PM8/11/23
to Chromium Extensions, Pavel Aronovich, Oliver Dunk, Chromium Extensions, Howard Abrams
I apologize if I join a discussion that may be a little dated.
Question: Is it possible to make the sidePanel page (set with chrome.sidePanel.setOptions) active when the user opens this panel?
It would seem that page is always the last among the various choices of the combobox and to make it active user always have to select it manually.
TIA
Reply all
Reply to author
Forward
0 new messages