insightsengineering / teal.reporter

Create and preview reports with Shiny modules
https://insightsengineering.github.io/teal.reporter/
Other
8 stars 9 forks source link

Change color of buttons in modals #186

Closed asbates closed 1 year ago

asbates commented 1 year ago

Changes the colors of buttons in the various modals.

Fixes #179

github-actions[bot] commented 1 year ago

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  ----------------------------------------------------------------------------------
R/AddCardModule.R       140       1  99.29%   195
R/Archiver.R             25       0  100.00%
R/ContentBlock.R         16       0  100.00%
R/DownloadModule.R      207      49  76.33%   89-95, 138, 163-168, 177-181, 184-188, 196-200, 203-207, 214-218, 221-225, 262-266
R/FileBlock.R            13       0  100.00%
R/NewpageBlock.R          2       0  100.00%
R/PictureBlock.R         30       2  93.33%   15, 101
R/Previewer.R           292      54  81.51%   183, 199, 201-207, 210-216, 325-369
R/RcodeBlock.R           15       0  100.00%
R/Renderer.R             81      13  83.95%   158, 160-172, 198, 202
R/ReportCard.R           78       4  94.87%   72-73, 223, 244
R/Reporter.R             96       1  98.96%   255
R/ResetModule.R          55       0  100.00%
R/SimpleReporter.R       29       0  100.00%
R/TableBlock.R            8       0  100.00%
R/TealReportCard.R       31       0  100.00%
R/TextBlock.R            13       0  100.00%
R/utils.R                78      66  15.38%   7, 38-97, 99, 102-109
R/yaml_utils.R           74       2  97.30%   65, 263
TOTAL                  1283     192  85.04%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: e7d518591d08668bb661490e0a4781dd7ffb7800

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 1 year ago

Unit Tests Summary

    1 files    19 suites   11s :stopwatch: 210 tests 210 :heavy_check_mark: 0 :zzz: 0 :x: 359 runs  359 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit c02a0a7b.

donyunardi commented 1 year ago

Felt like we can do better when the button is disabled (blue and grey just not pleasing to the eye).

image

image

How about we make these changes in Previewer.css, https://github.com/insightsengineering/teal.reporter/blob/67c71ea6ac00982676792c58942af4c69cfc3d52/inst/css/Previewer.css#L10-L15

To be like this:

a.disabled {
  color: white;
  background-color:#6a98bf;
  border-color: #6a98bf;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

So now, the button looks like this when disabled: image

And this when enabled: image

I'm keeping the color scheme (btn-primary) but just making it a bit lighter when disabled.

donyunardi commented 1 year ago

I just read my comment again and realized that this might be out of scope from the main issue. I'd be happy to create a new issue if we can't squeeze this in.

asbates commented 1 year ago

@donyunardi I think the disabled color should be a new issue. Mostly because it needs more thought around how to adjust the color. While your suggested style changes look better, I wouldn't recommend using a color directly like #6a98bf. It may match the theme in the screenshot, but what if I use Bootswatch United? What if I define my own custom primary color?