News:

The AARoads Wiki is live! Come check it out!

Main Menu

Web / Frontend Development

Started by Thing 342, January 02, 2016, 11:37:18 AM

Previous topic - Next topic

Thing 342

We don't currently have a dedicated thread for discussion of development for the site web interface, so I thought I'd start one. Post any questions / ideas / feature requests in here.

If you'd like to test drive the new userpages that we've been working on over the past few weeks, take a look here. It's mostly finished, but there will be bugs.
If you have any issues, let them be known here.


mapcat

#1
Remove the www in the link to get to the pages.

At first glance: the user map pages don't render well on my phone. The stats on the right side cover part of the map and the header is jumbled.

Is it possible to get data that include the in-development systems?

Routes in the never to be developed systems, like cansph, could be eliminated from the lists.

When sorting user stats by the % column, could it be coded to do a secondary sort by the total route length rather than just listing all 100% routes in random order?

Thing 342

Didn't really have mobile in mind when programming it, was mostly focused on functionality. That'll probably be what I'll work on next, however.

mapcat

Quote from: Thing 342 on January 02, 2016, 01:45:55 PM
Didn't really have mobile in mind when programming it, was mostly focused on functionality. That'll probably be what I'll work on next, however.

Thanks--I'll investigate more when I get home later and have access to a desktop.

Thanks for putting in all the work so far. Overall it has a clean look and is easy to use.

IMGoph

Quote from: Thing 342 on January 02, 2016, 11:37:18 AM
We don't currently have a dedicated thread for discussion of development for the site web interface, so I thought I'd start one. Post any questions / ideas / feature requests in here.

I was thinking having a couple maps pointing out what areas are available for recording stats, on whatever becomes the main page, would be nice.

They should be simple choropleth maps, like
https://en.wikipedia.org/wiki/File:Same-sex_marriage_in_the_United_States_prior_to_Obergefell.svg, https://en.wikipedia.org/wiki/File:European_Union_member_states_by_form_of_government.svg, or https://en.wikipedia.org/wiki/File:DOLLAR_AND_EURO_IN_THE_WORLD.svg
(with easily readable colors, of course).

english si

I like it. It's definitely the right direction and is certainly functional.

It would be nice on the highway browser page, if there could be links to the region and system, rather than going back to the main HB page.

Also good, especially for the new users, would be a page with systems (country, code, name, description?, tier, status, HB link) and another with regions (something like a table with: Continent, Country Code, Country Name, Region Code, Region Name, HB Link - that one would be a bit harder to do as it is more than one table to use), to use as springboards for highway browsing.

Sortable tables would be very useful too.

One thing I note is that we are lacking many shields (I can see US, I- and AZ routes) and haven't got banners sorted.

michih

#6
Cool :D

Why a new thread, we already had one: https://www.aaroads.com/forum/index.php?topic=17071 !?

Anyway, some comments:

- Mileage values should have two positions after decimal point only (looks quite strange with up to 4) like it's already designed in the table of the map
- Milage and percent values should generally be right-aligned
- There should be an indication in the header line of the column the table is sorted
- There should be a filter (maybe first step like in the highway data browser?)
- Clicking on the table I get errors like "The requested URL /user/user/region.php was not found on this server."; what should be opened there (maybe not yet implemted but what is intended to be displayed?)
- EDIT: A new column "Browser" would be great to link directly to the Highway Data Browser with corresponding filter
- EDIT: The headlines like "Overall Stats" are displayed twice. I think the first table row is not required

Map:
- Opening any map I always get a warning "Warning: Cannot modify header information - headers already sent by (output started at /home/www/tmtest/hbtest/mapview.php:71) in /home/www/tmtest/hbtest/mapview.php on line 74"
- The first row of the table on the right of the map should be fixed (not scrolling)
- The "Show Markers Displaying region:..." text of the map should be (much) smaller (it's overlapping the "Travel Mapping: Draft Map Overlay" text
- The "Show/Hide Table" button should be right-aligned like the table itself

And as already mentioned earlier:

Quote from: michih on December 24, 2015, 03:07:16 AM
- Rows should be numbered 1, 2, 3,... in a new column.
- Maybe a "hide column" feature so that I can reduce the table width, e.g. "status" is not necessary for me because the rows are already colored green/yellow/red.

But it's already a great step. Thank you very much :D!

oscar

Quote from: mapcat on January 02, 2016, 01:34:43 PM
Is it possible to get data that include the in-development systems?

If you mean the ones in "preview" status, for which we have stats generated in the alternate "devlogs", that might work. As for the others, one reason why those in-dev systems haven't graduated to "preview" is that we know there is (or aren't sure there isn't) weird stuff in them that can make the statistics, etc. useless or worse. For example, the files for a dozen or so newly-added routes in usaca point to a Russian highway so people can tell they're just placeholders, which I'll replace with real route files once I think I'm finished adding new business routes (stumbled across and added a newly-established one earlier this week, in fact).
my Hot Springs and Highways pages, with links to my roads sites:
http://www.alaskaroads.com/home.html

michih

Quote from: oscar on January 02, 2016, 03:14:47 PM
Quote from: mapcat on January 02, 2016, 01:34:43 PM
Is it possible to get data that include the in-development systems?

If you mean the ones in "preview" status, for which we have stats generated in the alternate "devlogs", that might work. As for the others, one reason why those in-dev systems haven't graduated to "preview"

All systems are currently displayed. I think there should be a button to include/exclude "preview" systems. Per default, only "active" systems should be displayed. I think in-development systems should not be displayed. Maximum the "Button" should be a selection box "active systems only" / "active and preview" / "all systems".

The current problem is that "in-dev" data is automatically displayed if one has already traveled a road of an active system from the same region........

Thing 342

Quote from: IMGoph on January 02, 2016, 02:48:04 PM
Quote from: Thing 342 on January 02, 2016, 11:37:18 AM
We don't currently have a dedicated thread for discussion of development for the site web interface, so I thought I'd start one. Post any questions / ideas / feature requests in here.

I was thinking having a couple maps pointing out what areas are available for recording stats, on whatever becomes the main page, would be nice.

They should be simple choropleth maps, like
https://en.wikipedia.org/wiki/File:Same-sex_marriage_in_the_United_States_prior_to_Obergefell.svg, https://en.wikipedia.org/wiki/File:European_Union_member_states_by_form_of_government.svg, or https://en.wikipedia.org/wiki/File:DOLLAR_AND_EURO_IN_THE_WORLD.svg
(with easily readable colors, of course).
This is definitely doable with a php-generated SVG image.



Quote from: michih on January 02, 2016, 03:00:32 PM
- There should be an indication in the header line of the column the table is sorted
- Clicking on the table I get errors like "The requested URL /user/user/region.php was not found on this server."; what should be opened there (maybe not yet implemted but what is intended to be displayed?)
- Opening any map I always get a warning "Warning: Cannot modify header information - headers already sent by (output started at /home/www/tmtest/hbtest/mapview.php:71) in /home/www/tmtest/hbtest/mapview.php on line 74"
These are bugs that I fixed in my latest commit. They should be put online whenever Jim pulls in updates for the test branch.



Quote from: english si on January 02, 2016, 02:57:22 PM
It would be nice on the highway browser page, if there could be links to the region and system, rather than going back to the main HB page.

Also good, especially for the new users, would be a page with systems (country, code, name, description?, tier, status, HB link) and another with regions (something like a table with: Continent, Country Code, Country Name, Region Code, Region Name, HB Link - that one would be a bit harder to do as it is more than one table to use), to use as springboards for highway browsing.
These could also be added fairly easily, possibly as a landing page for the highway browser (rather than loading all ~17360 routes which has a tendency to lag the page).
Quote from: english si on January 02, 2016, 02:57:22 PM
Sortable tables would be very useful too.
You can click the header for each column to sort by it. Hold SHIFT to sort by multiple columns.
Quote from: english si on January 02, 2016, 02:57:22 PM
One thing I note is that we are lacking many shields (I can see US, I- and AZ routes) and haven't got banners sorted.
Yeah, templates for those have to be added manually, and I've only had time to add a few for testing purposes. I added a generic looking shield for systems that haven't had a shield template added yet. Also, the shields may display incorrectly if you haven't got the Roadgeek 2014 fonts installed (see this thread for downloads)



Quote from: michih on January 02, 2016, 03:33:46 PM
Quote from: oscar on January 02, 2016, 03:14:47 PM
Quote from: mapcat on January 02, 2016, 01:34:43 PM
Is it possible to get data that include the in-development systems?

If you mean the ones in "preview" status, for which we have stats generated in the alternate "devlogs", that might work. As for the others, one reason why those in-dev systems haven't graduated to "preview"

All systems are currently displayed. I think there should be a button to include/exclude "preview" systems. Per default, only "active" systems should be displayed. I think in-development systems should not be displayed. Maximum the "Button" should be a selection box "active systems only" / "active and preview" / "all systems".

The current problem is that "in-dev" data is automatically displayed if one has already traveled a road of an active system from the same region........
This is probably a good idea. Currently, the site just shows whatever's in the systems table, but I can see why hiding systems without mileage would be desireable.

Jim

#10
I've just installed Thing 342's latest commits on http://tmtest.teresco.org .

This is a super start!

Please speak up if you see anything in this new stuff that should prevent it from becoming the default version at http://tm.teresco.org/  Mainly is there anything we could do before that mistakenly disappeared or broke?
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

michih

Is this a bug or a feature: http://tmtest.teresco.org/hbtest/mapview.php?u=michih&rte=A3 ?
All A3 routes of all systems are displayed :). The table stats is wrong though, I've clinched 100% of the German and Austrian A3 but 1.00% is displayed.

