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
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const Default: Story = {
unit: "ms",
raw: 62466300.59999996
},
impactScore: 0,
impactScore: 0.08999,
impactScores: {
ScoreExp25: 0,
ScoreExp1000: 0
ScoreExp25: 0.08999,
ScoreExp1000: 0.08999
},
insights: [
{
Expand Down
18 changes: 8 additions & 10 deletions src/components/Assets/AssetList/AssetEntry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,14 @@ export const AssetEntry = ({
<s.StatsColumn>
<s.Stats>
<span>Performance impact</span>
<Tooltip title={impactScore}>
<s.ValueContainer>
<ImpactScore
score={impactScore}
showIndicator={
sortingCriterion === SORTING_CRITERION.PERFORMANCE_IMPACT
}
/>
</s.ValueContainer>
</Tooltip>
<s.ValueContainer>
<ImpactScore
score={impactScore}
showIndicator={
sortingCriterion === SORTING_CRITERION.PERFORMANCE_IMPACT
}
/>
</s.ValueContainer>
</s.Stats>
</s.StatsColumn>
)}
Expand Down
5 changes: 4 additions & 1 deletion src/components/common/ImpactScore/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getFeatureFlagValue } from "../../../featureFlags";
import { useConfigSelector } from "../../../store/config/useConfigSelector";
import { FeatureFlag } from "../../../types";
import { roundTo } from "../../../utils/roundTo";
import { BackendInfo } from "../App/types";
import { ScoreIndicator } from "../ScoreIndicator";
import { Tooltip } from "../Tooltip";
Expand Down Expand Up @@ -64,8 +65,10 @@ export const ImpactScore = ({
}
}

const formattedScore = `${roundTo(score * 100, 2)}%`;

return (
<Tooltip title={score}>
<Tooltip title={formattedScore}>
<s.Container>
{scoreIndicatorPosition === "start" && <ScoreIndicator score={score} />}
{getImpactScoreLabel(score, backendInfo)}
Expand Down
Loading