Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

ReplyTo Version 0.1.4 Released

judgejjudgej
edited November 2010 in Vanilla 2.0 - 2.8
This version incorporates some suggested changes and some changes I had been planning for a while:

* New style to apply from level 1 upwards, so all comments that are a reply to something can be styled consistently.
* Styles now moved from the div.Comment element to its parent, the list item. Minor changes to the plugin stylesheet selectors to support this.
* New method of including the indentation styles in the theme; now handled in an event, but a single line of code in the theme is required to expose the classes to the event, for now (vanilla 2.0.11) at least.
* Generation of classes moved to its own function for reuse. If it is possible to put an event in, so people can override the generated classes, then I'll look into that.
* Comments that have a parent on a previous page now get a link pointing to that parent comment in the options list. This link will have class "ReplyToParentLink" in the next release so it can be hidden if not needed or restyled.

Have fun.

Comments

  • With the theme and stylesheet changes, this should probably have been v 0.2.0, but never mind.
  • In the next release I will be introducing more APIs for selecting from the comment tree, such as finding and counting all ancestors of a comment. These API functions will be usable in a custom theme to organise and format the discussions in a wider variety of ways.
  • Bug in CSS:
    .ReplyToDepth-10plus {

    Should read:
    .ReplyToDepth-10plus .Comment {

    'ReplyToDepth-1plus' is kinda very strange name for all nested comments. I think that 'NestedComment' is much more clear name.
  • judgejjudgej
    edited November 2010
    The name is just part of the pattern that the larger nested levels follow, just to be consistent. I'm looking at ways developers and theme designers could create their own classes using whatever patterns they like.

    The CSS bug was fixed in 0.1.4
  • It's another bug :) The former one was having "plus" missing.
  • I think I'm missing something. I see this in the code, line 73 of replyto.css:

    .ReplyToDepth-10plus .Comment { padding-left: 15em; }

    Is that it, or somewhere else?
  • That's weird. Seems to be okay.

    You are disabling ajax for posting. I think you shouldn't do this for root level comments.
  • judgejjudgej
    edited November 2010
    There are some notes about the AJAX posting in the readme. I just need to understand more fully how it works in Vanilla and how to work around the indentation issues before the refresh (redirect to the comment just posted) can be avoided. There is certainly enough information on the page to determine where the new post should appear and what level of depth it should have.

    I'm assuming it is the redirect *after* posting that you mean, and you aren't seeing the posting form itself appear on a new page. It should only redirect on posting a reply to a comment. If it is redirecting after posting a top-level comment (the box always at the bottom of the page) then that is an unexpected consequence, and I'm not sure why that would be happening.
  • I just tried the "Quote Select" plugin with this plugin while replying to a comment, and like magic the quote was put into the correct box :-)

    Please feed back any incompatibility issues with other modules, and I'll do what I can to fix them.
  • Clicking "Cancel" does not close form, but redirects to /discussions. Which is really wrong.
  • judgejjudgej
    edited November 2010
    Pressing "Cancel" just closes the form for me, just the same as pressing the "Reply" link a second time. Are you seeing any JavaScript errors when pages with this plugin load?

    The functionality to close the form is already in the base classes of the theme, so is not added by this plugin. It could be that your theme does not contain that code? Could you try a different theme and see how that goes.

    Also you could try this to see if the functionality is there: edit an existing comment using the "Edit" link. The form that pops up should have a "Cancel" button. Pressing that button should close the comment edit form in exactly the same way as the "reply" form. Does that work for you, or is that button also jumping to "/discussions"?
  • No Javascript errors.
    Cancel in default theme also takes to /discussions.
    Cancel when editing also takes back to /discussions. In default theme too.
  • I see livequery events, I see return false there, but this just does not work. Nonsense.
  • judgejjudgej
    edited November 2010
    I suspect there may be something wrong with your theme then. When you open an edit form for a comment (which appears just below the comment using AJAX) then the "Cancel" buttons should just close the form. The URL for that button *does* take you to /discussions, but that is just for people who do not have JavaScript. There is a live query that overrides the URL on the Cancel button and closes the form instead.

    The URL is perhaps not as useful as it could be - it would make more sense to direct the user to the current discussion rather than the discussions index. It's not like the user is cancelling the creation of a new discussion. Raise that one as a Vanilla bug/FR perhaps?

    Edit: Just a bit more information. The livequery is in applications/vanilla/js/discussions.js That's where all the hijacking of the Cancel buttons via a live query goes on. The ReplyTo plugin ensures the button gets the "a.Cancel" selector, and then that is where the core Vanilla code comes in to remove the ReplyTo or Edit forms when clicked, whithout jumping to another page.
  • I tested on default theme also, as I said earlier.
  • judgejjudgej
    edited November 2010
    You also said that clicking the Cancel button when editing an existing comment jumps back to /discussions. That sounds to be like your default theme is not working correctly. Or did I misunderstand that comment?
  • That's weird, since I've left default vanilla theme unchanged. Anyway, thanks for trying to help, I suppose I have to dig into it myself.
  • Found it. My QuoteSelection plugin somehow interferes.
  • judgejjudgej
    edited November 2010
    Hmmm, I'm using QuoteSelection with it without any problems. QuoteSelection even manages to paste its text into the right box, i.e. the "Reply" comment box (though then jumps down to the bottom of the page - I may raise that with the plugin developer).

    I'm using version 0.6.1 of QS. I'll have a dig into its JS to see if there are any clues as to what it may be doing.

    Edit: oh, hehe, it's your plugin :-) Took me a few minutes to realise that. The jumping issue even happens when editing a comment. If I edit a comment near the top of the page, then do a quote-select into that edit box, it copies the quote into the box okay, but then my browser window jumps to the bottom of the page where the "new comment" form it. I think if it jumps anywhere, it should be the form that it has just pasted into. Of course that *could* be an interaction with ReplyTo.

  • Funny, thanks, I'll dig into it. BTW, the cancel button issue is solved, gona release new QS version soon.
Sign In or Register to comment.