Skip to content

Fix Sass deprecation warnings #2157

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Soundarya189r
Copy link

@Soundarya189r Soundarya189r commented Jul 18, 2025

Fixes: #1686
Fixes: #2153

@Soundarya189r Soundarya189r force-pushed the SassDeprecationFix branch 4 times, most recently from 422757d to 0ca79cf Compare July 22, 2025 10:01
Comment on lines 2 to 8
@use '@patternfly/patternfly/sass-utilities/all' as pf;

.odf-general-overview__grid {
padding-left: shared.$pf-v5-global-gutter;
padding-right: shared.$pf-v5-global-gutter;

@media(min-width: shared.$pf-v5-global--breakpoint--xl) {
@media(min-width: pf.$pf-v5-global--breakpoint--xl) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Soundarya189r this change is not needed: it works as it is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Soundarya189r Then it means that your changes in packages/shared/src/styles/_vars.scss are impacting here: if this variable is now exposed via PF utilities, then investigate if we can get rid of @use '@odf/shared/style.scss' as shared; in this file.

@alfonsomthd alfonsomthd changed the title Sass Deprecation Fix Fix Sass deprecation warnings Jul 23, 2025
@@ -1,4 +1,4 @@
@import '../../style.scss';
@use '../../style.scss' as *;
Copy link
Collaborator

@alfonsomthd alfonsomthd Jul 23, 2025

Choose a reason for hiding this comment

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

IIUC this statement is useless: either we @forward (if the original intention was to expose those classes to the global namespace) or either we remove this statement (as we're not using any imported class/variable/mixin from that file).

@@ -1,4 +1,4 @@
@import '../../enroll-discovered-application.scss';
@use '../../enroll-discovered-application.scss' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -1,4 +1,4 @@
@import '../../enroll-discovered-application.scss';
@use '../../enroll-discovered-application.scss' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment on lines 1 to 2
@use '@odf/shared/styles/skeleton' as *;
@use '@odf/shared/dashboards/capacity-card/capacity-card.scss' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -1,4 +1,4 @@
@import '@odf/shared/styles/skeleton';
@use '@odf/shared/styles/skeleton' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The main intention of @use is to use namespaces (rather than global namespace) to avoid potential collisions:

Suggested change
@use '@odf/shared/styles/skeleton' as *;
@use '@odf/shared/styles/skeleton' as sk;

@@ -1,4 +1,4 @@
@import '@patternfly/patternfly/sass-utilities/colors';
@use '@patternfly/patternfly/sass-utilities/colors' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use '@patternfly/patternfly/sass-utilities/colors' as *;
@use '@patternfly/patternfly/sass-utilities/colors' as colors;

@@ -1,4 +1,4 @@
@import '@patternfly/patternfly/sass-utilities/colors';
@use '@patternfly/patternfly/sass-utilities/colors' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use '@patternfly/patternfly/sass-utilities/colors' as *;
@use '@patternfly/patternfly/sass-utilities/colors' as colors;

@@ -1,10 +1,11 @@
@import './../../style.scss';
@use './../../style.scss' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we find that $pf-v5-global-gutter is already available in PF sass-utilities, the we don't need this import:

Suggested change
@use './../../style.scss' as *;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you confirm?

@@ -1,3 +1,6 @@
@use './vars' as vars;
@use './mixin/break-word' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use './mixin/break-word' as *;
@use './mixin/break-word' as bw;

@@ -1,3 +1,6 @@
@use './vars' as vars;
@use './mixin/break-word' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use './mixin/break-word' as *;
@use './mixin/break-word' as bw;

@@ -1,4 +1,4 @@
@import '@odf/shared/styles/skeleton';
@use '@odf/shared/styles/skeleton' as *;
Copy link
Collaborator

@alfonsomthd alfonsomthd Jul 23, 2025

Choose a reason for hiding this comment

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

Suggested change
@use '@odf/shared/styles/skeleton' as *;
@use '@odf/shared/styles/skeleton' as sk;

@@ -1,4 +1,4 @@
@import '../../styles/skeleton';
@use '../../styles/skeleton' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use '../../styles/skeleton' as *;
@use '../../styles/skeleton' as sk;

@@ -1,4 +1,4 @@
@import '../../styles/skeleton';
@use '../../styles/skeleton' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use '../../styles/skeleton' as *;
@use '../../styles/skeleton' as sk;

@@ -1,4 +1,4 @@
@import '@patternfly/patternfly/sass-utilities/colors';
@use '@patternfly/patternfly/sass-utilities/colors' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems we're not using any imported member here:

Suggested change
@use '@patternfly/patternfly/sass-utilities/colors' as *;

@@ -1,4 +1,4 @@
@import '@odf/shared/styles/skeleton';
@use '@odf/shared/styles/skeleton' as *;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@use '@odf/shared/styles/skeleton' as *;
@use '@odf/shared/styles/skeleton' as sk;

@alfonsomthd
Copy link
Collaborator

@Soundarya189r this PR needs rebase.

Copy link
Contributor

openshift-ci bot commented Jul 25, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Soundarya189r
Once this PR has been reviewed and has the lgtm label, please ask for approval from alfonsomthd. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jul 25, 2025

@Soundarya189r: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/odf-console-e2e-aws b3e553f link true /test odf-console-e2e-aws

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

SCSS: replace @import with @use Fix Sass deprecation warnings.
3 participants