Stats App Testing – 3 issues.

Resolved.
Functionality:
1. Add version# to index page on percentage stats and view stats or look is very confusing and actually can't tell which one to edit. (test data didn't show it!). DONE.
2. *** Allow 1 chr for 'nickname' in browser. (For Opera – 'O') FIXED (model). (functionality).

Usability:
1. Replace 'All's on view_stats and percentage_statistics with blanks or dashes? DONE – used .sub("All","") on each of the 6 variables that can have an 'All'. Greatly improved look! Made sure to use sub rather than global gsub to ensure that extra All's within names are not caught by mistake!
Extracted the common search elements into:
<% look_for = 'All' %>
<% sub_it = '-' %>
then use "database_column".sub(look_for, sub_it ) for the values.
Even if this logic shouldn't be in the view, this is at least better OO code, as now I can just change the search criteria AND replacement strings in just ONE place!
… even better (forward planning): (will allow for users putting various capitalization of 'All').
<% look_for = /ALL|ALl|All|all|aLL|alL|AlL|aLl/ %>
and
"database_column".sub(look_for, sub_it ) stays the same

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s