ElkArte Community

Elk Development => Feature Discussion => Topic started by: emanuele on December 09, 2012, 06:13:17 am

Title: dropdown linktree instead of jump to
Post by: emanuele on December 09, 2012, 06:13:17 am
Quote from: emanuele – /me is thinking of adding a cool thing to the link tree: have you seen how nowadays file manages handle these things? O:) (that would make the "jump to" completely useless)

ETA: even though I have no clear idea how to realize it. :P

The idea is born while writing, so NFI what it should look like, or how to create it.
The basic idea is: click on the arrow (or the board/category name) of the linktree and a dropdown/menu-like appears with the list of boards on the same level.

I would love to have multi level menu-like system able to show subboards too.
Title: Re: dropdown linktree instead of jomp to
Post by: Antechinus on December 09, 2012, 06:58:27 am
Oh no. You can't be serious. Fer chrissake, the jump to is useless anyway. I've never used it in five years except to see what it did. In fact I've just gone and deleted it from my site because nobody else though it was worth keeping anyway, so there was no point running all the crap it required to make it work.
Title: Re: dropdown linktree instead of jomp to
Post by: TestMonkey on December 09, 2012, 02:03:14 pm
I think it would be much better on the linktree. After all, that's the exact place that lists your 'path'.

With the sole condition that it doesn't agglomerate the view perhaps... For a small number of boards, I figure it'd be very nice. For a large number of boards and sub-boards... I don't have any good idea how to do it, to be friendly and readable.
Title: Re: dropdown linktree instead of jomp to
Post by: Antechinus on December 09, 2012, 03:47:14 pm
Quote from: emanuele – The basic idea is: click on the arrow (or the board/category name) of the linktree...
Just noting that the last suggestion would not work. The last thing most people would want is to get a drop down when they clicked a nav link.

If you really want to do this (and I'm totally against it) it would have to be done by having an indicator link between the standard nav links. However, at this stage I would greatly prefer of it was not added to default and was trialed as a, you guessed it, offical mod. See if anyone gives a damn before adding bloat. :)
Title: Re: dropdown linktree instead of jomp to
Post by: emanuele on December 10, 2012, 04:24:08 am
Quote from: Antechinus –
Quote from: emanuele – The basic idea is: click on the arrow (or the board/category name) of the linktree...
Just noting that the last suggestion would not work. The last thing most people would want is to get a drop down when they clicked a nav link.
Yeah, that may be the reason SMF is full of features nobody knows until one looks at the code... lol

Quote from: Antechinus – If you really want to do this (and I'm totally against it) it would have to be done by having an indicator link between the standard nav links. However, at this stage I would greatly prefer of it was not added to default and was trialed as a, you guessed it, offical mod. See if anyone gives a damn before adding bloat. :)
Oh, well. Since javascript shall be enough to do everything I'll put up the thing to see how it would look, then up to you decide what to do. :P
Title: Re: dropdown linktree instead of jump to
Post by: Antechinus on December 27, 2012, 08:48:13 pm
On a somewhat related note, another option might be to approach things a bit differently. I notice that we now have single category view enabled (which I think is a good option to have).

It would be very easy to also allow an option for a subsiduary menu bar, consisting of links to each single category. This is likely to be far less unwieldy than a list of boards. Could be done several ways.


Given that the code for churning out the categories is already in BoardIndex.template.php, it seems to me that this is the obvious place for such a gizmo.
Title: Re: dropdown linktree instead of jump to
Post by: TestMonkey on March 06, 2013, 03:51:40 am
Tracked: https://github.com/elkarte/Elkarte/issues/228

Feel free to propose a working nicer alternative than jump to.
Title: Re: dropdown linktree instead of jump to
Post by: emanuele on March 06, 2013, 07:36:50 am
/me has been working from time to time on that
I was trying to give the possibility to easily expand the dropdown from the linktree, though not being a js expert I'm having some difficulties... (not to mention that I didn't even start the main thing... :P)
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on January 18, 2014, 09:18:11 am
@emanuele do you have some code in hand related to this... seems pretty interesting
Title: Re: dropdown linktree instead of jump to
Post by: emanuele on January 19, 2014, 05:39:50 am
Nope, I think I started write down something, but it was about 20 lines of code, probably lost in one of the tens of branches I have around, but anyway nothing worth the hassle of reading it.

Anyway, it shouldn't be that complex either: I suppose an ajax call when hovering or clicking the entry (or an arrow close to it) and then a droppy of some kind.
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on January 19, 2014, 08:07:27 am
Quote from: emanuele – Nope, I think I started write down something, but it was about 20 lines of code, probably lost in one of the tens of branches I have around, but anyway nothing worth the hassle of reading it.

Anyway, it shouldn't be that complex either: I suppose an ajax call when hovering or clicking the entry (or an arrow close to it) and then a droppy of some kind.
I was thinking of getting the data(of dropdown) with the data of topic/board. Next to names in linktree, add an arrow, and add the data to arrow using ul/li structure. Now using simple css
- by default keep the ul containing the dropdown data hidden,
- and when someone hovers over the arrow, make ul visible

Just a thought.
Title: Re: dropdown linktree instead of jump to
Post by: emanuele on January 19, 2014, 08:18:04 am
Yes, that was probably my first idea as well, though I think there are a couple of problems with it:
1) the structure of the linktree becomes pretty complex (bad for accessibility),
2) when you are in a topic you have to load the boards and categories structure of all the ancestors while loading the page (that may be quite a bit of overhead).
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on January 20, 2014, 09:09:16 am
Quote from: emanuele – Yes, that was probably my first idea as well, though I think there are a couple of problems with it:
1) the structure of the linktree becomes pretty complex (bad for accessibility),
Umm, that can be overcome, we can optimise the HTML structure.

