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

[Bug report?] Remove leading/trailing spaces from title upon creation of objects #3262

Open
echo6ix opened this issue Dec 10, 2022 · 3 comments · May be fixed by #5211
Open

[Bug report?] Remove leading/trailing spaces from title upon creation of objects #3262

echo6ix opened this issue Dec 10, 2022 · 3 comments · May be fixed by #5211
Labels
bug Something isn't working

Comments

@echo6ix
Copy link
Contributor

echo6ix commented Dec 10, 2022

Describe (the bug?)
The user can currently create an object title (such as a scene or performer or tag) with leading spaces. The leading spaces don't seem to be displayed anywhere in the UI except for the edit tab of the object. This throws off sorting of objects by title as they're getting sorted by the leading space(s).

To Reproduce
Steps to reproduce the behavior:

  1. Go to Scenes
  2. Click on 'New'
  3. Create the title ` XYZ'
  4. Save
  5. Sort all scenes by Title
  • You will notice the leading spaces aren't displayed
  • You will also notice the object isn't sorted by XYZ, but rather the leading spaces

Expected behavior
Remove leading/trailing spaces of a title (and performer name) upon creation of an object.

Stash Version: (from Settings -> About):
v0.18.0-15-gce080c1b

Additional context
Implementing the above would fix any newly created objects going forward, but there could potentially be existing objects with leading/trailing spaces (due to accidental leading/trailing spaces or from scrapes with leading/trailing spaces.) I don't know the optimal way to implement the following, but some kind of sanitization process, perhaps when the app initializes with each new version release, to strip all leading/trailing spaces from the titles (and performer names).

@echo6ix echo6ix added the bug report Bug reports that are not yet verified label Dec 10, 2022
@DogmaDragon
Copy link
Collaborator

Reproduced on e9fa7d0.

@DogmaDragon DogmaDragon added bug Something isn't working and removed bug report Bug reports that are not yet verified labels Feb 21, 2023
@DogmaDragon
Copy link
Collaborator

This is an interesting case. Some people are taking advantage of leading spaces for tag names since it allows more control over the order they are displayed.

But not that useful on scene titles or performer names.

@ALonelyJuicebox
Copy link

This is an interesting case. Some people are taking advantage of leading spaces for tag names since it allows more control over the order they are displayed.

But not that useful on scene titles or performer names.

True, but as someone who's taking advantage of leading spaces for tag names, I wouldn't hold back a perfectly valid bug report to support what is effectively a bit of a hack. I've submitted a request for a proper implementation of Tag Groups. 🙂#3469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

4 participants