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 import to use in sass files #3316

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

colinxfleming
Copy link
Member

I rule and have completed some work on Case Manager that's ready for review!

One of the deprecation warnings we were getting was import being deprecated in favor of use. Predictably no good deed goes unpunished here.

This pull request makes the following changes:

  • swap import out for use
  • bunch of in-place changes to make things play nice

no meaningful view changes, and counting on system tests to not break anything meaningful (though I also clicked around the app a bunch)

It relates to the following issue #s:

For reviewer:

  • Adjust the title to explain what it does for the notification email to the listserv.
  • Tag this PR:
    • feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
    • dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.
  • If it contains neither, no need to tag this PR.

Copy link
Member Author

@colinxfleming colinxfleming left a comment

Choose a reason for hiding this comment

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

couple notes. diff is beefy but the actual set of meaningful changes largely falls into:

  • changing import to use and doing some boring syntax stuff, mostly via the automatic tool sass made
  • adjusting some stuff that the above shook loose

border-style: solid;
border-color: black;
border-color: variables.$grey-color;
Copy link
Member Author

Choose a reason for hiding this comment

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

meaningful change (it winds up a darker shade of gray), but I think it's more one of those 'how was this ever working' kinda things

@@ -1,12 +1,13 @@
// Styles pertaining to the login form or other devise-related views.

@import './_variables';
@use 'bootstrap/scss/bootstrap';
Copy link
Member Author

Choose a reason for hiding this comment

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

There are a few cases where we're importing bootstrap in a place we weren't before, and it's generally because we're extending some bootstrap class (here, card-header).

}

body {
font-family: "Source Sans Pro", sans-serif;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is being applied wrong with use, and popping it out makes it match what's happening in sandbox

}

.form-check-label {
@extend .ml-8;
@extend .ml-5;
Copy link
Member Author

Choose a reason for hiding this comment

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

for some reason spacers are being applied differently (properly?) now; stuff over 5 gets a little spotty or doesn't acknowledge/style correctly, and other stuff seems to be a little more aggressive/spacious. (There are a bunch of corresponding HTML changes to reflect this, but it all more or less shakes out in the end.)

@@ -1,6 +1,6 @@
<!-- locals: title, table_type (for div id and tbody div id), pregnancies, sortable, autosortable -->

<div id="<%= table_type %>" class="margin-bottom mt-5">
<div id="<%= table_type %>" class="margin-bottom mt-4">
Copy link
Member Author

Choose a reason for hiding this comment

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

lots of changes like this in the html, where we gently crank down the margins so there's nt a lot of dead whitespace.

<%= render 'patients/menu', patient: @patient %>
</div>

<div id="sections" class="col tab-content">
<div id="sections" class="col tab-content mt-3">
Copy link
Member Author

Choose a reason for hiding this comment

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

this lets us take it out of header elements in the patient tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the Sass Breaking Change: @import and global built-in functions
1 participant