Tekki / sql-ledger

:books: The most advanced SQL-Ledger version.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select2 integration

lkraav opened this issue · comments

Hi. Everybody probably agrees that getting rid of 10km long HTML <select> elements is good for the user experience.

@Tekki have you perhaps researched integrating any of the user friendly select controls into SL, such as https://select2.org

Wondering if there are any significant roadblocks, or perhaps it could be relatively plug n play.

commented

I'm sure you know that you can configure the max. length of a select in "Preferences--Dropdown Limit", so your question is about something else.

I've used Select2 or similar elements in many other projects. If you checkout the experimental branch "23_mrp" and navigate to "MPR--Part Requirements", you see something like that. This is combined with a new way to create the UI, using Vue.js.
It is not a big thing to implement Select2 into the existing code. The downside is that it's based on jQuery, so you soon get code that is slow and difficult to maintain.

I'm sure you know that you can configure the max. length of a select in "Preferences--Dropdown Limit", so your question is about something else.

I didn't know this, but how does it help? If my bookkeeping wants to find a specific supplier in a list of 1000, I can't restrict the dropdown - what if the one they're looking for gets excluded by the restriction?

Or maybe I misunderstand how the restriction works.

Wrt jQuery, indeed select2/select2#3652 they're apparently still working on it (or not).. Not sure if there's a real alternative out there.

To me, loading jQuery would be far worth it for the better UX. I guess I'll look into it.

commented

If you set the Dropdown Limit to 50 and you have 51 customers, instead of a select the program will display a search field. We and most of our customers have set the limit to zero, so we never see the dropdown.
For the rest, I'm not sure if you've read my comment to the end, because I said the implementation of select2+jQuery would be simple, and I show an alternative.

If you set the Dropdown Limit to 50 and you have 51 customers, instead of a select the program will display a search field. We and most of our customers have set the limit to zero, so we never see the dropdown.

Wow, that sounds great, trying it out right now.

For the rest, I'm not sure if you've read my comment to the end, because I said the implementation of select2+jQuery would be simple, and I show an alternative.

I read everything you write. Maybe my reply didn't include the acknowledgement clear enough. Vue.js of course sounds great, but it's foreign territory to me and mental space is already overloaded with other tech issues across my businesses. Will definitely keep in mind to try to find time to check your branches out - SL certainly needs a massive UX overhaul altogether (which I think also LedgerSMB has been working on for a long time, for one).

Hmm, is it possible to set this $vclimit = 0 value system-wide, or each user has to manually set their preferences?

commented

Hmm, is it possible to set this $vclimit = 0 value system-wide, or each user has to manually set their preferences?

Use sed to delete all lines starting with vclimit from users/members and users/*.conf.

Vue.js of course sounds great, but it's foreign territory to me...

Nobody asks you to have detailed technical knowledge of these things. If you have time, open Part Requirements and take a look at the source code. The target is to separate the logic from the UI, while it looks still the same for the user, at least at the beginning.

...certainly needs a massive UX overhaul

If we start to use jQuery on the old UI now, we will never change anything.

commented

Closing this, no activity since 2 years.