Button styles suddenly changed?

178 views
Skip to first unread message

Ajay Goel

unread,
Feb 15, 2018, 12:21:37 AM2/15/18
to InboxSDK
Hi guys,

Suddenly when I reloaded my extensions today, my buttons look and feel had completely changed (not for the better).

I've been digging in to see why. I had an old Gmail window open, and a new one open, and it seems that the CSS for the InboxSDK library changed today.

On left is old styles.

On right is new styles.


Was this change intentional? Any chance you'll put it back the way it was?

Thanks,
Ajay

Aleem Mawani

unread,
Feb 15, 2018, 1:38:48 AM2/15/18
to Ajay Goel, InboxSDK
Can you show us screenshots of how this is rendering for you?

--
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/67c8bf1f-5272-4797-968a-f2b301ffd39b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ajay Goel

unread,
Feb 15, 2018, 1:47:48 AM2/15/18
to InboxSDK
Yes, here it is:


Before, it looked like:


I've been tinkering with the CSS for the last couple hours trying to get it to look normal again. I think I have it figured out. I'm now adding this code right at the end of the registerMessageViewHandler:

            var elements = document.querySelectorAll('.inboxsdk__compose_sendButton');

            for (var i = 0; i < elements.length; i++) {

                //elements[i].style.removeProperty('background-color');

                elements[i].style.backgroundColor = "transparent";

                elements[i].style.paddingLeft = "0px";

                elements[i].style.paddingRight = "6px";

                elements[i].style.backgroundImage = "none";

                elements[i].style.borderColor = "transparent";


            }


I now have it looking even slightly better than it looked before, so I think I'm okay now, but it was a surprise tonight when I reloaded Gmail to find my button looking so odd.

On Thursday, February 15, 2018 at 12:38:48 AM UTC-6, Aleem Mawani wrote:
Can you show us screenshots of how this is rendering for you?
On Wed, Feb 14, 2018 at 9:21 PM, Ajay Goel <aj...@wordzen.com> wrote:
Hi guys,

Suddenly when I reloaded my extensions today, my buttons look and feel had completely changed (not for the better).

I've been digging in to see why. I had an old Gmail window open, and a new one open, and it seems that the CSS for the InboxSDK library changed today.

On left is old styles.

On right is new styles.


Was this change intentional? Any chance you'll put it back the way it was?

Thanks,
Ajay

--
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.

Ajay Goel

unread,
Feb 15, 2018, 1:55:26 AM2/15/18
to InboxSDK
Below, I meant to say registerComposeViewHandler, not registerMessageViewHandler.

Aleem Mawani

unread,
Feb 15, 2018, 1:59:17 AM2/15/18
to Ajay Goel, InboxSDK
Looks like you're overriding styles provided by the SDK. We don't recommend mucking with the styles or DOM that the SDK provides - mostly for this reason. The SDK needs to be able to make changes, usually in response to Gmail (as is the case here) so depending on certain styles or DOM the SDK provides can break your app. 

If you remove your custom styling, it should look correct.

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/1a6fec5b-3e40-4c8e-8ef3-ba16dbed4e8f%40googlegroups.com.

Ajay Goel

unread,
Feb 15, 2018, 2:05:38 AM2/15/18
to InboxSDK
Yes, you are correct, and I totally understand what you're saying. I'm using the iconClass attribute to set my class, and my class does some non-standard things like adding a background image and setting the width of the button. I know this kind of styling goes against the best practices -- but I started doing this early on when I launched the extension and now I don't want to change the look suddenly on all our users.

Anyway, thanks for your fast response -- and I'm going to see if I can create a similar look without mucking with the styles!

René Dang

unread,
Feb 19, 2018, 5:12:04 AM2/19/18
to InboxSDK
I had a similar issue. Same style bug. For mew also another problem occured, which was that the text attribute od the addButton method was ignored. The html text content wasn't set anymore for type 'SEND_ACTION'. I even tried the code example of InboxSDK, same error.

Aleem Mawani

unread,
Feb 19, 2018, 1:38:11 PM2/19/18
to René Dang, InboxSDK
That looks like a bug, we'll fix that soon.

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/0550860e-5f0b-48f5-a328-e85355f22eed%40googlegroups.com.

Chaïb Martinez

unread,
Feb 22, 2018, 8:33:57 AM2/22/18
to InboxSDK
Same for me/

The text attribute of the addButton method is not working since the last update :(

Omar Ismail

unread,
Feb 23, 2018, 9:38:09 PM2/23/18
to Chaïb Martinez, InboxSDK
The text property is now being respected again. However this is an undocumented feature and will go away in the future. Please update your code accordingly.

--
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.
Reply all
Reply to author
Forward
0 new messages