Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending asks from dashboard with User Menus+ fails #42

Closed
hobinjk opened this issue Jul 30, 2015 · 6 comments
Closed

Sending asks from dashboard with User Menus+ fails #42

hobinjk opened this issue Jul 30, 2015 · 6 comments
Assignees

Comments

@hobinjk
Copy link

hobinjk commented Jul 30, 2015

No description provided.

@Fevix
Copy link

Fevix commented Jul 31, 2015

My bad. ColtCelestia here, I didn't realize there was a github.

More information about the failure, at least the version I'm getting:
Nothing crashes, as far as I can tell, but the browser does appear to be downloading information (As evidenced by the favicon part of the tab turning into the blue (Chrome) or green (Firefox) animated circle), but after a while it stops that, Chrome opting to display a 'webpage unavailable' page

Edit: It seems that the behavior has changed, now I'm being redirected to the blog's main Ask page (Rather than getting the in-dashboard popup box as per my settings)

@bvtsang
Copy link

bvtsang commented Aug 9, 2015

I'm having trouble reproducing this with the following steps, which assumes you have control over accounts A and B:

  1. On Account A, make sure User Menus+ is enabled
  2. Visit your dashboard
  3. Hover your mouse over Account B's avatar
  4. In the popup, click on the User Menu and click Ask a Question
  5. Anonymously or not, type a message and click Ask
  6. On Account B, expect to receive the ask

This currently works for me.

@Wolvan
Copy link
Member

Wolvan commented Aug 9, 2015

I get redirected to the blog B's ask page instead of having a popup ask box open. I'll see if I can do something about that tomorrow

@bvtsang
Copy link

bvtsang commented Aug 9, 2015

If I turn enable XKit's Classic User Menu, then at step 4 I get redirected to the user's ask page. I guess I need to test more thoroughly.

Updated steps to reproduce:

  1. Make sure User Menus+ is enabled
  2. Enable XKit's Classic User Menu
  3. Visit your dashboard
  4. Hover your mouse over any avatar whose account has asks enabled
  5. Expect to see a popup with a form where the user can enter in their ask
  6. Observe that the user is redirected to the blog's main ask page instead

Thanks for looking at it, Wolvan!

@WyohKnott
Copy link

Because the normal menu popup is handle by a Tumblr event.
Maybe we should trigger it ourselves:

 Tumblr.Events.trigger('indashblog:tumblelog:ask', {
    recipient: this.model.get('name'),
    anonymous_asks: this.model.get('anonymous_asks')
  });

But I don't like that we rely on inject script so much.

@bvtsang
Copy link

bvtsang commented Aug 11, 2015

@WyohKnott I took your advice and tried https://gist.github.com/bvtsang/b879bee8a960566c0c68, but nothing happens. I guess I'll keep investigating this in the meantime.

Edit: I found a hint in Tumblr.DashboardAsk.open_ask. Currently researching this. I DID IT pull request incoming shortly

@bvtsang bvtsang self-assigned this Aug 11, 2015
homu added a commit that referenced this issue Aug 12, 2015
Fix sending asks when classic menu is enabled

Plus some refactoring.

Fixes #42.

The `Tumblr.DashboardAsk.open_ask` function I'm trying to call looks like:

```javascript
function(g) {
    Tumblr.Popover.hide_all();
    var h = g.attr("data-tumblelog-name");
    var i = (parseInt(g.data("anonymous-ask"), 10) === 1) ? true : false;
    this.model = new f();
    if (this.view) {
        this.view.destroy()
    }
    this.view = new b({
        model: this.model,
        recipient: h,
        allow_anonymous: i
    }).show_form()
}
```
@homu homu closed this as completed in #210 Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants