Moon-0xff / gnome-mpris-label

A music related GNOME extension.
GNU General Public License v3.0
51 stars 10 forks source link

Add tooltips to Settings #19

Closed Batwam closed 1 year ago

Batwam commented 1 year ago

Included ability to include tooltips in Settings and started to populate some of them.

image

Moon-0xff commented 1 year ago

Are optional arguments a thing in Javascript?

Batwam commented 1 year ago

In a way yes. It seems like you can get away without it specifying the item if it's at the end as it will be considered undefined if missing. However, it's best practice to add undefined in the function call for clarity and check for it when building the label.

https://flexiple.com/javascript/optional-parameter-javascript/

https://stackoverflow.com/questions/8356227/skipping-optional-function-parameters-in-javascript

Batwam commented 1 year ago

This MR has some conflicts with the latest updates to main so I'll need to figure out how to fix this without messing everything up. I might create a new branch/MR if it's quicker.

Batwam commented 1 year ago

I'm going to close this PR as I found it easier to start over and cherry-pick the commits. See #21 for updated PR.