Skip to content

Issue Labeler - Description Textbox: Display over-limit prompt: "exceeds by N characters" when the description exceeds 100 characters. #99

@srikanth-kumar

Description

@srikanth-kumar

Description

Currently, GitHub Issue labeler shows a generic error for overlong descriptions:

Description is too long (maximum is 100 characters) (see screenshot below).

This increases the time users spend editing the Description field in cases of overlong description because they cannot see how many characters to remove without using an external character counter tool.

Suggested Solution

  • Prompt the minimum number of characters to be reduced. For instance, " Trim the message by 17 characters (limit: 100)".
    or
  • Prompt the number of characters over the limit. For instance, "Over by 17 characters (limit:100)".

Alternate Solution

  • Continue with current sub-optimal error prompt which requires users to use an external tool to determine minimum number of characters to trim.

Code to demonstrate issue

Image

Checklist for Completion

  • Add the logic to compute excess - max(0, input_length - 100) when input > 100
  • Customize the error prompter to prompt one of the suggested solutions
  • Add unit / integration tests for boundary / edge cases (99 / 100 / 101 characters)
  • Update relevant documentation for the Description field error behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions