claudiobernasconi / streamdeck-youtube

Elgato Stream Deck: YouTube Channel Statistics Plugin
11 stars 2 forks source link

Allow custom title? #12

Open errorsallthethings opened 3 years ago

errorsallthethings commented 3 years ago

Less of an issue and more of a feature/enhancement request. Thank you for making the plugin!

I noticed the value you get from Youtube/API just replaces any title you give the button in the Stream Deck software.

Any possibility of instead of setting the title (ie replacing) with the value from the API, but instead append it to end of the title string? (or alternatively perhaps allow for a replaceable tag to contain the value?)

Current functionality

  1. User enter title for button in Stream Deck. (example title: "This plugin rules!")
  2. Plugin replaces title given in Stream Deck with value from API. (example title: "42")

Requested functionality:

  1. User enters title for button in Stream Deck. (example title: "This plugin rules!")
  2. Plugin appends to end of user entered title from API. (example title: "This plugin rules! 42")

Alternative replaceable tag:

  1. User enters title for button in Stream Deck with tag. (example title: "This plugin {stat} rules!")
  2. Plugin replaced tag with value from Youtube API. (example title output: "This plugin 42 rules!")
claudiobernasconi commented 3 years ago

Thanks for providing such an understandable and thoughtful feature request. I think both alternatives are easy to implement.

My question is what use case you have for it? The space on a StreaDeck is very limited and I don't think you can have text like "This plugin rules" on a single button on the StreamDeck. Would you please write a little more about what use case would be supported by this feature request?

errorsallthethings commented 3 years ago

@claudiobernasconi Thanks for the follow up. I agree there is limited spacing for each of the buttons even with reducing font size. "This plugin rules!" might have been a bit of a strech. I tend to personally use single words per line, adjust the font size and formatting to get things to fit. I better use case would be:

(With image background; centered text; reduced font size) Views X

(With image background; centered text; reduced font size)
Subs X

I know I've seen folks use two buttons next to each other, one with an icon no functionality and the other with the number value. While this is a interesting work around, it does take up an additional button just to act as a label. I think that takes up button that some might not be able to afford if they are attempting to group many buttons together (in folder/profile). Being able to supply a small textual label on the same button as the stat would allow for quick glace and save a possible button being used as a label only.

Thanks again for considering the request and building the plugin!

claudiobernasconi commented 3 years ago

@errorsallthethings Thanks for clarifying your use case. I think that a single word or two very small words can work. What I wonder is how line breaks would be handled. Do you expect them to be after your "custom" part of the title or do you even want to have control over it?

I wonder what solution would be best for the user experience. Should I offer a "pre-value" field and a "post-value" field in the property explorer (and what about line breaks) or should I go down the template-string route and provide some sort of help file online that explains how to use this syntax?

My priority on this task is to make it a simple as possible to understand because I do not want users to feel overwhelmed and I cannot handle multiple support requests a day for this simple side project.

What are your thoughts on this?

errorsallthethings commented 3 years ago

@claudiobernasconi

Apologize for the delayed response, apparently I didn't get notification of the comment. Below are some of my thoughts.

Default - If input is empty string. Display number value as normal. Current behavor, this way your current user base isn't affected and introducing regression issues with already accepted behavour of your plugin.

Advanced value control - If input has value, parse for "{{VALUE}}" key (or whatever key format that would make sense) in input string and replace? Currently if a user enters any value the number doesn't display any how. So, if a user were to not add {{VALUE}} it would behave the same as it does now.

Example - "Views {{VALUE}}" = "Views 34" "{{VALUE}} Views" = "34 Views" "Total {{VALUE}} Views" = "Total 34 Views"

Do line breaks translate to /n in the string value? I haven't checked myself to see what it's captured as. ie. If I were to line break after "Total" and "{{VALUE}}", it captured as "Total/n{{VALUE}}/nViews"? If it is the search/replace should work just fine, and you can avoid the pre and post methods, which I agree would add confusion (and ulitmately more support from you).

claudiobernasconi commented 3 years ago

@errorsallthethings Thanks for your reply. I'll think about it and come back to this issue once I decided on how to go further with it. Thanks for your patience.