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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to dart-sass #3919

Merged
merged 17 commits into from
Aug 11, 2021
Merged

Conversation

sowasred2012
Copy link
Contributor

@sowasred2012 sowasred2012 commented Aug 9, 2021

Co-authored-by: Steve Rydz steve.rydz@canonical.com

Done

  • Switches out node-sass for sass package, updates SCSS build scripts accordingly.
  • Removes node-sass build information from the docs
  • Removed the version number function script
    • sass doesn't support passing a JS file with custom functions, open to suggestions on ways around this. For now, the version number is hardcoded.
  • Fixes warnings relating to slash divider / math.div
  • Updated github actions accordingly

Drive bys

This being the first PR targeting the vanilla-3.0 branch, we initially updated the Vanilla version to 3.0 everywhere as well as switching to dart-sass. We fixed some things that were broken by the exclusion of deprecated styles before realising we were biting off more than we could chew in the scope of this PR (and that these changes should be addressed in #3744), so reverted the version number to 2.0, and kept the changes we'd made:

  • Replaced the use of heading-max-width--short et al mixins with the suggested map-get($max-widths, default)
  • Fixed some deprecated mark up in the vf.io site navigation

Fixes #3900 & #3756

QA

  • Check the PR builds, and the demo runs

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the component status page.
  • Documentation side navigation should be updated with the relevant labels.

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Some suggestions on making some math simpler.

scss/_base_forms-range.scss Outdated Show resolved Hide resolved
scss/_base_forms-range.scss Outdated Show resolved Hide resolved
scss/_base_forms-range.scss Outdated Show resolved Hide resolved
scss/_patterns_notifications.scss Outdated Show resolved Hide resolved
@bartaz
Copy link
Contributor

bartaz commented Aug 10, 2021

@sowasred2012 The watch:scss:skip-standalone is to allow quicker builds by skiping standalone stylesheets (during development). It seems that with dart sass being slower it may become even more useful.

sowasred2012 and others added 5 commits August 10, 2021 10:53
Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
@@ -3,14 +3,13 @@
@mixin vf-b-typography-definitions {
//@section Heading styling in placeholders
%vf-heading-1 {
@include heading-max-width--short;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to dart specifically? or just a drive by?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a drive by - I'll make a note

// update the fallback with major releases
$app-version: '2.0.0' !default;
}
$app-version: '2.0.0' !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a 3.0 branch, so why reverting to 2.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In an initial commit, we switched it to 3.0, then found that a number of things were broken - this also explains the heading-max-width--short things you noticed, we made a start on them, then realised it was going to be a bigger task (which we already have here #3744), and outside the scope of this PR, which was just to switch to dart-sass.

<li class="p-navigation__link{% if path == '/accessibility' %} is-selected{% endif %}"><a href="/accessibility">Accessibility</a></li>
<li class="p-navigation__link{% if path == '/browser-support' %} is-selected{% endif %}"><a href="/browser-support">Browser support</a></li>
<li class="p-navigation__link{% if path == '/contribute' %} is-selected{% endif %}"><a href="/contribute">Contribute</a></li>
<li class="p-navigation__item{% if path == '/accessibility' %} is-selected{% endif %}"><a class="p-navigation__link" href="/accessibility">Accessibility</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Also I'm not sure why this is in this PR. It's fine if drive-by, but lets list it in the description (and link to fixed issues if we have them).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There wasn't an issue for this, it was spotted when we initially switched the version to 3.0 and some deprecated styles were excluded. In any case, it's old markup that should have been updated, so I'll list it as an item in the description

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@sowasred2012 Knowing that removing deprecated stuff should we maybe revisit the estimate on the "remove deprecated" task?

@sowasred2012 sowasred2012 merged commit 7c994ad into canonical:vanilla-3.0 Aug 11, 2021
@sowasred2012 sowasred2012 deleted the dart-sass branch August 11, 2021 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants