Multiple extensions using InboxSDK & sidebar content panels

575 views
Skip to first unread message

Tibi Neagu

unread,
Jul 20, 2017, 10:31:16 AM7/20/17
to InboxSDK
Is there any way to determine how many content panels have been attached to the current threadView's sidebar?

My app is adding its own content panel but I'd like it to behave differently if it detects there are other content panels in the same sidebar.

While I can keep track of the ContentPanelViews that my own extension creates, other extensions share the same "container" and it makes handling the "single panel" use case a bit more difficult.

It would also be great to be able to subscribe to an event whenever a new content panel was added, which will basically change the layout of the sidebar.

Thanks!

Aleem Mawani

unread,
Jul 20, 2017, 11:29:44 AM7/20/17
to Tibi Neagu, InboxSDK
What do you want to do differently if there are other sidebars?

We've explicitly designed for the multiple apps having multiple sidebars use case to maximize users choice and configurability.

--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/ac715142-67fa-4cbc-bbcf-d0367acf17b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tibi Neagu

unread,
Jul 20, 2017, 11:34:03 AM7/20/17
to InboxSDK, tibi....@gmail.com
Hi Aleem,

I've been reading through the documentation and one of the big flaws I've found with the InboxSDK sidebar is that it isn't "sticky" (i.e. it doesn't scroll with you as you scroll down the page).

So if you have a long thread and you scroll down a lot, the contextual information that could be shown in the sidebar is lost.

If my content panel is the only one in the sidebar, I can "manually" make it sticky using position: fixed; I've gotten this to work, but the use-case breaks (UX-wise) if there are multiple content panels in the sidebar.



On Thursday, July 20, 2017 at 4:29:44 PM UTC+1, Aleem Mawani wrote:
What do you want to do differently if there are other sidebars?

We've explicitly designed for the multiple apps having multiple sidebars use case to maximize users choice and configurability.
On Thu, Jul 20, 2017 at 7:31 AM, Tibi Neagu <tibi....@gmail.com> wrote:
Is there any way to determine how many content panels have been attached to the current threadView's sidebar?

My app is adding its own content panel but I'd like it to behave differently if it detects there are other content panels in the same sidebar.

While I can keep track of the ContentPanelViews that my own extension creates, other extensions share the same "container" and it makes handling the "single panel" use case a bit more difficult.

It would also be great to be able to subscribe to an event whenever a new content panel was added, which will basically change the layout of the sidebar.

Thanks!

--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+u...@googlegroups.com.

Aleem Mawani

unread,
Jul 20, 2017, 11:45:59 AM7/20/17
to Tibi Neagu, InboxSDK
This behaviour that you're describing will change soon. There are some changes to Gmail that the SDK will accomodate for that will necessitate this change. My suggestion is to wait a month or two.

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/87fdc504-de51-4dc6-ba39-b53d58e3f4b1%40googlegroups.com.

Tibi Neagu

unread,
Jul 20, 2017, 12:10:49 PM7/20/17
to InboxSDK, tibi....@gmail.com
Thanks for replying so soon :)

Just wondering... is there nothing that can be done in the mean time? We've built a prototype of our extension and there are a lot of use cases where it seems like there's no content in the sidebar because it's all the way up in the scrolled content.

I've noticed that extensions such as FullContact (which probably don't use InboxSDK) inject their own div in the page and use a different approach with a toggle button that somehow hacks the InboxSDK sidebar to not display and shows theirs instead.

I'm partial to InboxSDK though because of how well it integrates with gmail and its resilience to breaking changes in google's DOM.

Aleem Mawani

unread,
Jul 20, 2017, 12:39:31 PM7/20/17
to Tibi Neagu, InboxSDK

We could do something in the short term but in all honesty we are devoting a ton of resources to upcoming Gmail changes that will render this problem moot. We just don't think it's worth solving this short term use case.

We appreciate the feedback and agree that it's important, it's just going to be solved in a much better way. Sorry I can't talk more about it.


Tibi Neagu

unread,
Jul 20, 2017, 12:42:22 PM7/20/17
to InboxSDK, tibi....@gmail.com
That's alright, thank you for clearing this up for me, and thanks for the awesome job you're doing!

Matt McCallum

unread,
Dec 27, 2017, 4:20:56 PM12/27/17
to InboxSDK
Has been 6 months.  Any movement on this?

-Matt

Omar Ismail

unread,
Dec 27, 2017, 5:37:27 PM12/27/17
to Matt McCallum, InboxSDK
Yes, the sidebar is now "sticky" after Gmail launched their add-ons.

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/bc265334-998c-4843-92c5-1cb24184a992%40googlegroups.com.

Matt McCallum

unread,
Dec 27, 2017, 10:21:26 PM12/27/17
to InboxSDK
I'm not seeing the "sticky-ness".  When a sidebar is added on a long message thread, the sidebar content scrolls up and out of view as you scroll down the thread.  Is there maybe a property that controls this that has not be added to the api reference?

Thanks!
-Matt

Matt McCallum

unread,
Jan 5, 2018, 2:12:33 PM1/5/18
to InboxSDK
Or even a working example might be helpful.  :)

Thanks much!
-Matt

Matt McCallum

unread,
Jan 10, 2018, 6:26:46 PM1/10/18
to InboxSDK
Could really use some direction here.  Omar said panels are now sticky, but I'm not seeing it.  Can anyone confirm this with a working example?

Thanks!
-Matt 

Omar Ismail

unread,
Jan 10, 2018, 9:36:21 PM1/10/18
to Matt McCallum, InboxSDK
Can you try adding one of the Gmail addons and see if the sidebar behavior changes for you, just as an experiment.

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/d4c0509b-8c05-45af-85e5-f66818046db3%40googlegroups.com.

Matt McCallum

unread,
Jan 11, 2018, 3:43:29 PM1/11/18
to InboxSDK
I installed the quickbooks addon and it is 'sticky'.  When I then enable and bring up my sidebar, it scrolls.  When I show both of them at the same time, the quickbooks one is 'sticky' while mine scrolls.

-Matt

Omar Ismail

unread,
Jan 11, 2018, 3:46:40 PM1/11/18
to Matt McCallum, InboxSDK
When you show both of them at the same time? That shouldn't be possible. Are you using the SDK methods? Can you send a code sample and screenshot?

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/719700ab-7bd3-4fbf-84c4-c8f7dc54611a%40googlegroups.com.

Matt McCallum

unread,
Jan 11, 2018, 4:51:43 PM1/11/18
to InboxSDK
InboxSDK.load(1, 'sdk_xxxxxxxxxxxxx_xxxxxxxx').then(function(sdk){

sdk.Conversations.registerThreadViewHandler(function(threadView) {

const leadSidebar = document.createElement('div');
leadSidebar.setAttribute('id', 'leadSidebar');

var createLeadSidebarPanel = threadView.addSidebarContentPanel({
el: leadSidebar,
title: 'Lead',
orderHint: 99999,
hideTitleBar: false
});
$.get(chrome.extension.getURL('templates/leadSidebar.html'), function(leadSidebarContent) {
$('#leadSidebar').html(leadSidebarContent);
});
});

});




template.html is just a div with text in between. 

And screenshot:



-Matt

Omar Ismail

unread,
Jan 11, 2018, 5:02:33 PM1/11/18
to Matt McCallum, InboxSDK
in that screenshot there's no quickbooks add-on. I'd like to see what it looks like with the quickbooks addon

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/76dc9562-f774-4cdb-a3e9-b9f413a5e5f0%40googlegroups.com.

Matt McCallum

unread,
Jan 11, 2018, 5:14:35 PM1/11/18
to InboxSDK

Matt McCallum

unread,
Jan 12, 2018, 3:36:59 PM1/12/18
to InboxSDK
Omar, 

Did you get this screenshot?

-Matt

Matt McCallum

unread,
Jan 16, 2018, 4:01:39 PM1/16/18
to InboxSDK
??

Matt McCallum

unread,
Jan 19, 2018, 8:53:27 PM1/19/18
to InboxSDK
Still waiting patiently for an answer....

-Matt  

Matt McCallum

unread,
Jan 24, 2018, 6:08:13 PM1/24/18
to InboxSDK
Omar?  Anyone?

Omar Ismail

unread,
Jan 25, 2018, 7:07:41 PM1/25/18
to Matt McCallum, InboxSDK
sorry this got missed. 

Both the sidebar and addons should not be showing up at the same time, so something is going wrong. Can you send over the full list of extensions you have installed? And can you send over the relevant pieces of code from your extension that adds the sidebar?

To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/44eb0574-18b3-4aa9-8e50-95b9f98777a4%40googlegroups.com.

Omar Ismail

unread,
Jan 29, 2018, 5:11:54 PM1/29/18
to Matt McCallum, InboxSDK
hey Matt, really sorry about this, but this issue should now be fixed. The reason why I wasn't seeing what you were seeing is that the new sidebar behavior was behind a flag that was turned on me for and I forgot about that. The new behavior is turned on for everyone, so you should get the new behavior and your problem should be resolved.

Refresh gmail to get the latest version of the SDK and let me know if you run into any more problems.

Matt McCallum

unread,
Jan 29, 2018, 6:02:52 PM1/29/18
to InboxSDK
Thanks!  See, I wasn't crazy.  :)  Working now.  I expect a few people to show up here now and complain because the interface for sidebars changed.  :p

-Matt
Reply all
Reply to author
Forward
0 new messages