Open bethlakshmi opened 10 years ago
I will take this one as time allows, but I REALLY wouldn't mind it getting taken off my hands.
Thinking aloud about this one, it seems that the best solution might be to generate all submenus on page load with approriate class tags and use jquery to hide and show them. This would avoid the reload problem, and the associated db calls. The jquery is pretty simple, if the class tags are there, since it selects by classes just as css does.
However, I haven't looked at the code that generates the left nav, so I don't know whether it's amenable to modification.
You've seen a lot of the other code. :)
They've got a class infrastructure of different types of menu items but it's not particularly elegant. The kicker right now is that the way that it decides what menu to open is based on what the current URL is of the page - it opens whatever submenu has an item with an exact match in it. There's no infrastructure there for defining menu choice as different from current page.
Given how many navigation choices are hidden in the body of the code, and how easily we could brake it, I just feel cautious about doing anything without some serious thought.
jquery would be cool to learn, I know it's super useful, but it will be a minor learning curve for me.
On Fri, Dec 13, 2013 at 11:21 AM, Jon Kiparsky notifications@github.comwrote:
Thinking aloud about this one, it seems that the best solution might be to generate all submenus on page load with approriate class tags and use jquery to hide and show them. This would avoid the reload problem, and the associated db calls. The jquery is pretty simple, if the class tags are there, since it selects by classes just as css does.
However, I haven't looked at the code that generates the left nav, so I don't know whether it's amenable to modification.
— Reply to this email directly or view it on GitHubhttps://github.com/bethlakshmi/GBE/issues/125#issuecomment-30521644 .
I've got a little jquery and javascript. If you want to talk this one over, give me a shout over the weekend. The hard part will be the PHP.
On Fri, Dec 13, 2013 at 4:16 PM, bethlakshmi notifications@github.comwrote:
You've seen a lot of the other code. :)
They've got a class infrastructure of different types of menu items but it's not particularly elegant. The kicker right now is that the way that it decides what menu to open is based on what the current URL is of the page - it opens whatever submenu has an item with an exact match in it. There's no infrastructure there for defining menu choice as different from current page.
Given how many navigation choices are hidden in the body of the code, and how easily we could brake it, I just feel cautious about doing anything without some serious thought.
jquery would be cool to learn, I know it's super useful, but it will be a minor learning curve for me.
On Fri, Dec 13, 2013 at 11:21 AM, Jon Kiparsky notifications@github.comwrote:
Thinking aloud about this one, it seems that the best solution might be to generate all submenus on page load with approriate class tags and use jquery to hide and show them. This would avoid the reload problem, and the associated db calls. The jquery is pretty simple, if the class tags are there, since it selects by classes just as css does.
However, I haven't looked at the code that generates the left nav, so I don't know whether it's amenable to modification.
— Reply to this email directly or view it on GitHub< https://github.com/bethlakshmi/GBE/issues/125#issuecomment-30521644> .
— Reply to this email directly or view it on GitHubhttps://github.com/bethlakshmi/GBE/issues/125#issuecomment-30544203 .
Tackling other stuff first.
On Fri, Dec 13, 2013 at 4:28 PM, Jon Kiparsky notifications@github.comwrote:
I've got a little jquery and javascript. If you want to talk this one over, give me a shout over the weekend. The hard part will be the PHP.
On Fri, Dec 13, 2013 at 4:16 PM, bethlakshmi notifications@github.comwrote:
You've seen a lot of the other code. :)
They've got a class infrastructure of different types of menu items but it's not particularly elegant. The kicker right now is that the way that it decides what menu to open is based on what the current URL is of the page - it opens whatever submenu has an item with an exact match in it. There's no infrastructure there for defining menu choice as different from current page.
Given how many navigation choices are hidden in the body of the code, and how easily we could brake it, I just feel cautious about doing anything without some serious thought.
jquery would be cool to learn, I know it's super useful, but it will be a minor learning curve for me.
On Fri, Dec 13, 2013 at 11:21 AM, Jon Kiparsky notifications@github.comwrote:
Thinking aloud about this one, it seems that the best solution might be to generate all submenus on page load with approriate class tags and use jquery to hide and show them. This would avoid the reload problem, and the associated db calls. The jquery is pretty simple, if the class tags are there, since it selects by classes just as css does.
However, I haven't looked at the code that generates the left nav, so I don't know whether it's amenable to modification.
— Reply to this email directly or view it on GitHub< https://github.com/bethlakshmi/GBE/issues/125#issuecomment-30521644> .
— Reply to this email directly or view it on GitHub< https://github.com/bethlakshmi/GBE/issues/125#issuecomment-30544203> .
— Reply to this email directly or view it on GitHubhttps://github.com/bethlakshmi/GBE/issues/125#issuecomment-30545018 .
Looking at the code, this might actually be easier than I'd thought.
Ideally the menu sidebar would be separate in how it's displayed from the action on the main page. It could be redesigned as an additional value appended to the current link, rather than as a new URL submission, but that's not at all how it's coded. The current method is rather annoying, since you can easily end up loading and reloading uninteresting pages.