Skip to content

fix: scss import warning#7528

Merged
Soulter merged 2 commits intoAstrBotDevs:masterfrom
kyangconn:fix/scss-warn
Apr 16, 2026
Merged

fix: scss import warning#7528
Soulter merged 2 commits intoAstrBotDevs:masterfrom
kyangconn:fix/scss-warn

Conversation

@kyangconn
Copy link
Copy Markdown
Contributor

@kyangconn kyangconn commented Apr 13, 2026

通过cherry-pick dev分支中的修复提交,让lint不再向scss中的@import哈气。

Modifications / 改动点

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果


Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txtpyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Update SCSS styling entrypoint and partials to use the modern @use syntax and ensure shared variables are properly imported.

Bug Fixes:

  • Resolve lint warnings related to deprecated @import usage in SCSS files.

Enhancements:

  • Standardize SCSS module imports across layout and component styles by switching to @use and explicitly including the shared variables module.

LIghtJUNction and others added 2 commits April 13, 2026 20:30
Dart Sass 3.0.0 将移除 @import,迁移到 @use 以消除弃用警告
@auto-assign auto-assign bot requested review from LIghtJUNction and Soulter April 13, 2026 19:44
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since many partials now @use '../variables' as *;, consider creating a central variables module that @forwards your tokens and @uses that instead to reduce repetition and keep variable exports in one place.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since many partials now `@use '../variables' as *;`, consider creating a central variables module that `@forward`s your tokens and `@use`s that instead to reduce repetition and keep variable exports in one place.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot dosubot bot added the area:webui The bug / feature is about webui(dashboard) of astrbot. label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates Sass @import statements to the @use rule across various component and layout files. The review feedback identifies that the migration is incomplete, as several partials referenced in style.scss were not updated, which could lead to 'Undefined variable' errors. Additionally, the switch to @use for Vuetify styles requires the use of the with configuration syntax to maintain existing variable overrides.

Comment thread dashboard/src/scss/style.scss
@import './layout/container';
@import './layout/sidebar';
@use './variables';
@use 'vuetify/styles/main.sass';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Switching from @import to @use for vuetify/styles/main.sass changes how variable overrides are handled. In Sass modules, variables defined in ./variables (such as $border-radius-root or $color-pack) are no longer automatically available to the Vuetify module. If these variables were intended to customize Vuetify's default styling, you must now use the with configuration syntax or ensure the variables are forwarded correctly. For example: @use 'vuetify/styles/main.sass' with ($border-radius-root: 8px);.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 16, 2026
@Soulter Soulter merged commit ee85a4e into AstrBotDevs:master Apr 16, 2026
21 checks passed
@kyangconn kyangconn deleted the fix/scss-warn branch April 16, 2026 12:43
kyangconn added a commit to kyangconn/AstrBot that referenced this pull request Apr 16, 2026
Soulter added a commit that referenced this pull request Apr 17, 2026
Soulter added a commit that referenced this pull request Apr 17, 2026
@Soulter
Copy link
Copy Markdown
Member

Soulter commented Apr 17, 2026

样式有问题,已经在 #7616 revert。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants