Skip to content

Commit bb7a185

Browse files
DominikB2014claude
andauthored
feat(explore): Enlarge chart size for explore Slack unfurls (#112697)
Increase the chart dimensions from the default 450x150 to 1600x1200 for explore Slack unfurls. The small default size renders poorly in Slack, especially in full screen view. Letting Slack handle the downsizing from a larger source image produces much better results. Only the explore unfurl is changed — all other chart types continue using the default size. Fixes DAIN-1491 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 755cff5 commit bb7a185

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sentry/integrations/slack/unfurl/explore.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from sentry import analytics, features
1313
from sentry.api import client
1414
from sentry.charts import backend as charts
15-
from sentry.charts.types import ChartType
15+
from sentry.charts.types import ChartSize, ChartType
1616
from sentry.integrations.messaging.metrics import (
1717
MessagingInteractionEvent,
1818
MessagingInteractionType,
@@ -36,6 +36,8 @@
3636
DEFAULT_PERIOD = "14d"
3737
TOP_N = 5
3838

39+
EXPLORE_CHART_SIZE: ChartSize = {"width": 1600, "height": 1200}
40+
3941

4042
class ExploreDatasetDefaults(TypedDict):
4143
title: str
@@ -152,7 +154,7 @@ def _unfurl_explore(
152154
chart_data["type"] = chart_type
153155

154156
try:
155-
url = charts.generate_chart(style, chart_data)
157+
url = charts.generate_chart(style, chart_data, size=EXPLORE_CHART_SIZE)
156158
except RuntimeError:
157159
_logger.warning("Failed to generate chart for explore unfurl")
158160
continue

0 commit comments

Comments
 (0)