Skip to content

Add character counter to most text input boxes - #34

Merged
maplethorpej merged 1 commit into
Packstack-Tech:masterfrom
darinalleman:add-character-counters
Jan 14, 2021
Merged

Add character counter to most text input boxes#34
maplethorpej merged 1 commit into
Packstack-Tech:masterfrom
darinalleman:add-character-counters

Conversation

@darinalleman

Copy link
Copy Markdown
Contributor

character-counters

Adds character counters to the following text entry areas:

Pack View

  • Location/Trail
  • Field Notes
  • Temp Range
  • Season

Inventory Sidebar View

  • Item Type
  • Product Name
  • Product URL

The character counter text color changes to red if the entered length is greater than the allowed length. The allowed length values were found in the database. It is certainly possible to set a "max length" where the user would not be able to enter more than the allowed length, but since users are very likely to be copy/pasting data, I don't think we'd want to automatically trim it. I think just showing that they are over the max is enough.

Along the same lines, I think it would be worth improving the error messages. If you try to save a pack or an item with text that is too long, it just shows a generic error. I think it would be nice to specify what field caused the error (if that could be determined). Or at the minimum, don't allow the user to click "Add Item" or "Save Pack" if any of the fields are over their allowed limit.

@maplethorpej
maplethorpej merged commit a063c87 into Packstack-Tech:masterJan 14, 2021
@darinalleman
darinalleman deleted the add-character-counters branch February 14, 2021 16:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@darinalleman@maplethorpej