Skip to content

Feat/optomize ifw rule screen - #1522

Open
juliewww wants to merge 11 commits into
mainfrom
feat/optomize-ifw-rule-screen
Open

Feat/optomize ifw rule screen#1522
juliewww wants to merge 11 commits into
mainfrom
feat/optomize-ifw-rule-screen

Conversation

@juliewww

@juliewww juliewww commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way
    we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter
    pass (./gradlew --init-script gradle/init.gradle.kts spotlessApply to automatically apply
    formatting)
  • Appropriate docs were updated (if necessary)

Is this your first Pull Request?

  • Run ./tools/setup.sh
  • Import the code formatting style as explained in the setup script.

Fixes #<issue_number_goes_here> 🦕

juliewww and others added 11 commits March 30, 2026 16:00
- 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
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants