fix(web-analytics): Fix mobile design for the new web analytics dashboard#60279
Conversation
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
frontend/src/scenes/web-analytics/WebTileHeader.tsx:116-118
The "Interval" label is hidden with a CSS breakpoint class (`hidden lg:inline`), but the "Open as insight" button text is hidden via the JS `useWindowSize` hook. Using a CSS-only approach here would be consistent with the pattern just above and avoids a re-render on every window resize event. Wrapping the text in a span lets `LemonButton` still receive a React node while CSS controls visibility.
```suggestion
>
<span className="hidden lg:inline">Open as insight</span>
</LemonButton>
```
Reviews (1): Last reviewed commit: "Fix mobile design for the new web analyt..." | Re-trigger Greptile |
| > | ||
| Open as insight | ||
| {isCompactHeader ? undefined : 'Open as insight'} | ||
| </LemonButton> |
There was a problem hiding this comment.
The "Interval" label is hidden with a CSS breakpoint class (
hidden lg:inline), but the "Open as insight" button text is hidden via the JS useWindowSize hook. Using a CSS-only approach here would be consistent with the pattern just above and avoids a re-render on every window resize event. Wrapping the text in a span lets LemonButton still receive a React node while CSS controls visibility.
| > | |
| Open as insight | |
| {isCompactHeader ? undefined : 'Open as insight'} | |
| </LemonButton> | |
| > | |
| <span className="hidden lg:inline">Open as insight</span> | |
| </LemonButton> |
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/web-analytics/WebTileHeader.tsx
Line: 116-118
Comment:
The "Interval" label is hidden with a CSS breakpoint class (`hidden lg:inline`), but the "Open as insight" button text is hidden via the JS `useWindowSize` hook. Using a CSS-only approach here would be consistent with the pattern just above and avoids a re-render on every window resize event. Wrapping the text in a span lets `LemonButton` still receive a React node while CSS controls visibility.
```suggestion
>
<span className="hidden lg:inline">Open as insight</span>
</LemonButton>
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Size Change: 0 B Total Size: 80.2 MB ℹ️ View Unchanged
|
Problem
The mobile design of the new web analytics dashboard wasn't very good
Changes
Update the styling to be more friendly on smaller devices
How did you test this code?
Locally
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Publish to changelog?
No
Docs update
🤖 Agent context