Feat/optomize ifw rule screen - #1522
Open
juliewww wants to merge 11 commits into
Open
Conversation
- Move all string resource files (default and translations) from `feature/ifwrule/impl` to `feature/ifwrule/api` to allow shared access across modules - Update R-class import in `IfwRuleEditorScreen.kt` to reference the new location in the API module
- Update string resource identifiers in `feature/ifwrule/api` across multiple languages (zh-rTW, zh-rCN, pt-rBR, vi, fr, es, ar, tr, ru, pt, in, and default) - Rename `feature_ifwrule_impl_*` to `feature_ifwrule_api_*` - Update references in `IfwRuleEditorScreen.kt` to match the new string names
- Relocate `RuleEditorScreenUiState`, `RuleEditorUiState`, and `BlockMode` from `feature:ifwrule` to `core:ui` for better reusability - Update imports and references across `IfwRuleUiMapper`, `IfwRuleEditorViewModel`, and associated tests - Extract stateless `IfwRuleEditorScreen` to support Compose previews - Add `IfwRuleEditorScreenPreviewParameterProvider` with mock data (Loading, Error, Success states) - Implement `IfwRuleEditorScreenPreview` to verify UI states including unsaved changes dialog and different block modes
- Add `IfwRuleEditorScreenshotTests` using Roborazzi - Cover `IfwRuleTreeEditor`, `PortConditionCard`, `GroupEditorCard`, and `ConditionPickerSheet` - Include multi-theme and font scaling (2x) test cases
- Move `RuleEditorScreenUiState` from `core:ui` to `feature:ifwrule:impl` to better align with the feature's scope - Relocate `IfwRuleEditorScreenPreviewParameterProvider` from `core:ui` to `feature:ifwrule:impl` - Update references in `IfwRuleEditorScreen`, `IfwRuleEditorViewModel`, and associated tests - Hardcode conditional editor state in `IfwRuleEditorScreenshotTests` to remove dependency on the relocated preview provider
- Move `IfwRuleEditorScreenshotTests.kt` from `com.merxury.blocker.core.ui.ifwruleeditor` to `com.merxury.blocker.core.ui` - Update Compose test rule to use `createAndroidComposeRule` from `v2` package - Explicitly import internal components from `ifwruleeditor` package due to the relocation - Update `DeviceConfigurationOverride` usage to access `FontScale` via its companion object - Update copyright year to 2026
- Change `IfwRuleEditorScreen` visibility to `internal` to allow access from tests - Add `IfwRuleEditorScreenScreenshotTests.kt` with test cases for block all, conditional, advanced, loading, and error states in both light and dark modes - Clean up `DeviceConfigurationOverride.FontScale` reference in existing tests
…nto feat/optomize-ifw-rule-screen
- Move `IfwFilter.toSummary()` from `core:ifw-api` to `feature:globalifwrule` - Rename the imported extension to `toIntentFilterSummary` in `GlobalIfwRuleMapper` to avoid name collisions - Update internal visibility for the relocated summary utility functions
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.
name: Pull request
about: Create a pull request
label: 'triage me'
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
we can discuss the change, evaluate designs, and agree on the general idea
pass (
./gradlew --init-script gradle/init.gradle.kts spotlessApplyto automatically applyformatting)
Is this your first Pull Request?
./tools/setup.shFixes #<issue_number_goes_here> 🦕