Skip to content

Your app looks AI-generated. Vincent Van Gogh noticed. An agent skill that finds and fixes AI-looking UI and UX in mobile apps, web apps, and websites.

Add slop fixtures for the native gradient-text and glow-shadow branches (#103)

Nguyễn Tuấn Anh94b94518a90d
diff --git a/test/detect.test.js b/test/detect.test.js
index 2cec820..b69279a 100644
--- a/test/detect.test.js
+++ b/test/detect.test.js
@@ -26,7 +26,7 @@ test("React Native slop is caught", () => {
test("SwiftUI slop is caught", () => {
const found = rulesIn("Dashboard.swift");
- for (const id of ["unvirtualized-list", "status-dot", "fixed-text-size", "slop-gradient", "glow-shadow", "back-gesture", "drawer-nav", "safe-area-off", "tracked-caps-label", "vague-button"]) {
+ for (const id of ["unvirtualized-list", "status-dot", "fixed-text-size", "slop-gradient", "gradient-text", "glow-shadow", "back-gesture", "drawer-nav", "safe-area-off", "tracked-caps-label", "vague-button"]) {
assert.ok(found.has(id), `missing ${id}`);
}
});
@@ -40,14 +40,14 @@ test("UIKit slop is caught", () => {
test("Compose slop is caught", () => {
const found = rulesIn("MainScreen.kt");
- for (const id of ["template-theme", "unvirtualized-list", "nested-cards", "status-dot", "drawer-nav", "back-gesture", "vague-button"]) {
+ for (const id of ["template-theme", "unvirtualized-list", "nested-cards", "status-dot", "drawer-nav", "back-gesture", "vague-button", "gradient-text", "glow-shadow"]) {
assert.ok(found.has(id), `missing ${id}`);
}
});
test("Flutter slop is caught", () => {
const found = rulesIn("home.dart");
- for (const id of ["template-theme", "back-gesture", "unvirtualized-list", "nested-cards", "status-dot", "fixed-text-size", "vague-button"]) {
+ for (const id of ["template-theme", "back-gesture", "unvirtualized-list", "nested-cards", "status-dot", "fixed-text-size", "vague-button", "gradient-text", "glow-shadow"]) {
assert.ok(found.has(id), `missing ${id}`);
}
});
diff --git a/test/fixtures/slop/Dashboard.swift b/test/fixtures/slop/Dashboard.swift
index 32abfa9..22b9d29 100644
--- a/test/fixtures/slop/Dashboard.swift
+++ b/test/fixtures/slop/Dashboard.swift
@@ -6,6 +6,7 @@ struct Dashboard: View {
ScrollView {
VStack {
Text("NEW").textCase(.uppercase).tracking(2)
+ Text("Dashboard").foregroundStyle(LinearGradient(colors: [.purple, .pink], startPoint: .leading, endPoint: .trailing))
ForEach(rows) { row in
HStack {
Circle().fill(.green).frame(width: 8, height: 8)
diff --git a/test/fixtures/slop/MainScreen.kt b/test/fixtures/slop/MainScreen.kt
index cea2004..ae3d1da 100644
--- a/test/fixtures/slop/MainScreen.kt
+++ b/test/fixtures/slop/MainScreen.kt
@@ -11,6 +11,8 @@ fun MainScreen(items: List<Item>) {
}
}
Box(Modifier.size(8.dp).background(Color.Green, CircleShape))
+ Text("Dashboard", style = TextStyle(brush = Brush.linearGradient(colors = listOf(Color(0xFF7C3AED), Color(0xFFEC4899)))))
+ Card(modifier = Modifier.shadow(elevation = 8.dp, ambientColor = Color(0xFF7C3AED), spotColor = Color(0xFFEC4899))) { Text("Glow") }
Button(onClick = {}) { Text("Submit") }
Icon(Icons.Default.Menu, contentDescription = null)
}
diff --git a/test/fixtures/slop/home.dart b/test/fixtures/slop/home.dart
index de6c348..c868d99 100644
--- a/test/fixtures/slop/home.dart
+++ b/test/fixtures/slop/home.dart
@@ -18,6 +18,8 @@ class Home extends StatelessWidget {
}
}
+final gradientTitle = ShaderMask(shaderCallback: (bounds) => LinearGradient(colors: [Colors.purple, Colors.pink]).createShader(bounds), child: Text('Dashboard'));
+final glowCard = Container(decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.purple.withOpacity(0.5), blurRadius: 20)]));
final submitButton = ElevatedButton(onPressed: () {}, child: Text("Submit"));
final dot = Container(width: 8, height: 8, decoration: BoxDecoration(shape: BoxShape.circle));
final t = MediaQuery(data: MediaQueryData(textScaler: TextScaler.noScaling), child: Text('Hi'));
diff --git a/test/fixtures/slop/web/styles.css b/test/fixtures/slop/web/styles.css
index 4c61f95..3c9025b 100644
--- a/test/fixtures/slop/web/styles.css
+++ b/test/fixtures/slop/web/styles.css
@@ -12,3 +12,10 @@ button {
.card:hover {
transform: scale(1.05);
}
+
+.gradient-title {
+ background: linear-gradient(90deg, #7c3aed, #ec4899);
+ -webkit-background-clip: text;
+ background-clip: text;
+ color: transparent;
+}