-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Filtering by multiple custom properties #3719
Conversation
We can't allow choosing the same property multiple times without changing the request params, which we decided against
…stom prop filter applied This was a limitation (I believe) introduced by using ARRAY JOINs to query custom properties
c4bd409
to
dbabccd
Compare
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.
The code looks good to me, but before approving I'd like to verify the UI on staging 👍
Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
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.
Some more comments after having tested the UI out on staging.
- Looks like
contains
filter breaks when multiple clauses are selected.
will return 500 in all the reports.
- In the custom prop breakdown report we’re allowing the user to pick any property from the dropdown.
I think only the prop_keys that have hits should be returned. What I mean is, it should not be possible to break down by a prop and then only see the (none)
value in the returned list.
I suspect line 137 in filter_suggestions.ex is to blame, since it’s calling Query.remove_event_filters(query, [:props])
. I don’t think we should do that anymore.
One comment about UX. Take this case:
The result is that the filter for the |
924c785
to
d79ae9c
Compare
d79ae9c
to
70b4c72
Compare
PR has been updated @RobertJoonas @ukutaht - please give it another look. To make reviewing the changes easier here's an overview of new changes:
|
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.
Nice, we're getting there! Not quite done with feedback yet, sorry... 😄
In addition to the inline comments I had about the code, I've tested things out locally, and noticed a couple of new things:
- In the prop filter modal, the blue "Add filter" button/link boundaries are huge and it feels a little weird when you click on a blank space and it will append new input fields into the view.
![image](https://private-user-images.githubusercontent.com/56999674/301255022-93b388d7-7c4f-4fbb-91fe-9c27f2730813.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5NTg4MzUsIm5iZiI6MTcyMTk1ODUzNSwicGF0aCI6Ii81Njk5OTY3NC8zMDEyNTUwMjItOTNiMzg4ZDctN2M0Zi00ZmJiLTkxZmUtOWMyN2YyNzMwODEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDAxNDg1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4NTQxYWQ1MTIxZTlkNWEwNjYyZmE2OTc5Y2M1YTY3NGVhMTQ3NjJhZmU5NzI0NWM0YmNiN2ViODA3YzNhNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WGsh2FQw-wJFJQ_dXGQ-LhA1JRHpwj5zVMnD3pH7c1M)
-
It looks like
prop_key
suggestions are returned without the constraint of having them set up insite.allowed_event_props
. We implemented this to "filter out garbage props" that we don't want displayed there. And another reason is to enforce customers to configure the props they want to see in the dashboard. I made sure it's working on prod, so I suppose it's introduced with this PR? -
Question: Is it the intended behaviour that the selected property in the behaviours (property breakdown) section will change when you add/remove filters? When I interact with the filters, I don't really expect the breakdown property to change 🤔
Screen.Recording.2024-01-31.at.17.36.01.mov
Thank you for the review, no need to apologize, you are great! 🙇
Fixed.
That's odd - I didn't change anything here. I tried to reproduce by going to site settings > delete a prop > back to dashboard and the deleted property no longer showed.
Good question. This behavior existed pre-this-pr to avoid showing a blank screen when user would like to break down by a property that's not available. I think this is an easy fix but requires a bit of back-and-forth - would you be okay if I fixed this in a separate PR (for easier reviewability)? |
Hmm weird, I can't reproduce either anymore. You can ignore it for now then
Sure, makes sense! |
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.
Nice! Only docs left 👍
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.
🚀
…changes Follow-up to #3719 The previous behavior was predicated on: - Allowing a single custom property filter - Allowing breaking down only by the chosen custom property filter Now these restrictions are removed the previous auto-switching just becomes annoying
Feedback from original PR: #3719 (comment) The FE approach would run into problems if you have >25 custom props, so excluding in the BE allows avoiding problems
Changes
This PR adds support to allow:
Follow-up to #3708
Constraints:
Other notes:
Click here to see some screenshots!
Tests
Changelog
Documentation