Re: [blink-dev] Best practices for informative DevTools console message - links?

11 views
Skip to first unread message

Charles Harrison

unread,
May 23, 2018, 2:13:56 PM5/23/18
to Łukasz Anforowicz, blink-dev, Charlie Reis, platform-predictability
Usually we have a short message which links to the relevant feature on chromestatus.com, which can be updated without binary changes.  +platform-predictability  will have the most accurate advice though :)

On Wed, May 23, 2018 at 12:11 PM Łukasz Anforowicz <luk...@chromium.org> wrote:
Hello,

Are there best practices for a good, informative DevTools console message?  In particular - what is the recommendation for linking to documents containing more information?
  • What are the best practices for ensuring the link will remain operational as long as needed (e.g. how to ensure the link used in the console message is resilient to moving the document to another location)?
  • Is using a URL shortener okay (and which one)?
  • Is it possible and okay to use mark-up (e.g. <a href="...">...</a>) in the console message?

Context: I am considering tweaking the CORB console messages (see https://crrev.com/c/1069344).  I have a draft of a document containing more information here (although I am still debating moving the contents to either a new section in the CORB explainer or one of chromium.org site pages).

Thanks,

Lukasz

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/15dcc842-1834-436a-bd03-b6d4134e6282%40chromium.org.

Philip Jägenstedt

unread,
May 23, 2018, 4:53:48 PM5/23/18
to Charles Harrison, Łukasz Anforowicz, blink-dev, cr...@chromium.org, platform-predictability
In https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/frame/deprecation.cc you can find some console message that have been discussed a lot, if nothing else. URL shorteners are used, always goo.gl it seems.

I think it's technically possible to have formatted console messages, but have no idea how to do it from within blink.

You received this message because you are subscribed to the Google Groups "platform-predictability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-predicta...@chromium.org.
To post to this group, send email to platform-pr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-predictability/CADjAqN4jW_w45ZEnY%2BBzrynGmjZ85m8L6Yh8NuWezSOMx94iCg%40mail.gmail.com.

Ian Clelland

unread,
May 25, 2018, 10:26:19 AM5/25/18
to luk...@chromium.org, cshar...@chromium.org, blink-dev, cr...@chromium.org, platform-predictability, Philip Jägenstedt
On Wed, May 23, 2018 at 4:53 PM 'Philip Jägenstedt' via platform-predictability <platform-pr...@chromium.org> wrote:
In https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/frame/deprecation.cc you can find some console message that have been discussed a lot, if nothing else. URL shorteners are used, always goo.gl it seems.

I think it's technically possible to have formatted console messages, but have no idea how to do it from within blink.

In JavaScript, you can do something like 

console.log("This is normal text %cThis is styled text", "font-size: 24px; color: blue;");

and that will apply style to the text after the "%c" marker. None of the blink APIs support creating a console message with multiple arguments, though, as far as I can tell.

On the other hand, recognized URLs in console messages will be automatically linked by the developer tools UI, so if all you want is to wrap a URL in <a href="..."></a>, there's no need to do anything special.

 

On Wed, May 23, 2018 at 8:13 PM Charles Harrison <cshar...@chromium.org> wrote:
Usually we have a short message which links to the relevant feature on chromestatus.com, which can be updated without binary changes.  +platform-predictability  will have the most accurate advice though :)

On Wed, May 23, 2018 at 12:11 PM Łukasz Anforowicz <luk...@chromium.org> wrote:
Hello,

Are there best practices for a good, informative DevTools console message?  In particular - what is the recommendation for linking to documents containing more information?
  • What are the best practices for ensuring the link will remain operational as long as needed (e.g. how to ensure the link used in the console message is resilient to moving the document to another location)?
  • Is using a URL shortener okay (and which one)?
  • Is it possible and okay to use mark-up (e.g. <a href="...">...</a>) in the console message?

Context: I am considering tweaking the CORB console messages (see https://crrev.com/c/1069344).  I have a draft of a document containing more information here (although I am still debating moving the contents to either a new section in the CORB explainer or one of chromium.org site pages).

Thanks,

Lukasz

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/15dcc842-1834-436a-bd03-b6d4134e6282%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "platform-predictability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-predicta...@chromium.org.
To post to this group, send email to platform-pr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-predictability/CADjAqN4jW_w45ZEnY%2BBzrynGmjZ85m8L6Yh8NuWezSOMx94iCg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "platform-predictability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-predicta...@chromium.org.
To post to this group, send email to platform-pr...@chromium.org.

PhistucK

unread,
May 25, 2018, 11:05:32 AM5/25/18
to Ian Clelland, Łukasz Anforowicz, Charles, blink-dev, Charlie Reis, platform-predictability, Philip Jägenstedt
I do not recommend creating new goo.gl URLs. I created one yesterday and it was flagged as spam. Also, the service is being turned down (but the URLs should work indefinitely).

PhistucK


Fat Kei Wong

unread,
May 25, 2018, 12:49:47 PM5/25/18
to PhistucK, Ian Clelland, Łukasz Anforowicz, Charles, blink-dev, Charlie Reis, platform-predictability, Philip Jägenstedt


從我的 iPhone 傳送
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABc02_LYxFLhJQ9%3D1y_-z%3DCbv_xAFZ45pDUen%3D4svPTHQo2zmg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages