Closed afragen closed 11 years ago
Hmm, let me take a look.
Also, do we need to adjust some CSS to make the cursor change to something different when it's over the category text? As it stands there's no indication that the category text is clickable for an action.
That's a great point too - give me a moment to take a look.
OK, superpowers now works in older ajax'd calendars but the category label is lost. I now has category text as 'undefinded'
I've got latest version pushed to git and running on http://drfragen.info
Also, CSS for tooltip when superpower category selected changes all tooltip CSS to same thing, it's no longer category specific.
Think I'm one step behind you here - do you mean when you're running with an earlier version of The Events Calendar (if so which one)?
Also, CSS for tooltip when superpower category selected changes all tooltip CSS to same thing, it's no longer category specific.
Totally my fault, another good catch :-) I stripped out the child combinator in error in views/category.css.php - if that is amended to this it should fix the problem:
.cat_child-friendly,
.tribe-events-tooltip .tribe-events-event-title { }
Is now:
.cat_child-friendly > .tribe-events-tooltip .tribe-events-event-title { }
I've made the above change in my fork, I'll try and track down the ajax load (undefined labels issue) next - if there's anything I need to know (like using an earlier version) just let me know :-)
Hmm, I see you are using 2.0.10 on the demo site; I can't replicate the issue with "undefined" category labels using that same version though - if there's anything you can add to help me recreate this that would be great.
Cheers and have a good weekend,
Barry
I'm using the version of the plugin that's current on github.
You should be able to see the undefined bug on the test site. It has superpowers activated. Use the Ajax to change the month and the legend text changes to undefined.
Looks to be something in the linkTitle variable
Ah hah! That's probably why we're getting different results when we test: where is your legend template tag positioned?
You mean in the ecp-page-template.php? It's right after where "Calendar of Events" gets created.
Just curious, but why do you put the link to load the superpowers js in using wp_footer instead of enqueueing it into the header?
Well, my line of thinking was that we only need superpowers if we have the legend, and we only have the legend if the legend template tag has been used - so we can't guarantee being able to enqueue in time for it to be included in the header output.
Plus, there's a good case from a performance point of view for shoving as many scripts as possible into the footer.
That's just my thoughts though, we could easily change it.
(Please see my explanation/fix for undefined labels in the latest pull request.)
Barry, I wasn't questioning the logic. I didn't really know. I was just curious from a programming perspective. I'm always looking to learn from better coders. :-)
Oh no problem - I hope I didn't come across as being defensive - I was just trying to explain my reasoning.
I think this is a problem of written communication. While being more precise, it lacks non-verbal cues.
Barry, latest pull request seems to have everything working. How are we going to explain this new feature so users understand it? I will add a screenshot so they can see.
Would this be too clunky?
Legend superpowers are an optional visual effect allowing visitors to focus only on those events that belong to categories of interest - without reloading the page and without eliminating other categories from view completely.
It needs to be enabled in the Category Colors settings page and the legend must also be enabled and in use for it to function.
As a sidenote: depending on feedback a future enhancement could be to like to make the effect (in terms of the in-focus category) persist across month-to-month navigation.
Where do you propose to put that? in readme only or readme and admintab.php or optionsform.php as label?
BTW, git master here has been updated for miniColors 2.0 and a version bump. Still need to grab screenshots.
BTW, we need a consistent way of referring to superpowers. One word, two, hyphenated, Capitalized, prefixed with "Legend"...
My vote is "Legend Superpowers"
Perhaps I should move the setting to be under the same header as 'Add Category Legend'. That way there's less confusion that it might be an individual option and more like it requires the category legend. I'll push something up.
Where do you propose to put that? in readme only or readme and admintab.php or optionsform.php as label?
I think I'd put it in the readme, I think most people who don't read that would probably figure it out by a process of experimentation, then again you never know.
My vote is "Legend Superpowers"
Yep.
Perhaps I should move the setting to be under the same header as 'Add Category Legend'.
Good idea - a further thought is we could add some admin-side JS to only display that option when the legend itself has been selected.
See what I've got now on the test site. If you do want to display with admin-side JS that's fine. It would certainly look cool.
Let me know if you think I should edit the associated text in the settings. I added it to readme too. Silly me. I need to give you access to my test site so you can see it. :-P
I need an email address for that.
my first name at freshly baked websites dot net works for email ... there isn't a PM feature hiding away in GitHub is there? If there is it really must be well hidden.
Edit: ah yeah, that works well. I'll try and add JS to hide/show the Legend Superpowers in a second, I'm snatching moments at the keyboard between reading stories right now ;-)
It occurs I should probably also hide/show Custom Legend CSS if we extend the same logic.
I've added those changes (to the options form) ... would love a second opinion, not sure if the hide/show feature is a little too abrupt to be aesthetically pleasing.
Actually, I'm wondering if partially fading out those options would be better than hiding them outright. Probably over-thinking this.
Since I made you a collaborator on this it seems to work easier. No more pull requests, just rebasing. ;-)
Wow that's fast. I think a fade in/out would be more visually pleasing.
I couldn't find a PM in here either.
Agreed re: Custom Legend CSS
Partially fading out would look good, I would still recommend a fade. From a usability standpoint, would the faded area is still active and be clickable?
Slow looks better. Too bad there's no way to slow down the collapse. Don't try, too much work. ;-)
@WebBaker - The superpowers function doesn't seem to load when the month is changed via AJAX