Skip to content

Commit 7404f8d

Browse files
committed
refactor(ui): route shared MaterialTheme.shapes through appShape(AppShapeRole)
miuix 0.9.4 无 shape token,此前 shared 文件的 MaterialTheme.shapes 是门禁 告警(advisory)。kit 新增 appShape:M3 轨返回 MaterialTheme.shapes, Miuix 轨返回固定圆角(8/12/16/28dp)。本仓 X 处 shapes 全部迁走。 门禁同步升级:MaterialTheme.shapes 从 advisory 变为 fail。 另加 .github/dependabot.yml:依赖更新由 Renovate 主导,GitHub 内置 Dependabot 只监控 github-actions,避免其对 build-logic force 坐标的 快照误报(dependency_not_found)。 子模块:magisk-ui-kit a7492a7 -> 6ca7a08 验证:compileGithubDebugKotlin --no-build-cache BUILD SUCCESSFUL;dual_track_check fail=0。
1 parent 417952c commit 7404f8d

4 files changed

Lines changed: 20 additions & 13 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Dependency updates are driven by Renovate (renovate/all-minor-patch).
2+
# GitHub's built-in Dependabot previously snapshotted Gradle dependencies and
3+
# failed on build-logic `force` coordinates (dependency_not_found). Restrict it
4+
# to GitHub Actions so the two bots do not overlap and the false failures stop.
5+
version: 2
6+
updates:
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

‎core/src/main/java/com/github/magisk317/smscode/ui/record/CodeRecordScreen.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ import io.github.magisk317.uikit.text.AppTextRole
8181
import io.github.magisk317.uikit.surface.AppIcon
8282
import io.github.magisk317.uikit.theme.AppColorRole
8383
import io.github.magisk317.uikit.theme.appColor
84+
import io.github.magisk317.uikit.theme.AppShapeRole
85+
import io.github.magisk317.uikit.theme.appShape
8486
import kotlinx.coroutines.Dispatchers
8587
import kotlinx.coroutines.delay
8688
import kotlinx.coroutines.flow.first
@@ -891,7 +893,7 @@ private fun RecordSplitColumn(
891893
val isMiuix = currentUiKitStyle() == UiKitStyle.Miuix
892894
AppSurface(
893895
modifier = modifier,
894-
shape = MaterialTheme.shapes.large,
896+
shape = appShape(AppShapeRole.Large),
895897
tonalElevation = 2.dp,
896898
color = Color.Transparent,
897899
) {

‎magisk-ui-kit‎

Submodule magisk-ui-kit updated from a7492a7 to 6ca7a08

‎scripts/checks/dual_track_check.py‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
* shared file calls a bare Material 3 / Material 2 component leaf (DEBT)
77
* *Miuix.kt file calls a bare Material 3 component leaf (SEVERE)
88
* shared file imports a miuix native component (WEIRD-SHARED)
9-
* shared file reads MaterialTheme.colorScheme / .typography (THEME-API)
9+
* shared file reads MaterialTheme.colorScheme / .typography / .shapes (THEME-API)
1010
11-
`MaterialTheme.shapes` in a shared file is reported as ADVISORY only: miuix
12-
0.9.4 exposes no shape tokens, so there is no dual-track counterpart to move to.
11+
`MaterialTheme.shapes` in a shared file is also a hard finding since kit 0.7:
12+
`appShape(AppShapeRole.*)` now maps every Material shape to a fixed miuix
13+
corner radius (miuix 0.9.4 exposes no shape tokens).
1314
1415
Track rules:
1516
*Material.kt / *Expressive.kt -> M track (M3 is the intended half)
@@ -215,7 +216,6 @@ def main():
215216
root = os.path.abspath(args.root)
216217

217218
findings = []
218-
advisory = []
219219

220220
for fp in sorted(walk(root)):
221221
rel = os.path.relpath(fp, root).replace(os.sep, "/")
@@ -248,20 +248,15 @@ def main():
248248
findings.append(("shared uses miuix native", rel, ln, name))
249249

250250
if track == "shared":
251-
for m in re.finditer(r"MaterialTheme\.(colorScheme|typography)\.", src):
251+
for m in re.finditer(r"MaterialTheme\.(colorScheme|typography|shapes)\.", src):
252252
ln = src[:m.start()].count("\n") + 1
253253
findings.append(("shared uses M3 theme API (%s)" % m.group(1), rel, ln, m.group(0)))
254-
for m in re.finditer(r"MaterialTheme\.shapes\.", src):
255-
ln = src[:m.start()].count("\n") + 1
256-
advisory.append((rel, ln))
257254

258255
if not args.quiet:
259256
print("== dual-track check: %s ==" % root)
260257
for kind, rel, ln, name in findings:
261258
print("FAIL %-34s %s:%d %s" % (kind, rel, ln, name))
262-
for rel, ln in advisory:
263-
print("ADV MaterialTheme.shapes (no miuix counterpart) %s:%d" % (rel, ln))
264-
print("SUMMARY fail=%d advisory=%d" % (len(findings), len(advisory)))
259+
print("SUMMARY fail=%d" % len(findings))
265260
return 1 if findings else 0
266261

267262

0 commit comments

Comments
 (0)