Skip to content

Commit

Permalink
[#88] Replace emoji usages with SVG icons
Browse files Browse the repository at this point in the history
  • Loading branch information
PatilShreyas committed Mar 24, 2024
1 parent 76384f1 commit b42d4fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ package dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.Condition
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.classes.ClassDetail
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.classes.ClassesReport
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CheckIconWithText
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CollapsibleContent
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CrossIconWithText
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.EmptyContent
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.style.Colors
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.style.setStyle
Expand Down Expand Up @@ -68,7 +70,7 @@ fun FlowContent.ClassesReport(
ClassesReport(report.unstableClasses)
}
} else {
EmptyContent("No Unstable classes found 😁")
EmptyContent("No Unstable classes found")
}

if (report.stableClasses.isNotEmpty() && includeStableClasses) {
Expand Down Expand Up @@ -108,8 +110,8 @@ fun FlowContent.ClassesReport(classes: List<ClassDetail>) = table {
h3 {
span(statusCssClass(detail.stability === Condition.STABLE)) {
when (detail.stability) {
Condition.STABLE -> +"Stable"
Condition.UNSTABLE -> +"Unstable"
Condition.STABLE -> CheckIconWithText("Stable")
Condition.UNSTABLE -> CrossIconWithText("Unstable")
else -> +"Missing"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ package dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.Condition
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.composables.ComposableDetail
import dev.shreyaspatil.composeCompilerMetricsGenerator.core.model.composables.ComposablesReport
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CheckIconWithText
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CollapsibleContent
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.CrossIconWithText
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.content.common.EmptyContent
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.style.Colors
import dev.shreyaspatil.composeCompilerMetricsGenerator.generator.style.setStyle
Expand Down Expand Up @@ -112,16 +114,16 @@ fun FlowContent.ComposablesReport(composables: List<ComposableDetail>) = table {
h4 {
span(if (detail.isSkippable) "status-success" else "status-failure") {
if (detail.isSkippable) {
+"Skippable"
CheckIconWithText("Skippable")
} else {
+"Non Skippable"
CrossIconWithText("Non Skippable")
}
}
span(if (detail.isRestartable) "status-success" else "status-failure") {
if (detail.isRestartable) {
+"Restartable"
CheckIconWithText("Restartable")
} else {
+"Non Restartable"
CrossIconWithText("Non Restartable")
}
}
}
Expand Down

0 comments on commit b42d4fa

Please sign in to comment.