# Better handling of site settings with large amount of content (big lists)

**URL:** https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042
**Category:** Feature
**Created:** [17 juni 2018 om 01:08 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042 "2018-06-17T01:08:09Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [27 juli 2018 om 03:32 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/24 "2018-07-27T03:32:56Z")

</div>

This is using value-list which already has drag-and-drop but makes editing impossible, if you want to edit you have to delete row and recreate it, because all events on the row are for drag/drop.

So my options:  
1- modify directly value-list, remove drag and drop, and make edit on row click  
2- duplicate value-list (unordered-value-list?) removes drag and drop and make edit on row click

If you tell me,; just remove drag and dropd everywhere it doesn’t work I will go with 1. So far I have done 1, going to 2 is a matter of few minutes.

To make editing the simplest possible I made the following choices:

Click a row will remove it from selection, and put it in “add input”:

 ![39](https://global.discourse-cdn.com/meta/original/3X/f/9/f982fd8b59e65a2d471b670c4653a128327e904f.png)

If you already had something in “add input” when clicking on a row, this content will be added to selection before being replaced by the content for the clicked row:

 ![54](https://global.discourse-cdn.com/meta/original/3X/1/c/1cdefcaed5b4efa004a1f2c4b2bcb2241a31c975.png)  
In this example I had “test” in the “add input” and clicked on “something,[http://www.google.fr](http://www.google.fr)” row

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [27 juli 2018 om 16:53 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/25 "2018-07-27T16:53:46Z")

</div>

@sam Could you review it please [FEATURE: introduces list/compact\_list components by jjaffeux · Pull Request #6194 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/6194) ?

I went for a new component so I could test/refactor it more easily. We could remove {{value-list}} in the future very easily.

I added support for `list_type` in a site setting, this way compact\_list is usable everywhere but doesn’t duplicate all the list logic.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [3 augustus 2018 om 20:54 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/26 "2018-08-03T20:54:06Z")

</div>

I just merged it. And made a few changes from the initial plan.

 ![25](https://global.discourse-cdn.com/meta/original/3X/3/5/359a776de8e541555d26e8a28d1dec3afcf69454.png)

- I completely replaced `{{value-list}}` by this
- It’s an hybrid component using a select-kit combo-box and some custom HTML
- Drag an drop support is dropped, because you can now directly edit each line

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [4 augustus 2018 om 00:02 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/27 "2018-08-04T00:02:00Z")

</div>

There are two major TODO items left on this:

- I need to push one select-kit improvement, currently select-kit will not expand if you click on it and there are no selectable items left. Even if we allow to create items, in this case I would want it to expand with the create row already displayed and ready to take input.
- You can edit an existing input, but the save/cancel buttons will only show when you focusout of the input. I didn’t have a trivial way to fix it for now, will think more about it.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [6 augustus 2018 om 03:40 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/28 "2018-08-06T03:40:40Z")

</div>

I have the fix for first item of this TODO: [FIX: display select kit body if no choices by jjaffeux · Pull Request #6237 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/6237)

Will write a test for this and then push it tomorrow.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [30 augustus 2018 om 12:33 UTC](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042/29 "2018-08-30T12:33:22Z")

</div>



[Previous page](https://meta.discourse.org/t/better-handling-of-site-settings-with-large-amount-of-content-big-lists/90042.md?page=1)
