Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions compose-stability-analyzer-idea/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
- Double-clicking on property names in tool window now navigates to correct source location
- Extended source location search to include `KtProperty` declarations in addition to `KtNamedFunction`

### Improved
- **Enhanced tool window handling of ignored type patterns** (Issue #74)
- Ignored parameters are now displayed as stable instead of being hidden completely
- Composable skippability is recalculated based on processed parameters after applying ignore patterns
- Composables with only ignored unstable parameters now correctly show as skippable
- Provides better visibility of composable signatures while respecting ignore patterns

---

## [0.6.1] - 2025-12-06
Expand Down
1 change: 1 addition & 0 deletions compose-stability-analyzer-idea/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ intellijPlatform {
<b>0.6.2</b>
<ul>
<li><b>Fixed property source file location and navigation in tool window</b> (Issue #67) - Properties now show correct file name and double-click navigation works</li>
<li><b>Improved ignored type pattern handling in tool window</b> (Issue #74) - Ignored parameters display as stable and composable skippability is recalculated accordingly</li>
</ul>
<b>0.6.1</b>
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,35 @@ public class StabilityToolWindow(private val project: Project) {
val settings = com.skydoves.compose.stability.idea.settings.StabilitySettingsState.getInstance()
val ignoredPatterns = settings.getIgnoredPatternsAsRegex()

// Filter composables based on current filter type and ignored patterns
val filteredComposables = when (currentFilter) {
FilterType.ALL -> allComposables
FilterType.SKIPPABLE -> allComposables.filter { it.isSkippable }
FilterType.UNSKIPPABLE -> allComposables.filter { !it.isSkippable }
}.map { composable ->
// Filter out ignored parameters
val filteredParameters = composable.parameters.filter { param ->
!shouldIgnoreParameter(param.type, ignoredPatterns)
// Process all composables: mark ignored parameters as stable and recalculate skippability
val processedComposables = allComposables.map { composable ->
// Mark ignored parameters as stable instead of removing them
val processedParameters = composable.parameters.map { param ->
if (shouldIgnoreParameter(param.type, ignoredPatterns)) {
// Treat ignored parameters as stable
param.copy(isStable = true, isRuntime = false)
} else {
param
}
}
composable.copy(parameters = filteredParameters)

// Recalculate skippability: a composable is skippable if all parameters are stable
// (after applying ignore patterns)
val allParametersStable = processedParameters.all { it.isStable }
val isSkippable = composable.isRestartable &&
(processedParameters.isEmpty() || allParametersStable)

composable.copy(
parameters = processedParameters,
isSkippable = isSkippable,
)
}

// Filter composables based on current filter type
val filteredComposables = when (currentFilter) {
FilterType.ALL -> processedComposables
FilterType.SKIPPABLE -> processedComposables.filter { it.isSkippable }
FilterType.UNSKIPPABLE -> processedComposables.filter { !it.isSkippable }
}

val stats = StabilityStats(
Expand Down
Loading