Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: xrunner on May 11th, 2013, 01:15 AM

Title: Multiple Same-Name Selection Box When Notifying
Post by: xrunner on May 11th, 2013, 01:15 AM
Sorry for the goofy title, but I couldn't think of a better one. See the attachment. I was going to test the notification system with my own name and got a little box with four of my own names. It might not be a bug but something I don't understand. :)
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Arantor on May 11th, 2013, 01:25 AM
Yeah, I've seen this but never been able to figure out why it's not consistent in reproduction :(
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: xrunner on May 11th, 2013, 01:28 AM
Quote from Arantor on May 11th, 2013, 01:25 AM
Yeah, I've seen this but never been able to figure out why it's not consistent in reproduction :(
Ah OK. I haven't had that much to drink this evening so I was sure I wasn't seeing things. :)

Sometimes it was two names, sometimes three, and then four, as I would add or delete letters from my member name.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Nao on May 11th, 2013, 11:54 AM
This is a bug that I noticed ever since the first introduction of mentions; I reported it a couple of times, and added it to my to-do list; however, I haven't had time to work on it, yet. It took me a while to get the dropdown to position right next to the cursor, so I was quick to leave everything else aside, ah ah...

Also, I was quite bummed when I realized that it you type quickly, like I do, you often end up typing the name more quickly than the mentions thing can show it to you. Thing is, in the auto-suggest, you HAVE TO select a name to keep going. In @mentions, you can just type the name, and keep typing the rest. It's nearly... Pointless, to have a dropdown, actually... :-/
Would probably be more useful to have some text show up below the textarea, saying something like, "Nao will receive a mention notification once you hit Submit."
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: xrunner on May 24th, 2013, 03:09 AM
I was just checking the issue this thread refers to, to see if I could check the solved button, and I thought I should report what I was seeing on my screen. It's odd. It may or may not be helpful. See attachment.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Nao on May 24th, 2013, 06:45 PM
Okay, the multiple name bug should be fixed... It was due to the name container being created outside of the $.post Ajax request, which normally should have worked, but in this case, it didn't, and I fixed it by moving the item creation to inside the Ajax callback... This is totally weird, but you know what..? It doesn't matter... Anyway, I didn't write the original code, and it's not anywhere on SVN, so I'm having trouble keeping track of what I changed in it, so maybe I added another bug in the meantime, which could only be solved by delaying the container creation.

I also fixed that odd bug where you'd get a very small, empty, container when having the container show up, then pressing backspace to the @ and typing a name that's not in the name list. This was a more logical fix, so my honor is saved, ah ah...

I still need to understand the logic of key handling, though, as I have a feeling that it's not behaving as well as it should. (Notably the up and down keys... >_<)
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Nao on May 24th, 2013, 11:38 PM
So... The latest changes:
- using auto-suggest minChars to determine minimum number of chars to type, in the case of wedge.org this is set to 2 characters. (It will, in the future, be set to 3 characters, because we're bound to have more members... I guess? I hope? I hope not..?)
- pressing Backspace while the dropdown is opened and we already were at the minimum number of characters allowed, will close said dropdown. Pressing the Left arrow in the same situation will do the same.
- moving Up in the dropdown will eventually wrap to the last item (previously, it just stopped at the first.)

I hope you like it, guys... ;)
It's not finished yet, but will be soon.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: xrunner on May 25th, 2013, 12:42 AM
Looks like it's working! I guess I'll mark it solved since I started it.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: godboko71 on May 25th, 2013, 07:56 AM
Great stuff @Nao Keep up the food work and if you need a break a break of that kit kat bar, well do that!
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: live627 on May 25th, 2013, 10:30 AM
Quote from godboko71 on May 25th, 2013, 07:56 AM
Great stuff @Nao Keep up the food work and if you need a break a break of that kit kat bar, well do that!
(http://smartcanucks.ca/wp-content/uploads/2009/03/hungry-cat.jpg)
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Dragooon on May 26th, 2013, 03:15 PM
Where are these improvements? I'd like to merge them back to my github repository.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Nao on May 26th, 2013, 03:23 PM
- Nowhere... I haven't SVN'ed them at all...
- Considering that your repo is BSD, and Wedge isn't, as long as Wedge isn't MPL'ed (which it might be in the future, of course), re-using my changes isn't automatically approved... Not that I don't want you to re-use my changes anywhere; it's just that to me, BSD is nearly as toxic as GPL is: if someone wants to improve on the code and re-license it, they can... Ideally, maybe you should relicense it to something that can't be relicensed (to GPL or commercial), in which case I'll update the license in the Wedge version and automatically give you my changes.
I know it stinks, and I don't like the idea of doing this, but the code itself is the only thing that gives Wedge its edge. I've seen over at Elk that they're re-using my ideas here and there, which I'm fine with, but if we go commercial, I'll be quite happy we kept our code closed-license.

So, err... The official answer is: I'm not done yet with the changes :P The code is a WIP, it's awfully complicated right now. Also, some of the bugs I fixed, may very well be absent from your own code. I may have added the bugs myself... The unofficial answer is, please be patient, while Pete and I work out the various licensing issues we still have.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Arantor on May 26th, 2013, 03:36 PM
Just to add, there are a number of licensing issues at present to be dealt, including GPL code currently in the repository that we need to obtain suitable licenses for, or that we replace entirely.

There is one thing I want to say though, and this is where the open source issue kicks in.

It's all very well and good having great ideas and executing them well. But the spirit of open source is sharing so that everyone benefits. SMF, under protest, shared their code in a way that allows us to do what we did. Us going MPL (or some other licence) would explicitly allow the code to be shared with other people in a way that lets them build upon it and even share details of implementation with others. I'm cool with that because in the end everyone still benefits, but it does raise the question of how protective we should/must be over it.

One final thing: BSD is not toxic. It is the opposite of toxic in many respects. GPL's problem is not in what it does, but what it forces others to do, in that if a library is GPL and bound in the conventional sense (scripted or otherwise), the entire thing must be GPL. The only way around it is if there is total separation between the parent and child routines where the child is GPL and there is separation, e.g. process fork, or query across a standard interface. BSD on the other hand is not toxic because it doesn't force any of these things, but it doesn't leave much protection for the author either.

I must say I do find it slightly weird that BSD is what allowed us to do what we did and yet we're criticising it for not doing what we want.
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Nao on May 26th, 2013, 03:41 PM
My opinion of a non-toxic license is that it should:
- allow for re-use in any kind of program,
- not allow for re-licensing of the entire file that is under said license. Yes, you can still do closed source changes to the file, but they need to be put in another file... Which should be enough to encourage users to share their changes if they're not too complex.

That's my, err... Idea of freedom, I guess.

And yes, about the GPL code in Wedge, as you know I'm working these days on evaluating alternatives.... Which is probably why I'm reluctant to share any code right now, even though I posted my menu changes in another topic today... :lol:
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Arantor on May 26th, 2013, 04:02 PM
It's a valid one :) MPL fits all of that as I understand it.

That reminds me, I need to talk to the one guy about that...
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Dragooon on May 26th, 2013, 04:17 PM
Wouldn't any changes you make to the plugin's file automatically be licensed under BSD?
Title: Re: Multiple Same-Name Selection Box When Notifying
Post by: Arantor on May 26th, 2013, 04:31 PM
Nope. This is why the entire licensing situation - generally - is a WTF.

SMF is BSD. Under that logic, any changes we make would also be BSD... but that's not how it works. We are required to keep the copyright intact, and otherwise follow the terms of the BSD... but the changes we make to it are ours and not BSD.

They are our copyright, and copyright law prevails in absence of a licence declaring otherwise - which is why a licence is *so* important, it's the only thing that gives you any rights to anything.

Technically, when Wedge releases, it will be 'SMF is BSD, and it's still BSD, but all the other stuff on top is under <this other licence> and the total package is released under <this other licence>'. It's a horrible murky mess to contend with.