awesome icon indicating copy to clipboard operation
awesome copied to clipboard

Slider dragging signals

Open Elv13 opened this issue 1 year ago • 2 comments

Copy of https://github.com/awesomeWM/awesome/pull/3533

Changed the :is_dragging() method to be a property and fix luacheck warnings.

@sclu1034 Are you fine with this? This address a comment I left (and then forgot about) in the other PR.

Elv13 avatar Dec 31 '23 23:12 Elv13

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1f7ac8f) 91.22% compared to head (eaff8aa) 91.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3884      +/-   ##
==========================================
+ Coverage   91.22%   91.25%   +0.03%     
==========================================
  Files         927      928       +1     
  Lines       59450    59522      +72     
==========================================
+ Hits        54232    54317      +85     
+ Misses       5218     5205      -13     
Flag Coverage Δ
gcov 91.25% <98.61%> (+0.03%) :arrow_up:
luacov 93.91% <98.61%> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
tests/test-wibox-widget-slider.lua 100.00% <100.00%> (ø)
lib/wibox/widget/slider.lua 96.85% <85.71%> (+8.81%) :arrow_up:

... and 2 files with indirect coverage changes

codecov[bot] avatar Dec 31 '23 23:12 codecov[bot]

I mean, you already went as far as creating an entire copy of the PR to implement your own version before I even got to answer that question, which appears to me like my answer won't really affect much. But for posterity, no I'm not. Making this a "property" doesn't make sense to me.

Users expect to be able to set a value for a property (except for the client properties where X11 dictates otherwise) and to get a corresponding signal on change (which still applies for those X11 properties). But neither applies here. Making this a property just turns the direct function call into a function call hidden by metatables and the user not typing ().

sclu1034 avatar Jan 01 '24 17:01 sclu1034