tumblr / docs

Tumblr's public platform documentation.
Apache License 2.0
109 stars 27 forks source link

NPF Spec - TOC has a broken link to a missing section #16

Closed StillLynnTheCloset closed 4 years ago

StillLynnTheCloset commented 4 years ago

The Inline Format Type: Size section was removed in commit 340c9d9 however the table of contents still has a (now broken) link to that section.

Aside: Is the size type still on the roadmap to be implemented in the future?

nightpool commented 4 years ago

I know small formatting was added last week, but I believe it uses a different API structure then the commit you linked.

nightpool commented 4 years ago

Right now it seems like it's only available to internal API clients (is this intentional, @cyle?), but currently it looks like this:

{
  "content": [
    {
      "type": "text",
      "text": "this is a test of the small formatting",
      "formatting": [
        {
          "type": "small",
          "start": 0,
          "end": 38
        }
      ]
    }
  ]
}

(i got this by inspecting the dash for a small-formatted post—the post needs to use the <small> tag specifically, not <sub> or <sup>, which are also in common use in legacy posts)

cyle commented 4 years ago

Hello! A few things:

I'll close this issue once the docs are updated. Thanks!

cyle commented 4 years ago

Updated! https://github.com/tumblr/docs/blob/master/npf-spec.md#inline-format-types-bold-italic-strikethrough-small

Thanks again!

StillLynnTheCloset commented 4 years ago

Wow, I didn't expect to get a new feature turned on just by bringing up some broken formatting.

One question: What is the intended behavior of overlapping small formats?

The website doesn't seem to handle them consistently:

  1. When viewing a post on www.tumblr.com/blog/blogName, the size is only decreased once
  2. When viewing a post on blogname.tumblr.com, the size is decreased for every format

Although the HTML has a bunch of nested <small> tags on both pages, so maybe this is just a CSS bug on www.tumblr.com/blog/blogName?

cyle commented 4 years ago

One question: What is the intended behavior of overlapping small formats?

The intended behavior is for all of them to be the same small size, so you could overlap several small inline formatting ranges but they will all be the same size when rendered inside of Tumblr. The behavior on www.tumblr.com is what's intended; the handling in the blog theme, however, is likely a bug. Thanks for pointing it out!