San Francisco, CA
Computer scientist, programmer, and dental student.
type:enhancement added by ~ethanmad on ~ethanmad/bouts.app
Ticket created by ~ethanmad on ~ethanmad/bouts.app
#What is this about?
We need a help page (/help) which includes links to our man page (https://man.sr.ht/~ethanmad/bouts.app/), to our issue tracker to submit bugs and feature requests (https://todo.sr.ht/~ethanmad/bouts.app) and suggests sending an email to support as a last resort.
The footer should link to this help page.
#How to fix it?
- Create
views/static/help.gohtml
with those links as theyield
(seeviews/static/contact.gohtml
).- Update the Static controller to support the help view.
- In
main()
, handle the/help
route.
Ticket created by ~ethanmad on ~ethanmad/bouts.app
#What is this about?
The match summary should be displayed at the top of the match information, above the table of bouts.
#How to fix it?
In Match controller
Show
, include the tallies of wins in the data passed to theShowView
, then render the wins for each team in parentheses next to the team names.
priority:low added by ~ethanmad on ~ethanmad/bouts.app
priority:med removed by ~ethanmad on ~ethanmad/bouts.app
Comment by ~ethanmad on ~ethanmad/bouts.app
Tasks to complete:
- [X] Add
Bye bool
field to Fencer with default value =false
- [X] Add BYE Fencer in
SquadService.Create
- [X] Add
fencerValFn
s to ensure no manually created fencers haveBye = true
or names similar to "bye"- [X] Update
FencerService.All
,FencerService.ByCategory
to exclude fencers for whomBye=true
- [X] Update
SquadService.FencersByID
to exclude fencers for whomBye = true
- [X] Check that no functions returning
[]Fencer
include fencers for whomBye=true
(checked bygit grep "(\[\]Fencer"
)- [X] Write a new method on
SquadService
which returns Fencers for whomBye = true
- [X] Use the new method in the Match Controller Edit method instead of
FencersByID
- [X] Exclude bouts with only one bye fencer from seeding calculations (change
fencerService.BoutsByID{,s}
)- [X] Modify bout scoring methods to allow equal score when at least one fencer has
Bye = true
- [X] Modify callers of bout scoring methods to provide necessary information to scoring methods
- [X] Ensure matches can end in ties
- [X] Prevent access to update route for bye fencer (will error due to
notBye
validator function)- [X] Include ties in Squad Show view record
- [X] Factor ties into squads elo calculations (done previously)
- [X ] Include bye bouts in Fencer controller/view (perhaps as a "Total Bouts" field which includes byes, or just by showing byes alongside real bouts)
- [ ] Italicize bye fencer's name in Match Edit view - determined to not have good cross-platform support; abandoned
- [ ] Add/fix BYE Fencer if needed to existing squads (not sure where) - determined to be unnecessary; abandoned
~ethanmad assigned ~ethanmad to #16 on ~ethanmad/bouts.app
Comment by ~ethanmad on ~ethanmad/bouts.app
The first way listed seems to introduce a loss of information: the present fencer in a bout against a missing fencer will not get recorded. So I will try this using BYE fencers on each squad.
To do this, we can add the BYE fencer during the Create method of the Squad service. This fencer should only be rendered on the Match edit page. The fencer should be excluded from calculations. So we will modify the query method to return all fencers in a squad except for the BYE fencer (distinguishing by name or another field) and add a new query method to include all fencers and the BYE fencer. The edit page will use the new query method.
If the BYE fencer is distinguished by name, then we must add a validation to ensure other fencers cannot be named similarly. If the BYE fencer is distinguished by a new field, the above validation is still useful, but things will likely be more robust. I propose adding a boolean field named "real" or "human" or "bye" to the Fencer struct.
We also need to determine how to score a bout with a missing fencer. Ideally, the score will be 0-0 and the validator will accept that.
Similarly, matches can result in ties now so we need to be able to handle that. A winner can still often be determined by indicator or total touches scored, but not always.