Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show insights by default #10405

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

nickoferrall
Copy link
Contributor

Fix #10244

To test

  • Apply the insights feature flag to a team that you're the team lead of
  • When you visit the team dash, the Insights tab shows by default
  • When you return for a second time, the Activity tab is shown by default

@@ -132,42 +136,55 @@ const TeamDashHeader = (props: Props) => {
...(canViewInsights ? [{label: 'Insights', path: 'insights'}] : [])
]

const insightsSeenKey = `insightsSeen_${teamId}`
const isLocalStorageAvailable = typeof window !== 'undefined' && window.localStorage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Any reason we explicitly check this here? I don't see this checked in other places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local storage might not be available, like in Safari's incognito mode. It could throw an error without the check

@nickoferrall nickoferrall merged commit f67328f into master Oct 24, 2024
7 checks passed
@nickoferrall nickoferrall deleted the feat/10244/show-insights-tab-by-default branch October 24, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insights: show Insights tab by default if viewer hasn't seen it
2 participants