speechanddebate / tabroom

Tabroom.com Legacy Perl/Mason Code
https://www.tabroom.com
Other
14 stars 6 forks source link

Add the Title field to webpages so that tab names are more descriptive #34

Open bmorrissirromb opened 10 months ago

bmorrissirromb commented 10 months ago

Previously,

All Tabroom.com web instances appeared identical in tabbed browsing, each displaying the generic label Tabroom.com.

image

If you had several tabs open, this made it extremely difficult to select the right one. It also makes it hard to return to a closed tab via browser history, since the Title is indexed in most browser histories, but it's only indexing Tabroom.com instead of any useful information. So typically, users need to re-navigate the whole site instead of just typing "Glenbrooks" or something to get back to where they were.

Now,

Major Tabroom subpages have titles that reflect their purpose.

image

There's probably others that could use a descriptive name, but these are probably the biggest "bang for your buck" pages.

bmorrissirromb commented 10 months ago

@palmertab - Let me know if there's a better way to submit issues for UX stuff like this, or whether you'd want PRs to try to implement this or not. I want to help Tabroom improving, but recognize that you have a shit ton of competing priorities.

benjmor commented 9 months ago

Okay, so there's actually some interesting stuff happening here. The setup and register subpages will display descriptive titles, but most tourn subpages will not. This is likely due to the $tourn variable not being populated for them.

This is the block that controls what the title of ALL Tabroom webpages will be: https://github.com/speechanddebate/tabroom/blob/62c5114e23f501f6e8274e124542db98333685af/web/autohandler#L368

Now to see what it would take to get that populated...

benjmor commented 9 months ago

The $tourn variable should be populated a little bit after the Tab::Tourn object is created.

https://github.com/speechanddebate/tabroom/blob/master/web/lib/Tab/Tourn.pm

There doesn't seem to be a retrieve method within Tab:Tourn. Maybe it's inherited? Checking...

benjmor commented 9 months ago

Ok, so retrieve is coming from Class:DBI which is some Perl built-in. Fun.

Time to do some inference on whether it's $tourn not being populated or whether the start property is missing.

benjmor commented 9 months ago

Issue is definitely that $tourn is not being populated for typical tourn webpages...

benjmor commented 9 months ago

All righty. So, $tourn is apparently a special variable, used to access tournament specific data and not to be messed with!

We should instead update the autohandler in subpages that need more descriptive titles.