Quote from: emanuele – 2) when you are in a topic you have to load the boards and categories structure of all the ancestors while loading the page (that may be quite a bit of overhead).
This can be a real issue. So, going by your last suggestion,

1. Mouseenter, on arrow/image/whatever we make an ajax call
2. place the data in a array/object of JS
3. and populate the data in container and display it
4. Mouseleave, destroy the container
5. Mouse re-enters, repeat from step 3

Sounds good?
Title: Re: dropdown linktree instead of jump to
Post by: emanuele on January 20, 2014, 02:05:57 pm
I would consider not to destroy the container at step 4, it would save in case of 5 on the same element... if possible, I'm still fighting with ajax... :'(

But yes, it looks good! :D
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on January 22, 2014, 09:59:02 am
Quote from: emanuele – I would consider not to destroy the container at step 4, it would save in case of 5 on the same element... if possible, I'm still fighting with ajax... :'(

But yes, it looks good! :D
Lol, I was reading your reply and was playing with linktree(for folders on left hand) of 'Google Drive', and they do exactly the same expect the step 4. So, I'll start implementing this by keep the containers intact on DOM.
Title: Re: dropdown linktree instead of jump to
Post by: emanuele on January 22, 2014, 10:05:41 am
LOL
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on February 16, 2014, 02:54:35 pm
Started with a very basic structure for now over here (https://github.com/siddhartha-gupta/Elkarte/commits/linktree)
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on February 17, 2014, 09:46:07 am
Jokerzz hazz thizz
Title: Re: dropdown linktree instead of jump to
Post by: Spuds on February 17, 2014, 10:07:11 am
Awesome ... I can see that being a useful way to navigate around the site  :)

I could not tell with the me text, are you just adding the hover event to the last couple of characters or did you have to insert some blank text there?  Also it would be good to use the hover-intent function (if you did not) like we have on the menus and tooltips, etc makes drop downs less jittery IMO
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on February 17, 2014, 10:15:13 am
Quote from: Spuds – Awesome ... I can see that being a useful way to navigate around the site  :)

I could not tell with the me text, are you just adding the hover event to the last couple of characters or did you have to insert some blank text there?  Also it would be good to use the hover-intent function (if you did not) like we have on the menus and tooltips, etc makes drop downs less jittery IMO
Currently the dropdowns appear with a click, as with users like(impatient) me and hover functionality one can easily get there servers killed.

The 'me' text is just a dummy text, so that I can know where I need to click to make the dropdown appear. For sure someone need to design the dropdrown and area to click/hover as I'm way too poor in terms of designer.
Title: Re: dropdown linktree instead of jump to
Post by: Spuds on February 17, 2014, 10:20:01 am
Ah even better making that a click option, yeah yeah thats what I meant to say :P

So its just a click area on the right side of the linktree text.

You know I could just pull in the branch and check it instead of pestering you with questions !
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on February 17, 2014, 10:25:10 am
Quote from: Spuds – Ah even better making that a click option, yeah yeah thats what I meant to say :P

So its just a click area on the right side of the linktree text.

You know I could just pull in the branch and check it instead of pestering you with questions !
Yup, exactly, just click on 'me' text and the drop down appears.

Moreover, I've cached the results and dropdown for the current page as discussed over here and following replies (http://www.elkarte.net/community/index.php?topic=27.msg6456#msg6456).

Lol, only pull the branch if you are sending some awesome PR's as usual :D. Here's the TODO on my mind:

- Hide dropdown if users clicks anywhere else on the page
- Add functionality whether user can see the board/topic
- visit other pages and see how linktree behaves
- thinking where we need to show the messages when someone clicks on topic named area of linktree?

Please add if I'm missing something.
Title: Re: dropdown linktree instead of jump to
Post by: Joker™ on February 23, 2014, 07:57:48 am
Just a small bump over here.

Do we want to integrate linktree dropdown in sections like
- Private Messages
- Admin panel etc

In these sections we can show the menu dropdown options in linktree dropdowns.