Create PageHeader Compose component and templates tab in ADS#7625
Merged
GerardPaligot merged 13 commits intodevelopfrom Mar 16, 2026
Merged
Create PageHeader Compose component and templates tab in ADS#7625GerardPaligot merged 13 commits intodevelopfrom
GerardPaligot merged 13 commits intodevelopfrom
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
96574b2 to
2d653b6
Compare
22c8785 to
d872b05
Compare
d872b05 to
f76f0da
Compare
2d653b6 to
28d4cf1
Compare
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
mikescamell
reviewed
Mar 10, 2026
28d4cf1 to
45137d8
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Unescaped dots in regex pattern cause incorrect matching
- Escaped
COLOR_THEME_PACKAGEwithRegex.escapebefore building the import regex so package dots are treated as literals.
- Escaped
Or push these changes by commenting:
@cursor push eb6c5c9c79
Preview (eb6c5c9c79)
diff --git a/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt b/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
--- a/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
+++ b/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
@@ -165,8 +165,9 @@
identifier: String,
): Boolean {
if (fileText.isBlank()) return false
+ val escapedThemePackage = Regex.escape(COLOR_THEME_PACKAGE)
val escapedIdentifier = Regex.escape(identifier)
- val importRegex = Regex("""import\s+$COLOR_THEME_PACKAGE\.$escapedIdentifier(\s+as\s+\w+)?""")
+ val importRegex = Regex("""import\s+$escapedThemePackage\.$escapedIdentifier(\s+as\s+\w+)?""")
return importRegex.containsMatchIn(fileText)
}
mikescamell
reviewed
Mar 16, 2026
| ktlint_standard_kdoc-wrapping = disabled | ||
|
|
||
| [android-design-system/**/ui/compose/**/*.kt] | ||
| ktlint_standard_enum-entry-name-case = disabled No newline at end of file |
mikescamell
reviewed
Mar 16, 2026
mikescamell
reviewed
Mar 16, 2026
mikescamell
approved these changes
Mar 16, 2026
Contributor
mikescamell
left a comment
There was a problem hiding this comment.
LGTM, awesome work!
I think we should address the comments I made but approving not to block after the changes have been made.
a06929f to
a918eea
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Lint rule substring match allows non-text color paths
- I changed the semantic path check to require
DuckDuckGoTheme.colors.text.sotextFieldand other non-text paths no longer match.
- I changed the semantic path check to require
Or push these changes by commenting:
@cursor push cfdd74247c
Preview (cfdd74247c)
diff --git a/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt b/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
--- a/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
+++ b/lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt
@@ -87,7 +87,7 @@
private fun containsSemanticThemeColorPath(source: String): Boolean {
return source.contains("DuckDuckGoTheme.textColors") || // legacy
source.contains(".textColors.") ||
- source.contains("DuckDuckGoTheme.colors.text") || // preferred
+ source.contains("DuckDuckGoTheme.colors.text.") || // preferred
source.contains(".colors.text.")
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Task/Issue URL: https://app.asana.com/1/137249556945/project/1212015278241917/task/1211670072973939?focus=true
Description
Create DaxPageHeader component in Compose for settings screens.
Steps to test this PR
Check DaxPageHeader
UI changes
Note
Medium Risk
Adds new Compose UI components and a new ADS demo tab, plus significantly broadens the custom lint detector logic for
DaxTextcolor validation, which could introduce new/changed warnings in builds.Overview
Adds new Compose UI templates:
DaxPageHeader(optional icon/subtitle/body/status/learn-more) and a supportingDaxStatusIndicator/Statusenum, with previews.Extends the ADS demo by adding a new Templates tab (
TemplatesFragment/TemplatesPane) to showcaseDaxPageHeader, and refactors compose view setup by introducing aComposeView.setupThemedComposeViewhelper.Updates the custom lint rule
InvalidDaxTextColorUsageto allowDuckDuckGoTheme.colors.text(and legacytextColors), allow theme static colors, and validate colors referenced via defaults objects; baselines are adjusted accordingly and tests are expanded to cover the new acceptance rules.Written by Cursor Bugbot for commit a918eea. This will update automatically on new commits. Configure here.