Travel Mapping
Web Design Discussion => General Web Design Discussion => Topic started by: Jim on May 31, 2022, 10:42:21 pm
-
Many tables in TM are sortable by different columns by clicking on the column header. The table sorting library we have been using for years has had some problems. I've gone through and replaced all sortable tables with the one at https://github.com/tofsjonas/sortable .
Please try sorting tables on various pages on the staging server, https://tmstage.teresco.org/ , and let me know if you notice any problems. Functionality should be very similar to what we had before, except it should work more consistently. If things are looking good after a short testing period, I'll install this version on the main site.
-
Is the functionality there yet? The tmstage site shows an ongoing update.
-
Is the functionality there yet? The tmstage site shows an ongoing update.
Should be. The ongoing update messaging was a remnant of a previous test of something else, which I've now removed.
-
The total clinchable in the stats table for a region IMO should not be sortable. Nothing else noticeable from what I have seen.
I would like to be able to sort the line at the top of the Route Finder, but I presume that may be a loading issue.
-
The user page table content should be right-aligned again.
The total clinchable in the stats table for a region IMO should not be sortable.
Why?
-
The total clinchable in the stats table for a region IMO should not be sortable.
Why?
Personally, I do not like it getting in the way of usernames especially if I ever want to use the data in a personal spreadsheet.
-
@Jim, have you changed anything in the last three hours? The user page (https://tmstage.teresco.org/user/?u=michih) tables are sorted by region and system name now. I'm quite sure that it was by clinched miles (region) and % clinched three hours ago - just as it should be!
-
The total clinchable in the stats table for a region IMO should not be sortable.
Why?
Personally, I do not like it getting in the way of usernames especially if I ever want to use the data in a personal spreadsheet.
You don't need to sort it if you don't want to. I thinkt it's fine that it's possible.
-
@Jim, have you changed anything in the last three hours? The user page (https://tmstage.teresco.org/user/?u=michih) tables are sorted by region and system name now. I'm quite sure that it was by clinched miles (region) and % clinched three hours ago - just as it should be!
I haven't, but I bet I need to specify an initial sorting that differs from the order that comes out of the DB in those cases.
-
The total clinchable in the stats table for a region IMO should not be sortable. Nothing else noticeable from what I have seen.
Agreed, that should not move from the top. I will see what I can do.
I would like to be able to sort the line at the top of the Route Finder, but I presume that may be a loading issue.
If I understand what you mean, I think that shouldn't be too hard. So you'd like to be able to sort by each of the column headers on findroute.php? I just have to make sure the filter drop-downs are excluded.
-
If I understand what you mean, I think that shouldn't be too hard. So you'd like to be able to sort by each of the column headers on findroute.php? I just have to make sure the filter drop-downs are excluded.
Basically.
-
@Jim, have you changed anything in the last three hours? The user page (https://tmstage.teresco.org/user/?u=michih) tables are sorted by region and system name now. I'm quite sure that it was by clinched miles (region) and % clinched three hours ago - just as it should be!
I haven't, but I bet I need to specify an initial sorting that differs from the order that comes out of the DB in those cases.
The version on tmstage should now sort as it did before.
Is this the behavior we want? I am not sure why the by-region table sorts by distance traveled while the by-system sorts by % traveled.
-
Sorting by percentages for each region puts the values in order by the first or second digit. This means that 100.00% values appear after the 19-11.x% values, but all 10.xx% values appear after the 100%. Then 1.xx% values appear after 10%, instead of below the 9.99-2.00%, et cetera.
Otherwise, I do like the ability to sort the column headers (for example, finding the longest or shortest routes in a system).
-
I think I've fixed all the problems mentioned here, and added column sorting functionality on findroute. Check out the current version on tmstage and let me know if I missed anything.
-
At the top of the page, the stats page is not showing the color on distance traveled for me for active only now.
I am also getting an "out of memory" error whenever I try to use the route finder. I want to think it was something on my end, but I am unsure.
-
At the top of the page, the stats page is not showing the color on distance traveled for me for active only now.
Fixed.
I am also getting an "out of memory" error whenever I try to use the route finder. I want to think it was something on my end, but I am unsure.
Works for me, but I've only tested so far on one high-end MacBook Pro. It's possible that we won't be able to use the sortable.js functionality on a table that starts with 90,000+ rows without overwhelming memory capabilities of many browsers.
-
Maybe it is the 90,000 rows, but the current version on the main Travel Mapping site is still working fine for me....
It seems to happen in the tmstage version when I click in the route name search field or elsewhere.
-
Maybe it is the 90,000 rows, but the current version on the main Travel Mapping site is still working fine for me....
It seems to happen in the tmstage version when I click in the route name search field or elsewhere.
I think it's the extra memory used when the sortable code is applied - it attached things to every row. I could see this easily doubling or more the memory requirements in JS to store and deal with the sorting of the table compared to the version that didn't have this. Remember that the current production version doesn't support sorting at all.
-
I guess it is best to go without sorting the Route Finder for now until we can find ways to reduce memory to do it. We can already somewhat sort it beyond the route name anyway so it is not that huge of a deal to be able to sort the columns.
-
I've got a version of findroute on tmstage now that puts in a button you can use to enable column sorting. I don't think it should have any memory (or other) resource utilization beyond what the production version has until you click that button to turn on the functionality.
-
Thank you. The Route Finder on tmstage now works fine for me without sorting.
-
@Jim, have you changed anything in the last three hours? The user page (https://tmstage.teresco.org/user/?u=michih) tables are sorted by region and system name now. I'm quite sure that it was by clinched miles (region) and % clinched three hours ago - just as it should be!
I haven't, but I bet I need to specify an initial sorting that differs from the order that comes out of the DB in those cases.
The version on tmstage should now sort as it did before.
Is this the behavior we want?
I think so.
I am not sure why the by-region table sorts by distance traveled while the by-system sorts by % traveled.
I'm used to it and like it as-is. I don't wanna see this being changed.
-
I've got a version of findroute on tmstage now that puts in a button you can use to enable column sorting. I don't think it should have any memory (or other) resource utilization beyond what the production version has until you click that button to turn on the functionality.
It doesn't run out of memory for me but it takes a lot of power (browser slows down) and it's not working correct nor is usable (sorting takes 3-15 seconds and I easily managed that sorting by tier was a total mess 2-2-2-3-3-3-3-2-2-2....). There is no added value (right now).
-
I've installed the latest on the production server, including the button that turns on optional sorting for findroute. I think everything else is as good as or better than it was before, and no one who doesn't want to use the sorting on findroute is forced to press the button to turn it on.
-
It seems that HB (https://travelmapping.net/hb/) systems are sorted by code instead of country (first) + tier (second) now. Since the country column is the first one, it starts with Netherlands, followed by Africa, Finland and Albania now.
-
It seems that HB (https://travelmapping.net/hb/) systems are sorted by code instead of country (first) + tier (second) now. Since the country column is the first one, it starts with Netherlands, followed by Africa, Finland and Albania now.
Initial sort is now however it came out of the DB. I can pretty easily make it sort the way it was before, if that's the preference. I don't know how people tend to look at that list. I always just search for the system code I am looking for.
-
It seems that HB (https://travelmapping.net/hb/) systems are sorted by code instead of country (first) + tier (second) now. Since the country column is the first one, it starts with Netherlands, followed by Africa, Finland and Albania now.
Initial sort is now however it came out of the DB. I can pretty easily make it sort the way it was before, if that's the preference. I don't know how people tend to look at that list. I always just search for the system code I am looking for.
I think we should keep it as-was because people are used to it. We can change it if there is any improvement but I don't see it. The system code is just a "TM internal code". Sure, old hands are used to the code but newbies don't. Newbies likely look for the country or region first.
-
While I'm in hb/index.php again, any thoughts on the current practice in the "Country" column that any country name longer than 15 characters is replaced by its 3-character code?
-
While I'm in hb/index.php again, any thoughts on the current practice in the "Country" column that any country name longer than 15 characters is replaced by its 3-character code?
It's fine for USA, obviously. DRC is OK. But TTO, STP, etc are a bit "huh?".
-
Now on tmstage is a version of hb/index.php that sorts by default first by country, then breaks ties with tier, then breaks ties with system name. If no one notices any problems with that on Saturday, I'll install it on the main server.