Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: txcas on January 29th, 2014, 11:44 PM

Title: Membergroup Settings - Badges
Post by: txcas on January 29th, 2014, 11:44 PM
The first issue is cosmetic.  When setting the badge options for the last member group, not all the options are visible when clicking on the dropdown arrow.  Workaround is to use the keyboard up or down arrow keys to cycle through the options.
(http://www.carloss.us/pictures/badge1.jpg)

The second issue is with the badge options when configured as shown:
(http://www.carloss.us/pictures/badge2.jpg)

With those settings I expect only the 5 red dots badge to show up for the administrator, but Wedge is displaying both the administrator badge and the badge based on the number of posts.
(http://www.carloss.us/pictures/badge3.jpg)
Title: Re: Membergroup Settings - Badges
Post by: Nao on February 12th, 2014, 07:25 PM
The first problem is a common issue with absolute positioning and z-index stacking.
Basically, there are two ways of fixing it. The first isn't possible because it involves removing positioning from sortable elements, which completely breaks the feature. Uh. The second implies moving the select box out of the current flow, for instance by putting its HTML at the very bottom of the page, outside of the #wedge div, etc. This means it gets its own z-index stack, and will correctly show up everywhere (see alert popups, for instance.)
Unfortunately, doing this has a MAJOR problem: it forces me to absolutely position the select box dropdown in pixels from the start of the screen, so if the select box ever changes its position (e.g. hardware scrolling when opening a hidden sidebar, or doing any kind of animation such as showing/hiding the header) will not update the dropdown's position, meaning it will, quite simply, stay where it was, and show up in silly places.
I tried doing that a few times in the past, and always gave up.
Another solution could be to change the way the sortable list is shown... For instance, I could show the current setting with a button next to it (change), and clicking it could open a popup when you can choose your preference. That's pretty much a cop-out, and a usability nightmare I'd say.

I don't know what to say, or what to do... What do you think?

As for the second problem, I'll look into it.
Posted: February 12th, 2014, 07:23 PM

Have you tried using the Purge Cache menu option after changing an option..?
Title: Re: Membergroup Settings - Badges
Post by: Nao on February 12th, 2014, 07:35 PM
I think I've fixed it... Another Pete bug :P
Title: Re: Membergroup Settings - Badges
Post by: txcas on February 12th, 2014, 07:40 PM
I can live with the first issue since only the admins will see it.  I will test the second one as soon as you commit the fix to Github.
Title: Re: Membergroup Settings - Badges
Post by: Nao on February 12th, 2014, 08:14 PM
- First issue: my bad, I didn't look into it enough. It's all due to an intermediary <dl class="settings"> which has an overflow set to hidden. Hmm... Honestly, I can't remember why it's overflow: hidden at all, it might be tempting to just remove that rule. And, maybe, push the overflow: hidden to a higher level...

- The fix was uploaded here, and it didn't work (normally the post badges are also hidden if another badge is in there), but I think that's still the one, so... it's probably just something I forgot to fix in another place, too. I'm busy IRL right now, so that'll have to wait a bit.
Title: Re: Membergroup Settings - Badges
Post by: Maxx on February 12th, 2014, 08:41 PM
To be honest and this just me I hate those little buggers and wish they would just disappear, I think, there already enough information in that section, with those nasty looking things. or could they be changed for something else like the states bars ( but thinner line) or just some text, it already says enough for me.! :)

regards,
Maxx
Title: Re: Membergroup Settings - Badges
Post by: Nao on February 12th, 2014, 11:21 PM
Seems to be fixed now...
There were apparently two (!) bugs in the same short code block.

The whole "hide this badge if another is already shown" was testing against $user_profile[...]['badges'], which is EMPTY at this point... The 'other developer' should have tested against the temporary variable.

This never would have worked at all. I have no idea why he committed that in the first place... And I thought I didn't test my commits thoroughly... ::)

I'll do a few more tests, ensure that everyone's working perfectly, and then commit tomorrow at the latest.

:edit: Finished my tests. Removed the other bug report because I noticed it was a moot point, as the badge list wasn't cached entirely anyway.