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: Improvements to the toolbar launch page #28300

Merged
merged 14 commits into from
Feb 5, 2025

Conversation

rafaeelaudibert
Copy link
Member

Problem

This page is not our best, some customers are confused about how they should use it.

Solution

Let's add much more meaningful error messages and suggestions on what customers should do. Let's also allow them to easily refresh and get the newly suggested URLs.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances the toolbar launch page UX by improving error messaging, adding URL suggestions, and providing better guidance for users setting up authorized URLs.

  • Added new ToolbarLaunch.stories.tsx with comprehensive test scenarios for different states (default, no URLs, no suggestions, empty)
  • Enhanced AuthorizedUrlList component with inline loading states and contextual help text in /frontend/src/lib/components/AuthorizedUrlList/AuthorizedUrlList.tsx
  • Added conditional feature highlights for Web Experiments and Web Vitals based on feature flags in /frontend/src/scenes/toolbar-launch/ToolbarLaunch.tsx
  • Streamlined authorizedUrlListLogic.ts by removing unused query field and improving key generation logic

4 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

@rafaeelaudibert rafaeelaudibert changed the title Improvements to the toolbar launch page feat: Improvements to the toolbar launch page Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Size Change: +5 B (0%)

Total Size: 1.17 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.17 MB +5 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Member

Choose a reason for hiding this comment

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

would have been cool to get the stories in and then the changes so we could see them here :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, absolutely. I'd totally do that if it wasn't for our flappy CI, hope you can understand :)

Copy link
Member

Choose a reason for hiding this comment

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

🫠

Copy link
Member

Choose a reason for hiding this comment

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

this rechecking is a great idea!

}

export const authorizedUrlListLogic = kea<authorizedUrlListLogicType>([
path((key) => ['lib', 'components', 'AuthorizedUrlList', 'authorizedUrlListLogic', key]),
key((props) => (props.experimentId ? `${props.type}-${props.experimentId}` : `${props.type}-${props.actionId}`)),
key((props) =>
props.experimentId
Copy link
Member

Choose a reason for hiding this comment

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

i know you didn't add this but we could just template all these things into the string regardless of presence... it doesn't matter if we ahve undefined in the key so long as its stable and it is one less thing to think about

total nitpick though

Copy link
Member

@robbie-c robbie-c Feb 5, 2025

Choose a reason for hiding this comment

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

We probably should do this as the values for experimentId and actionId can overlap. Unlikely to be a problem in practice but things might change 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

That's an excellent point, thanks guys :)

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

only scanned the code. functionality looks good to me

dumped a few nits around the place but you're welcome to ignore or follow-up instead of looping here

💯 for adding the stories

Copy link
Member

@robbie-c robbie-c left a comment

Choose a reason for hiding this comment

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

Did a quick scan, I agree with @pauldambraand don't have anything else to add :)

rafaeelaudibert added a commit that referenced this pull request Feb 5, 2025
@rafaeelaudibert rafaeelaudibert enabled auto-merge (squash) February 5, 2025 16:24
@rafaeelaudibert
Copy link
Member Author

Excuse me wat
image

rafaeelaudibert added a commit that referenced this pull request Feb 5, 2025
rafaeelaudibert and others added 8 commits February 5, 2025 13:54
This might make our features slightly more discoverable
There are cases where neither action or experiment are passed id, so let's create that store properly
`query` is not being used inside the logic, so let's remove it
The toolbar authorized url list empty state is now much nicer. We're giving people more explanation on what's happening and what they should do to get the toolbar to work. We're also allowing them to refresh the suggestion to grab domains from new events.
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

10 snapshot changes in total. 0 added, 10 modified, 0 deleted:

  • chromium: 0 added, 10 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@rafaeelaudibert rafaeelaudibert merged commit 4b1f107 into master Feb 5, 2025
103 checks passed
@rafaeelaudibert rafaeelaudibert deleted the improvements-toolbar branch February 5, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants