Author Topic: User page link in the top links bar  (Read 301 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2105
  • Last Login:Today at 10:12:31 pm
User page link in the top links bar
« on: February 14, 2021, 11:20:15 am »
On tmstage.teresco.org, I have an implementation of https://github.com/TravelMapping/Web/issues/622 which adds a link to the top bar on all TM page to the current user's main page.  It's omitted if no user is specified in the URL or found in a browser cookie.  While in that file, changed "Home" to "TM Home" and "Traveler Stats" to "Travelers Stats".

I'll put these on the main site soon unless I hear major objections or someone notices that the change broke something.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3136
  • Last Login:Today at 04:37:55 pm
Re: User page link in the top links bar
« Reply #1 on: February 14, 2021, 03:41:17 pm »
"User joecool page" wording looks a bit awkward... "joecool's User Page" OTOH would be inconsistent with all the other links in the header capitalized. Assuming smashing case of usernames here is undesirable. "User Page for joecool?" Not a sbiug big deal; I'm sure I can get used to this too.

Quote
"Travelers Stats"
How about "Travelers' Stats", plural possessive?
« Last Edit: February 14, 2021, 09:35:02 pm by yakra »
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline SSOWorld

  • Full Member
  • ***
  • Posts: 147
  • Last Login:Today at 09:32:51 pm
Re: User page link in the top links bar
« Reply #2 on: February 14, 2021, 03:54:13 pm »
"User joecool page" wording looks a bit awkward... "joecool's User Page" OTOH would be inconsistent with all the other links in the header capitalized. Assuming smashing case of usernames here is undesirable. "User Page for joecool?" Not a sbiug deal; I'm sure I can get used to this too.

Quote
"Travelers Stats"
How about "Travelers' Stats", plural possessive?
apostrophes? There is NO way that is MUTCD Compliant ;)
Completed:
* Systems: WI
* by US State: AR: I; AZ: I; DE: I; IA: I, KS: I; MN: I; MA: I; MO: I; NE: I; RI: I; SD: I; WA: I; WI: I,US,WI;

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3136
  • Last Login:Today at 04:37:55 pm
Re: User page link in the top links bar
« Reply #3 on: February 14, 2021, 04:14:25 pm »
apostrophes? There is NO way that is MUTCD Compliant ;)
Suddenly viewing https://github.com/TravelMapping/Web/pull/287 in a new light...
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2105
  • Last Login:Today at 10:12:31 pm
Re: User page link in the top links bar
« Reply #4 on: February 14, 2021, 08:31:41 pm »
I like the @yakra suggestions above, and made the changes on tmstage.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3087
  • Last Login:Today at 01:36:23 pm
Re: User page link in the top links bar
« Reply #5 on: February 15, 2021, 03:19:54 am »
Odd. There is also a change on the main site! Null :D https://travelmapping.net/?u=null


Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2105
  • Last Login:Today at 10:12:31 pm
Re: User page link in the top links bar
« Reply #6 on: February 15, 2021, 08:06:08 am »
Did null get in by specifying it intentionally or did that just happen in a situation where no user was ever selected?

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3087
  • Last Login:Today at 01:36:23 pm
Re: User page link in the top links bar
« Reply #7 on: February 15, 2021, 11:10:11 am »
It's default. My cookies are always cleaned on closing the browser. I just put it to the link so that your user cookie is overwritten.

1. https://travelmapping.net/user/?u=1 '1's User Page'
2. Select "[None selected]"
3. Press "Apply" --> issue #1 Header is not updated, still '1's User Page'
4. Press "TM Home" or any other page -> issue #2 'None's User Page' instead of hidden
« Last Edit: February 15, 2021, 11:25:04 am by michih »

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2105
  • Last Login:Today at 10:12:31 pm
Re: User page link in the top links bar
« Reply #8 on: February 15, 2021, 11:29:43 am »
I think it should be better now.  Handles either the cookie or u= QS param properly, I believe.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3087
  • Last Login:Today at 01:36:23 pm
Re: User page link in the top links bar
« Reply #9 on: February 15, 2021, 11:34:12 am »
I've edited the post just a few minutes before you wrote and it is still as described on the main site and on tmstage.

issue #1 only happens when the user is changed, it's immediately updated when it changes from "none" to a user.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2105
  • Last Login:Today at 10:12:31 pm
Re: User page link in the top links bar
« Reply #10 on: February 15, 2021, 01:01:35 pm »
Might finally be good now.  There was an unexpected interaction between user set by QS and saved in cookies.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3087
  • Last Login:Today at 01:36:23 pm
Re: User page link in the top links bar
« Reply #11 on: February 15, 2021, 01:06:54 pm »
yep, looks good now :)