I was on my auta system stats page and clicked on A3....

english si

Quote from: michih on January 02, 2016, 04:24:07 PMIs this a bug or a feature: http://tmtest.teresco.org/hbtest/mapview.php?u=michih&rte=A3 ?
Both, I hope: a bug in how you got to it, but a nice (if a bit pointless) feature to have
Quote from: Thing 342 on January 02, 2016, 03:41:11 PM
Quote from: english si on January 02, 2016, 02:57:22 PMAlso good, especially for the new users, would be a page with systems (country, code, name, description?, tier, status, HB link) and another with regions (something like a table with: Continent, Country Code, Country Name, Region Code, Region Name, HB Link - that one would be a bit harder to do as it is more than one table to use), to use as springboards for highway browsing.
These could also be added fairly easily, possibly as a landing page for the highway browser (rather than loading all ~17360 routes which has a tendency to lag the page).
I've made a .csv file with the following fields region_code;region_name;country_code;country_name;continent_code;continent_name that might be useful for this (making it easier to work out). I can push it to the Github repository if desired.

Also - just realised it is remembering who I am (or whose stats I looked at last). Sweet!

Jim

Quote from: english si on January 02, 2016, 04:41:29 PM
I've made a .csv file with the following fields region_code;region_name;country_code;country_name;continent_code;continent_name that might be useful for this (making it easier to work out). I can push it to the Github repository if desired.

If you've got it ready, push it and I'll get the information into the DB to use as anyone sees fit.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

Thing 342

#14
Quote from: michih on January 02, 2016, 04:24:07 PM
Is this a bug or a feature: http://tmtest.teresco.org/hbtest/mapview.php?u=michih&rte=A3 ?
All A3 routes of all systems are displayed :). The table stats is wrong though, I've clinched 100% of the German and Austrian A3 but 1.00% is displayed.

