tumblr / docs

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

exclude_trail_items can't be applied post-reblog #57

Closed AprilSylph closed 3 years ago

AprilSylph commented 3 years ago

It appears that the exclude_trail_items reblog parameter can only be used when reblogging a post directly, and not when editing an existing reblog. Is this intentional, and/or can it be changed?

I'm trying to build a feature which allows users to "trim" all but the last trail item from a post, since this is an oft-requested feature from roleplayers. Currently they enjoy "trimming" and adding content at the same time via a hack to the legacy post editor (where it works), but I'm trying to make something more robust which simply allows deleting trail items after the content has been added. It would be a lot more work to have to instead build a new reblog interface for these users, so being able to apply exclude_trail_items to existing reblogs would be very helpful.

I'm opening this issue here since the documentation for editing a post states:

For editing a post, all of the request parameters from the NPF Post Creation route are expected (depending on if it's an original post or reblog), along with the Post's ID in the query path.

But this is evidently not true, since reblog-specific parameters are completely ignored.

I'm definitely not complaining that reblogs can be edited without providing parent_tumblelog_uuid, parent_post_id, or reblog_key again, though; if allowing exclude_trail_items to be accepted by an existing post would mean also requiring the reblog-specific parameters, I wouldn't accept the trade-off.

nightpool commented 3 years ago

Would "reblog first and trim second" be an acceptable UX for long threads though? Wouldn't users see the un-trimmed thread on their dashboard if they happened to refresh at the right time?

On Wed, Aug 25, 2021 at 8:09 AM April Sylph @.***> wrote:

It appears that the exclude_trail_items reblog parameter https://github.com/tumblr/docs/blob/master/api.md#request-parameters-19 can only be used when reblogging a post directly, and not when editing an existing reblog. Is this intentional, and/or can it be changed?

I'm trying to build a feature which allows users to "trim" all but the last trail item from a post, since this is an oft-requested feature from roleplayers. Currently they enjoy "trimming" and adding content at the same time via a hack to the legacy post editor (where it works), but I'm trying to make something more robust which simply allows deleting trail items after the content has been added. It would be a lot more work to have to instead build a new reblog interface for these users, so being able to apply exclude_trail_items to existing reblogs would be very helpful.

I'm opening this issue here since the documentation for editing a post https://github.com/tumblr/docs/blob/master/api.md#postspost-id---editing-a-post-neue-post-format states:

For editing a post, all of the request parameters from the NPF Post Creation route are expected (depending on if it's an original post or reblog), along with the Post's ID in the query path.

But this is evidently not true, since reblog-specific parameters are completely ignored.

I'm definitely not complaining that reblogs can be edited without providing parent_tumblelog_uuid, parent_post_id, or reblog_key again, though; if allowing exclude_trail_items to be accepted by an existing post would mean also requiring the reblog-specific parameters, I wouldn't accept the trade-off.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tumblr/docs/issues/57, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZCV4LB2LB7O3UY2XL6C3T6TMQXANCNFSM5CY5QEBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

AprilSylph commented 3 years ago

I think it would be more acceptable than whatever subpar reblog interface I could create alone, or the outright inability to delete trail items from certain posts (as it is currently).

cyle commented 3 years ago

Great question, sorry for it being unclear in the docs. This is indeed intentional right now. Once a reblog post is created (even drafted), the only thing that should be edit-able is your content within the reblog trail, not the composition of the reblog trail itself. This is a product decision, not a technical one; @nightpool 's assertion is along the lines of what we're trying to prevent here.

I think we'd be willing to change this behavior for editing a drafted reblog, but not one already published and in peoples' dashboards. I'll discuss with the team though, and I appreciate that it may seem like a weird inconsistency.

cyle commented 3 years ago

We'll be updating the NPF edit endpoint to include the ability to set exclude_trail_items and trim the reblog trail after it's been published. 👌

I'll close this out once that's deployed and the API docs are updated!

cyle commented 3 years ago

exclude_trail_items should now work when editing reblogs, I left a note in the docs about how it only operates on what's in the reblog trail being edited -- it can't magically bring back trail items if ones had already been removed.