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

Line break titles #5471

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open

Conversation

randemgame
Copy link
Contributor

Added support for line breaks in Scene Titles.
Affects how titles can be now displayed in Scene Cards and Main Scene View. Should not affect any other view (added code to fix it affecting Performer Cards)
Allows for a greater level of customisation and flexibility with the presentation of text titles so that they can match the rest of your Stash aesthetic, rather than relying on how a title is automatically spread to a second row.

  • I do not believe this was possible via a plug-in alone.
  • As always, apologies for any problematic code - I have tested the implementation on my machine and it is functional and passed tests but sorry if the implementation is whack

https://discord.com/channels/559159668438728723/644934273459290145/1305598180477370479

@cj12312021
Copy link
Collaborator

cj12312021 commented Nov 12, 2024

The front end already supports what you are trying to do here. If you perform a GraphQL scene update with a title like One\nTwo\nThree. The line breaks will render without your change. The issue you are likely running into is with inputting those new lines in the input box presented in the UI. Changing the form input to a text area would enable the entry of new lines, but I'm not sure that is an ideal change.

DogmaDragon and others added 5 commits November 13, 2024 01:05
Add JavaScript Key Event Handling: Capture the Enter key press within the title input field to insert a newline character.
Add JavaScript Key Event Handling: Capture the Enter key press within the title input field to insert a newline character.
Keeps single-line input behaviour, uses a marker sequence instead of actual newlines, converts markers to spaces for display
couldn't figure out how to visually represent the line breaks in edit field (currently uses space character for new line)
line breaks are lost if any other change made to edit field. otherwise, works alright
@randemgame
Copy link
Contributor Author

@cj12312021 ah, how embarrassing, i have hugely reduced the changes in this issue then to just allow for a line break when the enter key is pressed in the edit field, but I couldn't work out a good way to give visual feedback on this (i tried literally adding a /n or enter key emoji to represent it but couldn't do this without it reflecting in the literal title). If it is better to be a plugin then ok, but if the title field does allow for line breaks and the edit field does not allow for line breaks, perhaps it should be part of core functionality. I dunno! I'll let you all decide

Sign up for free to 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.

3 participants