-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Add new domain/device type dropdown for Web Analytics + filters UI revamp ✨ #29083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Based on the provided files, I'll summarize the key changes in this PR that adds a new domain dropdown for web analytics:
This PR introduces significant UI improvements for web analytics domain management:
- Added new domain dropdown using
LemonSelect
with authorized URLs list in the web analytics dashboard header - Restructured the filters section into
AllFilters
andFoldableFields
components for better organization and responsiveness - Created new
WebAnalyticsLiveUserCount
component with an animated online/offline indicator and user count display - Improved responsive layout handling across desktop, tablet and mobile views with collapsible filters
- Added health check warning when no authorized domains are configured, guiding users to set them up in settings
Key implementation details:
- Moved URL management from toolbar-specific to a more general authorized URLs system
- Added domain filter state management in
webAnalyticsLogic
with URL sync and persistence - Filters out
$host
property filters since they're now controlled by the domain dropdown - Consolidated settings by replacing
TeamToolbarURLs
withTeamAuthorizedURLs
for broader URL management
The changes represent a significant UI overhaul focused on improving usability across different device sizes while maintaining core functionality.
19 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
frontend/src/lib/components/AuthorizedUrlList/AuthorizedUrlForm.tsx
Outdated
Show resolved
Hide resolved
Didn't you have a warning about you having no set-up domains? I set one up like the ones we have for missing
Yeah, aware, I'll add a way to "disable" specific filters from being added, that doesn't exist yet, so I chose to just let it die silently
That's what I'm doing actually, I wonder why that doesn't work for you? I'm seeing
Oh yeah, good call. I just reused the UI we have, but it needs to be improved before we launch this, let me take that UI for a ride |
473b6c8
to
dd598ac
Compare
@robbie-c @lricoy ready for the second round.
|
dd598ac
to
a4f6ee5
Compare
Size Change: +197 B (0%) Total Size: 9.72 MB ℹ️ View Unchanged
|
I think hiding the host filter option there is a sensible choice. Maybe adding a informative note on the "empty result" or disabling it instead could also work but I would go with hiding for now to avoid impossible states. |
f633774
to
34c85d3
Compare
Just organize this slightly better
We're now making the authorized URLs a slightly higher level configuration because this will be more important now that you'll be able to filter by it in Web Analytics
These change the UI too heavily and I don't want them to happen locally, so let's turn them off locally by default by adding them to `INACTIVE_FLAGS`
There's still a little bit missing, but it's almost there, see TODOs
This will clean up some space for web analytics on middle-sized screens. We're also further hiding it behind a button on even smaller screens (mobile only)
It's not immediately useful and it's making the UI slightly confusing, so let's remove that
I'm not sure this is the right approach, we might want this one to be added in here just fine but I'll discuss this on the PR
Simplify display logic by letting each individual filter control when they are rendered
34c85d3
to
8afb9f9
Compare
📸 UI snapshots have been updated66 snapshot changes in total. 0 added, 66 modified, 0 deleted:
Triggered by this commit. |
And make it occupy full width on non-web-vitals
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
Ha nice one!
I still found some slightly weird interactions here. I managed to get into a state where I have a host filter set, but it doesn't show up in either the domain chooser UI or the filters UI. The only way I know it's set is that it's still in the URL. Here's a link: http://localhost:8000/project/1/web?filters=%5B%7B%22key%22%3A%22%24host%22%2C%22value%22%3A%5B%22hedgebox.net%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22event%22%7D%2C%7B%22type%22%3A%22event%22%2C%22key%22%3A%22%24host%22%2C%22value%22%3A%22all%22%2C%22operator%22%3A%22exact%22%7D%5D&path_cleaning=false&filter_test_accounts=false&compare_filter=%7B%22compare%22%3Atrue%7D&domain=all I'm happy to merge though, let's keep this moving forward especially with a diff this big |
Problem
We want a domain dropdown on web analytics! It'll look much nicer.
Changes
There are a lot of changes. I'm not hiding anything behind a FF because the change is pretty big, and I didn't want to keep the old code around. I had to change a lot of it.
Desktop view is nicer, tablet view is much better, mobile view is 2000% better. It feels like an actual thought-out navbar now - I put way too much thought into it, 2 days to build this.
See video to understand what it looks like now, snapshots should update too
https://www.loom.com/share/e454b9890a8f4397b685e326ef1575bc?sid=31ca6ef8-d45b-4a63-b3b4-9df3d5d48c9b
Does this work well for both Cloud and self-hosted?
Yep
How did you test this code?
Manually, plus snapshots will update