Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change color of buttons in modals #186

Merged
merged 1 commit into from
May 19, 2023
Merged

Change color of buttons in modals #186

merged 1 commit into from
May 19, 2023

Conversation

asbates
Copy link
Contributor

@asbates asbates commented May 11, 2023

Changes the colors of buttons in the various modals.

  • "Cancel" buttons are color "secondary".
  • "Remove" buttons are color "danger"
  • "Add" buttons are color "primary"

Fixes #179

@asbates asbates added the core label May 11, 2023
@github-actions
Copy link
Contributor

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: e7d5185

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

Unit Tests Summary

    1 files    19 suites   11s ⏱️
210 tests 210 ✔️ 0 💤 0
359 runs  359 ✔️ 0 💤 0

Results for commit c02a0a7.

@kartikeyakirar kartikeyakirar self-assigned this May 12, 2023
@donyunardi
Copy link
Contributor

donyunardi commented May 17, 2023

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,

a.disabled {
color: grey;
cursor: not-allowed;
pointer-events: none;
text-decoration: none;
}

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
Copy link
Contributor

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
Copy link
Contributor Author

asbates commented May 17, 2023

@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?

Copy link
Contributor

@kartikeyakirar kartikeyakirar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested changes for issues. PR looks good.

@asbates asbates merged commit 0873e9b into main May 19, 2023
@asbates asbates deleted the 179_modal_btn_color@main branch May 19, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cancel button color in a modal
3 participants