I was on my auta system stats page and clicked on A3....
It's a bug, resulting from the fact that it just searches the database for route sections with the name "A3" without regard to if it's part of the correct route or not (for example, going to I-295's page will show all of the I-295s). It can be fixed by adding system and region constraints to the URL, but I don't remember if the page can handle both region/system and rte params at the same time.

For added fun: the rte param also supports pattern matching, with _ replacing a single character, and * replacing zero or more characters. (rte=I-*95  would show I-95 and all of its children, whearas rte=I-_95 would only show I-95's children)

Nexus 6P

english si

Quote from: Thing 342 on January 02, 2016, 04:56:29 PMFor added fun: the rte param also supports pattern matching, with _ replacing a single character, and % replacing zero or more characters. (rte=I-%95  would show I-95 and all of its children, whearas rte=I-_95 would only show I-95's children)
It gets better and better - I'm like a kid in a candy shop!
Quote from: Jim on January 02, 2016, 04:47:25 PMIf you've got it ready, push it and I'll get the information into the DB to use as anyone sees fit.
done

Duke87

#16
In terms of providing stats, it looks great!

One interesting bug I'm noting, though: once I select my username in the stats page, it seems to want to remember my selection when I return, but the link from the main page becomes broken.

Or, in more detail...
When I first went to http://tmtest.teresco.org/ and then clicked on "Traveler Stats", it took me to:
http://tmtest.teresco.org/user/
which shows all the route stats for a blank ("null") user with nothing clinched.
If I type "duke87" into the box at the upper left and hit submit query, I then get:
http://tmtest.teresco.org/user/?u=duke87
which correctly shows my stats.

However, when I then subsequently revisit http://tmtest.teresco.org/ and click on "Traveler Stats", I get:
http://tmtest.teresco.org/user/user?u=duke87
which is a 404 error. If I remove the second instance of the word "user" from the URL it is correct and works, but I need to do this manually.


This is in Firefox 43.0.3
If you always take the same road, you will never see anything new.

vdeane

Might be a good idea to have actual URLs too for the HB links from the stats table; would be a bit more user-friendly for those who don't think to click on the name, and it would allow one to queue up a bunch in separate tabs (nice when updating a .list file after a big trip).

Quote from: Duke87 on January 02, 2016, 09:25:42 PM
In terms of providing stats, it looks great!

One interesting bug I'm noting, though: once I select my username in the stats page, it seems to want to remember my selection when I return, but the link from the main page becomes broken.

Or, in more detail...
When I first went to http://tmtest.teresco.org/ and then clicked on "Traveler Stats", it took me to:
http://tmtest.teresco.org/user/
which shows all the route stats for a blank ("null") user with nothing clinched.
If I type "duke87" into the box at the upper left and hit submit query, I then get:
http://tmtest.teresco.org/user/?u=duke87
which correctly shows my stats.

However, when I then subsequently revisit http://tmtest.teresco.org/ and click on "Traveler Stats", I get:
http://tmtest.teresco.org/user/user?u=duke87
which is a 404 error. If I remove the second instance of the word "user" from the URL it is correct and works, but I need to do this manually.


This is in Firefox 43.0.3
Same thing in Chrome.  Probably an issue with how the page processes things.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Jim

Quote from: Jim on January 02, 2016, 04:47:25 PM
Quote from: english si on January 02, 2016, 04:41:29 PM
I've made a .csv file with the following fields region_code;region_name;country_code;country_name;continent_code;continent_name that might be useful for this (making it easier to work out). I can push it to the Github repository if desired.

If you've got it ready, push it and I'll get the information into the DB to use as anyone sees fit.

I didn't add this to the DB, because I don't think it adds any new information.  With appropriate SQL queries, names for countries and continents can be looked up.  I'd like to avoid adding redundant information to the DB.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

rschen7754

"Last updated" might be helpful, as well as forcing all percentages to have the same amount of decimals (i.e. 4.600%, not 4.6%).

But otherwise, apart from some nitpicks, it looks great and is probably close to being ready IMHO.

Thing 342

Quote from: vdeane on January 02, 2016, 09:29:36 PM
Might be a good idea to have actual URLs too for the HB links from the stats table; would be a bit more user-friendly for those who don't think to click on the name, and it would allow one to queue up a bunch in separate tabs (nice when updating a .list file after a big trip).

Quote from: Duke87 on January 02, 2016, 09:25:42 PM
In terms of providing stats, it looks great!

One interesting bug I'm noting, though: once I select my username in the stats page, it seems to want to remember my selection when I return, but the link from the main page becomes broken.

Or, in more detail...
When I first went to http://tmtest.teresco.org/ and then clicked on "Traveler Stats", it took me to:
http://tmtest.teresco.org/user/
which shows all the route stats for a blank ("null") user with nothing clinched.
If I type "duke87" into the box at the upper left and hit submit query, I then get:
http://tmtest.teresco.org/user/?u=duke87
which correctly shows my stats.

However, when I then subsequently revisit http://tmtest.teresco.org/ and click on "Traveler Stats", I get:
http://tmtest.teresco.org/user/user?u=duke87
which is a 404 error. If I remove the second instance of the word "user" from the URL it is correct and works, but I need to do this manually.


This is in Firefox 43.0.3
Same thing in Chrome.  Probably an issue with how the page processes things.

A known issue. The site remembers if a user has been there if u= has not been set via cookies. On user/index.php, it reloads the page with the u= param set, so that it can be shared using the URL. A typo had it redirect to a direction under /user, instead of unter the website root, producing the bad URL. I pushed a commit that should fix this.

Jim

Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

michih

Quote from: michih on January 02, 2016, 03:00:32 PM
Anyway, some comments:

I guess not all requirements can be implemented short-term. I've added issues on github to ensure that we don't forget them: https://github.com/TravelMapping/Web/issues. You can comment them there or close the issue if it's nonsense or when it's implemented.

Quote from: Thing 342 on January 02, 2016, 03:41:11 PM
Quote from: michih on January 02, 2016, 03:33:46 PM
Quote from: oscar on January 02, 2016, 03:14:47 PM
Quote from: mapcat on January 02, 2016, 01:34:43 PM
Is it possible to get data that include the in-development systems?

If you mean the ones in "preview" status, for which we have stats generated in the alternate "devlogs", that might work. As for the others, one reason why those in-dev systems haven't graduated to "preview"

All systems are currently displayed. I think there should be a button to include/exclude "preview" systems. Per default, only "active" systems should be displayed. I think in-development systems should not be displayed. Maximum the "Button" should be a selection box "active systems only" / "active and preview" / "all systems".

The current problem is that "in-dev" data is automatically displayed if one has already traveled a road of an active system from the same region........
This is probably a good idea. Currently, the site just shows whatever's in the systems table, but I can see why hiding systems without mileage would be desireable.

I didn't enter an issue because I think it's important and we should find a solution short-term.
If there's no "simple" solution, please enter an issue so that we don't forget it!

Jim

At the moment, the user stats I compute during a site update include only active systems in the default (TravelMapping) database, but both active and preview systems in the development (TravelMappingDev) database.  At some point, I plan to unify into a single DB, but with my break slipping away so quickly and having barely thought about the best way to do this, that's likely a summer project.

So here's how I think things should work:

Highway Browser: can display all routes, including those preview and devel systems, but which routes can show user stats depends on the DB chosen.  TravelMapping would show travels only for active routes, TravelMappingDev for both active and preview.

Everything else should completely ignore devel routes.  If devel systems are sufficiently complete for any kind of public consumption, they should be promoted to preview.  Given the current DB organization, if you want stats for only active routes, select the default DB, if you want both active and preview, select the Dev DB.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

bejacob

This is an excellent beginning. It's nice to be able to go to the front end and pull up maps of specific states without having to type things into the browser. Click and you're there.

I read somewhere that there are plans to be able to eventually click on an individual route and get stats/maps in all regions something akin to this http://cmap.m-plex.com/stat/highway.php?u=bejacob&r=co.i070.

I know we each have wish lists of what we want to see. I just want to add my voice to the chorus of thanks for what has been done so far and cheer on the next pieces of development.

Well done everyone.  :clap:

In the meantime, I'll keep updating my list as I travel and as more systems move into preview and active status.  :)



Opinions expressed here on belong solely to the poster and do not represent or reflect the opinions or beliefs of AARoads, its creators and/or associates.