Giter VIP home page Giter VIP logo

Comments (15)

HughMacdonald avatar HughMacdonald commented on June 13, 2024 1

I need to get back to actual work now, so may take another look at this tomorrow.

Do you tend to work by pushing up to GH regularly and then using the CI-generated plugin to test with? That feels like a really awkward way of testing as you go

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

Glad you like it! 🙂

Hadn't considered just using the timer with custom button icons, but I think that makes perfectly sense, so I'll see how to best implement this. Let me know if you have a suggestion on how you'd expect to configure something like this in the Stream Deck interface.

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

I've actually already started having a look at how it might be implemented myself.

My initial thought was to have a checkbox called something like "Timer Only Title". However, a more power-user approach might be to have a multi-line title format string that would default to something like "{projectName}\n{taskName}\n{timer}" that could then be edited to show only the fields that the user wanted to see.

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

If the "Title Format" approach sounds good to you, I'm going to give it a go myself. I've not done any StreamDeck plugin dev before, but I'm pretty comfortable with C#

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

Oh nice! Always happy to receive contributions.

As long as we keep the non-power user functionality of just showing a title, when enter some text, then that sounds like a great option to me. Might be a bit tricky to communicate the syntax options, but a power user should also be able to read the readme or similar. 😉

If you enable GitHub Actions, it should actually fully build and package the plugin, takes away the hassle of manually dealing with the plugin creation.

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

That's awesome that you've got it all set up with GH Actions.

I'm thinking it could be hidden under an "Advanced" drop-down. The main tricky part would be what to do if they use a key that doesn't exist, or don't have matching {}s, etc...

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

I'd see two options:

  • Silently fail and show the next best interpretation
  • Replace the whole output with some "ERROR" text

The first can easily hide some issues, while the second might not really be verbose enough. One could log the output, but those logs aren't really easily accessible. Maybe there's a bit space in the inspector view to show a slightly extended error message.

I suggest, you just give it a go and see with what you end up 🙂

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

I've just recently added GitHub Actions. It's honestly not much more awkward than working locally, as you need to build/publish, then use the plugin packaging tool to create a new plugin, then replace the existing plugin, by either uninstalling it manually and reinstalling it, or closing StreamDeck deleting the plugin directory and install the new plugin.

There's the install.ps1 script to automate some of that, but it's still cumbersome. The GitHub Action is at least very useful, so I don't have to do the same dance on two platforms. 😄

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

The one thing that I'm realising might be tricky is ensuring that adding this setting doesn't change functionality for people using the plugin.

The way I'm thinking of doing this, it could only leave blank where an element isn't included. But in the current code, if timerName is set, then it uses it (and nothing else), whereas if it isn't set, then it uses projectName and taskName

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

BTW - I think I spotted a typo in the code. In PluginSettings.cs, line 20, the C# property is TimeName, but the Json propert name and PropertyInspector have it as timerName

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

I've had a quick go at this. The one thing that I haven't figured out is how to get the value from the UI replicated into the C# property. It may be because I'm using a textarea.

I'm just using string.Replace(), so it will just show {blah} if something is used in the format that isn't supported.

master...HughMacdonald:streamdeck-clockify:master

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

I'm also interested in what the options are for different colour of text on the title. The dark grey text that this plugin uses is really not readable against the backgrounds I'm using.
The BarRaider Spotify plugin is white text with a black outline, which is much more easily readable

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

That's just the default font, I believe. I guess one can configure it somehow and/or Spotify does some additional magic 😄

For Clockify you can change it:

image

from streamdeck-clockify.

HughMacdonald avatar HughMacdonald commented on June 13, 2024

Ahh - thanks! I guess Spotify just sets the default somehow. That made it much nicer already!

from streamdeck-clockify.

eXpl0it3r avatar eXpl0it3r commented on June 13, 2024

Took me a bit to figure it out, but you have to tell the Barraider integration, that you want the textarea to be a property by setting the sdProperty class and then need to update the settings when changing the contents of the textarea by adding oninput="setSettings()".

Feel free to take or re-implement my commit 🙂

https://github.com/eXpl0it3r/streamdeck-clockify/compare/feature/format-title

Haven't yet looked at the rest of the changes much, but it seems to work 👌

from streamdeck-clockify.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.