Wedge

Public area => The Pub => Topic started by: Arantor on October 10th, 2011, 12:06 PM

Title: PM popup
Post by: Arantor on October 10th, 2011, 12:06 PM
The existing PM popup has long bugged me, and after Nas' enhanced PM popup(http://custom.simplemachines.org/mods/index.php?mod=2283), I thought I'd give it a shot in Wedge (as a core feature, rather than a plugin)

It's still a WIP but here's what I got so far. I may not finish it (and abandon my changes) or tweak it, haven't really decided yet.

(Yes, I know it needs a border, and some actual content.)
Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 12:17 PM
Funny, now I've started doing this, I can think of a much better way of doing it, using the existing popup architecture.

(We have a setup whereby popups are not done into new windows but a small window-like structure in the lower right corner. I posted an example using that for readme files in the plugin manager - here if you want a picture(http://wedge.org/code/6733/package-manager-episode-iii/msg266726/#msg266726))

I'm thinking I could use that to contain the popup, and it would also provide for displaying a short preview too without being so in-your-face.

Thoughts?
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 01:21 PM
I quite like 2.0.1 with the opacity and popup going on..... but it is 'in yer face' as you rightly say. On the otherhand you have no excuses for missing one  :)
I also like the lower right window - classy  :cool:
Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 01:29 PM
Quote
I quite like 2.0.1 with the opacity and popup going on.....
That's your browser doing that. The popup in 2.0 is a standard JavaScript popup, so it'll do whatever your browser does with such things.

The lower right window is, I suspect, where I'll end up doing it, just doing some other stuff first.
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 01:33 PM
Quote
That's your browser doing that.
Told you I was clueless  ::)

Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 01:39 PM
Quote from billy2 on October 10th, 2011, 01:33 PM
Quote
That's your browser doing that.
Told you I was clueless  ::)
Nah, you're not. Most people don't realise that it's SMF leveraging your browser to do the work.
Title: Re: PM popup
Post by: Nao on October 10th, 2011, 02:52 PM
Quote from billy2 on October 10th, 2011, 01:21 PM
I quite like 2.0.1 with the opacity and popup going on..... but it is 'in yer face' as you rightly say. On the otherhand you have no excuses for missing one  :)
I also like the lower right window - classy  :cool:
My lower right popup code also has an opacity animation, you know... :P

Anyway, yeah Pete, that popup would best be using the help popup system.
Actually, any popup done with window.open() and things like that... I think there's a to-do list item about that in the list I posted a few days ago ;)

(Oh, and I forgot to reply to your comments on it... -_-)
Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 02:58 PM
Quote
Anyway, yeah Pete, that popup would best be using the help popup system.
Yup, that was my conclusion. Not only would it be more capable of doing things, it means no extra template work in the main template, and it'd just look better anyway.
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 02:59 PM
Quote
My lower right popup code also has an opacity animation, you know... :P
I didnt know that Nao, no. Am I supposed to?
I have been banned from uploading images, so I doubt I have SVN access  :yahoo:

Title: Re: PM popup
Post by: Nao on October 10th, 2011, 03:00 PM
You aren't banned from anything (?), and you have demo access if you want...
Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 03:03 PM
I think the permissions aren't quite set right in AeMe here...
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 03:08 PM
 :lol:

I will bob into the demo then and pm myself :)
I think I have spammed enough here for a week.



Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 03:11 PM
This isn't in the demo yet :P The demo is in fact a shade behind what the changelog says, this whole thread started out with my proposing a new idea...
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 03:14 PM
Quote
..... this whole thread started out with my proposing a new idea...
Wierd how that happens :)
Title: Re: PM popup
Post by: Arantor on October 10th, 2011, 03:16 PM
Well, I'll note it wasn't entirely original but it took a different direction minutes after I posted. It's almost like I tried to do something new, different and interesting ;) :lol:
Title: Re: PM popup
Post by: billy2 on October 10th, 2011, 03:26 PM
Quote from Arantor on October 10th, 2011, 03:16 PM
Well, I'll note it wasn't entirely original but it took a different direction minutes after I posted. It's almost like I tried to do something new, different and interesting ;) :lol:
Well, it is your motto after all is said and done....... Innovate not Imitate  :lol:

Title: Re: PM popup
Post by: DirtRider on October 11th, 2011, 02:55 PM
Quote from Arantor on October 10th, 2011, 01:29 PM
The lower right window is, I suspect, where I'll end up doing it, just doing some other stuff first.
I like this way of doing it really look much more professional.
Title: Re: PM popup
Post by: Arantor on August 23rd, 2013, 10:50 PM
Hmmm. When I originally thought about this, I certainly hadn't thought about the revamp I've since carried out which pretty much nukes this idea.

I haven't yet removed the popup, but I might as well now - it's pretty clear at the top of the page that you have something to deal with... anyone want me to leave the PM 'you have new messages, would you like to read them in a new window?' message?
Title: Re: PM popup
Post by: Nao on August 24th, 2013, 12:01 AM
Yes, I don't see any problem in removing it; but that's mainly because I always found this to be overkill...
Amusingly, I had the same idea when studying the patch file; but I figured you would disagree with me. I was wrong, I guess ;)

BTW, while on the subject...
I rewrote the JS PM notif code to save about 80 gzipped bytes; it's not MUCH indeed, but it's better than nothing.
However, my rewrite consists in making a 'generic' object to handle any kind of notification popup, but I have two problems:
- I hardly see any reason for a plugin to add another type of notification...?! They would probably add themselves to the generic notifications, no..?
- I'm having trouble with the auto_update, ah ah... Because getting both notification numbers from the same request implies calling handlers from within a higher scope, so it's... Quite a bit fucked up.

I'm probably gonna give up on this, but I have to admit, I'm not thrilled with having so much repeated code in script.js, although it DOES compress very well, compared to the amount of code, so...
Title: Re: PM popup
Post by: Arantor on August 24th, 2013, 12:08 AM
Here's the thing, there aren't two kinds of 'notifications'. There are two kinds of popups, and I've deliberately held off making a third because of this.
Quote
- I hardly see any reason for a plugin to add another type of notification...?! They would probably add themselves to the generic notifications, no..?
Yup. Though I still want to use the same general mechanism for adding a profile menu next to the notifications menu where we can put the avatar and profile menu navigation.
Quote
- I'm having trouble with the auto_update, ah ah... Because getting both notification numbers from the same request implies calling handlers from within a higher scope, so it's... Quite a bit fucked up.
I deliberately went down that road to minimise bandwidth use and server hit; we already do a regular poll, getting one number, and the auto update function isn't - as far as I can see - bound to any particular scope... and in the same request I'm just outputting something we already had loaded. It just seemed logical to me to do that.

The third popup I want to add, fortunately doesn't have any auto updating, it's just a panel that would be loaded via AJAX when clicked on.

But that would make a third copy of the code, different again :(