new-xkit / XKit

Fork of XKit, the extension framework for Tumblr
https://new-xkit-extension.tumblr.com
Other
459 stars 135 forks source link

XKit.interface.get_posts returns the post being edited in the post window #676

Open finagle29 opened 8 years ago

finagle29 commented 8 years ago

This causes things like this to happen screen shot 2015-10-25 at 7 21 10 pm when RDO is enabled and ER is not (test post http://120983019283-testing.tumblr.com/post/131826469124/teen-stanley-b3-and-stanford-c3-hugging-if).

0xazure commented 8 years ago

I'm not sure I understand the bug, or the screenshot. XKit.interface.get_posts() returns all posts without a given CSS class. What is the behaviour you're expecting?

nightpool commented 8 years ago

@0xazure it shouldn't return the post edit window. there's a different function for that.

edit windows aren't posts in the way people using post_listener are expecting

On Thu, Nov 5, 2015 at 2:05 PM 0xazure notifications@github.com wrote:

I'm not sure I understand the bug, or the screenshot. XKit.interface.get_posts() returns all posts not containing a given CSS class. What is the behaviour you're expecting?

— Reply to this email directly or view it on GitHub https://github.com/new-xkit/XKit/issues/676#issuecomment-154154822.

0xazure commented 8 years ago

there's a different function for that.

You'll have to direct me to the code, because a perusal of XKit.interface in both xkit_patches and the docs hasn't turned anything up.

As far as filtering out the post window "post", we might be able to exclude .post-form? Though that class is higher up the DOM tree; there's nothing at the same level as .post that's unique to the post window as far as I can see. My jQ is rusty though, so I'm not sure if that would work.

nightpool commented 8 years ago

@0xazure post_window_listener

On Thu, Nov 5, 2015 at 2:45 PM 0xazure notifications@github.com wrote:

there's a different function for that.

You'll have to direct me to the code, because a perusal of XKit.interface in both xkit_patches and the docs hasn't turned anything up.

As far as filtering out the post window "post", we might be able to exclude .post-form? Though that class is higher up the DOM tree; there's nothing at the same level as .post that's unique to the post window as far as I can see. My jQ is rusty though, so I'm not sure if that would work.

— Reply to this email directly or view it on GitHub https://github.com/new-xkit/XKit/issues/676#issuecomment-154169800.

0xazure commented 8 years ago

Oh, the listener mechanism. Sorry, I was only thinking of functions like get_posts() that you'd have to call manually.

nightpool commented 8 years ago

yes, the edit window is not a post on the dashboard and therefore shouldn't be returned by get_posts.

On Thu, Nov 5, 2015 at 3:00 PM 0xazure notifications@github.com wrote:

Oh, the listener mechanism. Sorry, I was only thinking of functions like get_posts() that you'd have to call manually.

— Reply to this email directly or view it on GitHub https://github.com/new-xkit/XKit/issues/676#issuecomment-154173794.

nightpool commented 7 years ago

Not sure I still find this compelling, but we should make sure this isn't an RDO bug (NINETY percent sure we fixed it....)