Needs review
Project:
Hierarchical Select
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2014 at 18:17 UTC
Updated:
3 Sep 2020 at 13:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marthinal commentedHi guys,
I was working a little bit on it.
Here is the repo https://github.com/marthinal/hsd8
Needs improvements and refactor, a lot of work. :)
For the moment, we can select the widget and it works but not perfectly :)
Screenshot attached.
We need to apply this patch https://www.drupal.org/node/2455617
Cheers
Comment #2
wim leersTo be honest, I think Hierarchical Select should be rewritten in Drupal 8.
Hierarchical Select was developed for Drupal 5, then ported to 6, and (mostly) ported to 7. During the majority of those years, graceful degradation (i.e. still working when JS is not enabled) was a must. Now, it's no longer a must, it's rather silly.
This module could be an order of magnitude simpler to maintain if it were doing the majority of its work in JS, and if it'd just rely on API endpoints to talk to the server.
That being said, if you want to port this to Drupal 8, you're of course more than welcome to. But given how difficult it is to maintain this module, given how many Drupal custom & contrib modules override forms in stupid, broken, bad ways, following the same fundamental architecture is going to be full of frustration.
Comment #3
marthinal commentedI agree with you about rewrite the module. I was learning how exactly it works while porting and yes probably makes no sense to port the same code.
If I have time I would like to think about the best way to do this functionality. :)
Anyway the repo is available if anyone wants to continue porting.
Thanks!!
Comment #4
wim leersI'd say we'd want to use https://select2.github.io/examples.html, and tie multiple of those Select2 instances together dynamically. That'd even make it portable (not specific to Drupal). Couple that with a hierarchy iterator API, and we're 90% of the way there, with 2000% less maintenance hassle :)
Comment #5
user654 commented.
Comment #6
marthinal commented@Wim Leers that's exactly what I was reviewing this morning. :)
This issue is interesting #2346973: Improve usability, accessibility, and scalability of long select lists
Sounds great! :)
I need to investigate a little bit more. So I hope to have time during this weekend.
Comment #7
stefan.r commentedAnd maybe that rewrite could be backported into a D7 Hierarchical Select 4 (without graceful javascript degradation)? :)
Comment #8
marthinal commentedI was working a little bit on it and based on the concept of shs module I made some progress.
https://github.com/marthinal/hselect2
Comment #9
stefan.r commentedGreat! Since no-one is working on a D8 version of Hierarchical Select and @Wim Leers favors a rewrite similar to this, if you're interested we can post it as the 8.x version of this project so it has better visibility (once it's ready)?
Let me & @Wim Leers know when you consider this ready for review so we can commit once it's RTBC.
Comment #10
marthinal commentedSure!
I've created this sandbox https://www.drupal.org/sandbox/marthinal/2469075 but we can use the code for the new HS version.
Comment #11
walkero commentedHow is the development of this module going? Will we see final version in the future? Will it be able to upgrade from D7 hierarchical_select?
Comment #12
nwom commentedI'm looking forward to this! I'm about to start a new project in Drupal 8, and this is one of the only necessary modules that hasn't been ported yet. I'm rooting for you guys!
Comment #13
kriboogh commentedAny progress on this? We need this type of functionality in our ongoing project, we als need to be able to add new levels in the hierarchy, is this lined-up too?
Comment #14
marthinal commented@kriboogh AFAIK SHS module is under development for D8. You should take a look there.
Comment #15
hugronaphor commentedhttps://www.drupal.org/project/shs
Comment #16
summit commentedHi, https://www.drupal.org/project/shs has not the functionality to use term lineage.
The great thing from HS in my perspective was easily to add a deeper term to a node, and then the whole lineage would be integrated.
So a node about a place within a city would be shown within the country, province and city term view.
What module is for Drupal 8 now suggested to be able to build and edit nodes easily with this same functionality of adding the term lineage with a nice UI?
Thanks for your reply in advance,
greetings, Martijn
Comment #17
summit commentedPlease, please, I really need the HS functionality on Drupal 8.
How else can I add Country, Province, Place to a specific Node?
greetings, Martijn