Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a character count or visible warning to repo descriptions #14251

Closed
cooperg2001 opened this issue Jan 5, 2021 · 7 comments
Closed

Add a character count or visible warning to repo descriptions #14251

cooperg2001 opened this issue Jan 5, 2021 · 7 comments
Labels
good first issue Likely to be an easy fix topic/ui Change the appearance of the Gitea UI topic/ui-interaction Change the process how users use Gitea instead of the visual appearance

Comments

@cooperg2001
Copy link

  • Gitea version (or commit ref): 1.13.1
  • Git version: N/A
  • Operating system: N/A

Description

When entering a description for a repository a user may not know of the 255 character limit until after attempting to save their description. If a description exceeds 255 characters it is cleared when the user attempts to save. A character count should be added (or a visible warning of the limit) to the web interface to avoid having users retype descriptions if they forget or do not know of this limit. Potentially for long descriptions the warning could advise users to put information in the repo README instead.

Screenshots

Example of proposed change on Imgur: https://imgur.com/a/y5NcnGS

@a1012112796 a1012112796 added the topic/ui Change the appearance of the Gitea UI label Jan 5, 2021
@kins-dev
Copy link

kins-dev commented May 6, 2021

While a UI would be nice, I'm curious why there is a limit at all.

Is there a reason that this field is limited, or why the count is so low?

I was able to remove this limit in a test build with no ill effects for SQLite3. I don't think any of the other DB types would care either.

@schaffman5
Copy link
Contributor

schaffman5 commented May 9, 2021

@kins-dev Agreed since there are cases where repo descriptions slightly longer than 255 are useful. In models/repo.go, repo description is set to TEXT, so the limit seems to be code-only. Could this limit be made a config parameter?

The API descriptions could be more clear as well since they don't reference the char limit:

  • /orgs/{org}/repos [POST]: description -- string: Description of the repository to create
  • /repos/{owner}/{repo} [PATCH]: description -- string: a short description of the repository.

@kins-dev
Copy link

kins-dev commented May 9, 2021

I removed all the limits from my test instance and it has been great. Given Jenkins pulls the repo description over automatically, (pipelines based on an organization) it gives me one version of the truth over multiple systems.

I don't mind if this is configurable as long as no limit is an option.

@fnetX
Copy link
Contributor

fnetX commented Jun 15, 2021

Just reported on Codeberg

I just confirmed on try.gitea.io this also affects other input boxes (e.g. name), so an improvement should take care of all the input boxes there.

Also, I noticed that spellcheck is disabled, does anyone know why this is explicitly set?

@fnetX
Copy link
Contributor

fnetX commented Jun 15, 2021

Does anyone know a place in the Gitea Codebase where such a limit is already in place so that this could be copied / adapted? I just tried to adapt the checker on the repo tag code, but didn't get it to work. I'm also not really a frontend guy, but if pointed to some good resources I might be able to pick this up.

@6543 6543 added topic/ui-interaction Change the process how users use Gitea instead of the visual appearance good first issue Likely to be an easy fix labels Aug 9, 2022
@CypherpunkSamurai
Copy link
Contributor

Searching the Repository for MaxSize reveals that there's a handful of cases.

Are we planning to replace the UI with JS validation for all these cases, or just the repository setting related UI?

@delvh
Copy link
Member

delvh commented Sep 19, 2022

  1. See Limit length of repo description and repo url input fields #21119 and the subsequent Remove unnecessary length check for repo's Description & Website #21194
  2. Isn't that issue now implemented by using the browser native restriction?
    (Of course without a fancy <x> characters left display, but I have also nothing against the natively supported validation)

@delvh delvh closed this as completed Sep 19, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Likely to be an easy fix topic/ui Change the appearance of the Gitea UI topic/ui-interaction Change the process how users use Gitea instead of the visual appearance
Projects
None yet
Development

No branches or pull requests

8 participants