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

feat: Dealing with Sass version compatibility issues and removing debugger from build #7669

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

lan-yonghui
Copy link
Member

No description provided.

Copy link

f2c-ci-robot bot commented Jan 8, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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/test-infra repository.

}

span {
color: $primary-color;
color: var(--el-color-primary);
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

The provided code contains some stylistic changes that improve maintainability and adherence to modern web design practices. Here are the changes noted along with suggested improvements:

Changes:

  1. Variable Substitution:

    • color: $primary-color; has been replaced with color: var(--el-color-primary);.
      • Reason: Using CSS variables (--el-color-primary) is recommended for better theme customization and reduces redundancy.
  2. Box Shadow Usage:

    • box-shadow: 0px 0px 4px rgba(0, 94, 235, 0.1); has been replaced with box-shadow: 0 0 4px rgba(0, 94, 235, 0.1);.
      • Reason: Consistent spacing around numbers in properties helps readability and prevents syntax errors.

Recommendations:

  1. Consistency in Spacing:

    • Ensure consistent spacing between attributes within the same CSS rules for readability and proper rendering.
  2. Use Theme Variables for Colors and Shadows:

    • If you anticipate more color changes (e.g., accent colors), consider using themes like Bootstrap Vue or Element Plus which often use a system of named variables ($colors etc.) instead of specific colors.
  3. Documentation:

    • Document why these changes were made if your project has a style guide or documentation team.

Example Implementation Suggestions:

.el-dropdown-menu__item.is-active:hover {
    background-color: var(--el-menu-item-bg-color-active);
    border-width: 2px;
}

.el-dropdown-menu__item.is-active::before {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 4px;
    height: 14px;
    content: '';
    background: var(--el-color-primary);
}

These suggestions help keep the styles cleaner, maintainable, and responsive to future visual adjustments.

word-break: break-word;
overflow-wrap: break-word;
line-height: normal;
}

.custom-menu .el-menu-item {
white-space: normal !important;
Copy link
Member

Choose a reason for hiding this comment

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

Sure, please share the original and updated code snippets you'd like me to review.

@@ -39,5 +39,5 @@ defineProps<{ menuList: RouteRecordRaw[] }>();
</script>

<style scoped lang="scss">
@import '../index.scss';
@use '../index';
</style>
Copy link
Member

Choose a reason for hiding this comment

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

The differences appear to be minor style adjustments:

Code Differences

39:

@@ -39,5 +39,5 @@

Changes made:

  • Removed semicolon from end of line.

40:

<template>

No changes here.

42 (new line):

+</style>

New import statement added at this position using @use instead of @import.

Optimizations and Issues

  1. Style Changes:

    • The removal of the semi-colon on the last line is generally safe if it's not required by a specific IDE/editor setting or toolchain.
  2. Import Statement Change:

    • Using @use instead of @import is recommended for Sass/SCSS since modern CSS-in-JS libraries like Vue.js typically require using modules rather than imports for stylesheets.
    • This change ensures compatibility with certain build tools or frameworks that expect module syntax.
  3. Code Structure:

    • Ensure that there are no missing closing tags or additional lines in your template (<template> tag needs a corresponding closing tag).
    • Similarly, ensure all <script> sections have appropriate opening/closing tags if you add more script-related elements.

Overall, these changes are straightforward stylistic changes that improve readability and maintainability without introducing significant risks.

Copy link

sonarqubecloud bot commented Jan 8, 2025

Copy link
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

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

/lgtm

@wanghe-fit2cloud
Copy link
Member

/approve

@f2c-ci-robot f2c-ci-robot bot added the lgtm label Jan 8, 2025
Copy link

f2c-ci-robot bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wanghe-fit2cloud

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

The pull request process is described 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

@f2c-ci-robot f2c-ci-robot bot added the approved label Jan 8, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit 3650ff2 into dev Jan 8, 2025
6 checks passed
@f2c-ci-robot f2c-ci-robot bot deleted the pr@dev@feat_sass branch January 8, 2025 07:21
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.

3 participants