Google docs onebox gem requires a "published" document

(Alex Armstrong) #12

Apologies for repeating myself, but I’m getting quite a bit of flak about this from my community. The Google Docs onebox is kind of half-baked and I would very much like to be able to turn it off.

The only workaround I’ve found is to run the link along with the previous paragraph of text. (I.e., not putting it on a line of its own.) I found this by trial and error and I’m pretty techie. It’s not really feasible to instruct users We refer to Google Docs a lot, and I’ve gotten into the habit of editing people’s posts in this manner to prevent the onebox from appearing.

In any case, I think embedding the document is overkill and should be optional. I much prefer Slack’s approach:

An attractive link is sufficient. It’s a spreadsheet, after all. I’m not going to try and view it in a tiny window.

Google Spreadsheet only showing as link
(Jeff Atwood) #13

Just put a space in front of the link. Not sure how that’s too “techie” of a workaround, for now…

(Alex Armstrong) #14

Ah, the space is useful as well for me. I meant “techie” in the sense that my users (mostly academics and higher ed staff) generally don’t actively look for ways to thwart their technology. If they don’t like how something works they just put up with it and/or complain :smiley:

(Jeff Atwood) #15

I agree with this @techAPJ

Can you add that to your list? Embedding a full Google spreadsheet, doc, etc is kind of insane when you think about it…

(Sam Saffron) #16

Yeah, if anything it should be optional, opt-in. I would hold off for 1.7 though and just have it use the generic default onebox support (after mini onebox is built)

(Arpit Jalan) #17

Okay, this is now done.





Oneboxed Google Docs break scroll position
Google Sheet Embed post in topic always jumps to focus
Difficult to find way to open oneboxed google doc
(Dave McClure) #18

When the doc is not public, the title and contents can’t be pulled in by the onebox, so the click target is a lot less obvious. Here’s a screenshot of an example:

Perhaps that “title” should be rendered in bold blue text as “Google Sheets” or “Google Docs” or “Google Slides” when the title content can’t be retrieved?


(Arpit Jalan) #19

Yes, good point! I’ll make it so.

(Dave McClure) #20

While you’re at it, would it be possible to make the large icon clickable as well?

(Erlend Sogge Heggen) #21

Maybe private docs could also use the text field to have a note about that status? E.g. just put “Document is private” there.

(Arpit Jalan) #22

Done! :sunflower:

Discourse for Private Communities
(Alex Armstrong) #23

This is perfect, except for a minor quibble:

This works:

But this doesn’t:

Both are valid URLs as far as Google Docs is concerned.

(Jeff Atwood) #24

Sure @techapj can you have a look at that?

(Arpit Jalan) #25

Fixed via:

(Alex Armstrong) #26

FWIW, I find the summaries for public documents underneath the title to be overlong and redundant.

For Google Sheets in particular, the summary is confusing as it runs along the column headings with data.

Real-world example:

I don’t see this as useful at all.

I would love an option to turn the summaries off – or to turn them off entirely, unless there are stalwart fans of them.

(Sam Saffron) #27

Yeah it feels like there is other metadata that is far more interesting.

  • Creation date of the document
  • Last editor
  • Last edit

Perhaps we can pick that up instead?

(Arpit Jalan) #28

Accessing that data will require API credentials. Currently we are relying on OpenGraph data which provides title, type, description (summary), image (snippet).

(EW 👌) #29

I’m just started to try out the google docs onebox. The following link: ( is puplished and are able to access through the browser or from the onebox even. But still said as you could see below; “This Sheet is Private”.

(Andrew Shanahan) #30

Hmm, this has really screwed us over at we used embedded Google Spreadsheets as a way for guys to record their weights, the spreadsheet then calculated BMI, etc.

e.g. - how it used to work for us:

What it looks like now:

We also used them as a way of running tracking threads - e.g. guys who wanted to track days off booze, etc.

It wasn’t perfect (mobile users didn’t report great functionality) so it could have been improved but neither of those functions can be replicated by Discourse as standard, so to my mind, you’ve stripped away something without much thought about who might be using this function.

Is there any other way of doing this? Any suggestions?

(Rafael dos Santos Silva) #31

Create a custom plugin based on old onebox code.