google apps script loading spinner

4,485 views
Skip to first unread message

Nicholas Blexrud

unread,
Jan 28, 2016, 7:08:41 PM1/28/16
to google-analytics-spreadsheet-add-on
Hi,

Wonderful add-on! I'm working on an add-on myself and I can't - for the life me - figure out how you a triggering the loading spinner that slides up after you click 'Create Reports'. 

What I've tried:
  • inspected the source of the iframe
  • read and re-read the Class SpreadsheetApp, Class HTMLService
It appears to be happening server-side, but I don't see any public API methods that would add this lovely functionality. 

When inspecting the element in dev tools:

  var bar = document.querySelector('.docs-working-bar');

//adds spinner
bar.setAttribute('class', 'docs-working-bar docs-working-bar-display docs-working-bar-slideup');

//removes spinner
bar.setAttribute('class', 'docs-working-bar docs-working-bar-display docs-working-bar-callback');

Can you shed any light on how you're displaying and removing the spinner?

Thanks!
Nick

Nicholas Blexrud

unread,
Jan 28, 2016, 7:11:04 PM1/28/16
to google-analytics-spreadsheet-add-on


Philip Walton

unread,
Jan 28, 2016, 7:38:58 PM1/28/16
to Nicholas Blexrud, google-analytics-spreadsheet-add-on
I'm not doing anything, Sheets is hiding and showing this itself.

On Thu, Jan 28, 2016 at 4:11 PM, Nicholas Blexrud <nichola...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "google-analytics-spreadsheet-add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-spread...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-spreadsheet-add-on/a766b5da-f400-49ad-b3bd-2eec6b1e1565%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nicholas Blexrud

unread,
Jan 28, 2016, 8:55:14 PM1/28/16
to Philip Walton, google-analytics-spreadsheet-add-on
Thanks for the reply. I've just tested my script as an "add-on" and now my script is showing the spinner. If I don't test as addon, then I just seeing the yellow bar at the top that says "Running script". So it must be Sheets way of prettifying status.
Reply all
Reply to author
Forward
0 new messages