Skip to content

NPF indent_level – a no longer supported feature? #115

Open
@James-Ansley

Description

I have been making my own client (tumblrdotcom) and have noticed posts with any non-zero indent_level do not render correctly when posted. I have also noticed that even if I manually construct a post in the tumblr UI with any indented blocks, they do not render correctly and sometimes break the editor. Is this feature no longer supported?

For example, using the API to post the following content taken from the text block subtype docs:

{"content": [{"type": "text",
              "text": "Sward's Shopping List",
              "subtype": "heading1"},
             {"type": "text",
              "text": "First level: Fruit",
              "subtype": "ordered-list-item"},
             {"type": "text",
              "text": "Second level: Apples",
              "subtype": "unordered-list-item",
              "indent_level": 1},
             {"type": "text",
              "text": "Third level: Green",
              "subtype": "ordered-list-item",
              "indent_level": 2},
             {"type": "text",
              "text": "Second level: Pears",
              "subtype": "unordered-list-item",
              "indent_level": 1},
             {"type": "text",
              "text": "First level: Vegetables",
              "subtype": "ordered-list-item"}],
 "layout": [{"type": "rows",
             "display": [{"blocks": [0]},
                         {"blocks": [1]},
                         {"blocks": [2]},
                         {"blocks": [3]},
                         {"blocks": [4]},
                         {"blocks": [5]}]}],
 "tags": ""}

Will post successfully:

{
    "meta": {"msg": "Created", "status": 201},
    "response": {
        "display_text": "Posted to tinygamebot",
        "id": "726856993513652224",
        "state": "published"
    }
}

When I get this post, again with the API, the indent levels are in the received NPF content as above.
However, the post does not render correctly:

image

Unless it is being edited (however, it seems to get confused between ordered and unordered lists):

image

Another example using the Tumblr UI, again taken from the docs:

image

Produces the same output:

image

Again, unless in edit mode. When getting this post with the API, it still has the indent levels as above.

This actually breaks the editor in some cases, such as lists inside of blockquotes.

All this is to ask, is the indent_level a no longer supported feature for Tumblr posts, or is this a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions