-
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
Autosuggest data-* attribute-based selectors over className based selectors #2140
Comments
@tino are you self-hosting or on app.posthog.com? |
@timgl Self-hosting |
@tino The reason for this dat this attribute is on an input element. We try to be really strict around the data we capture from input elements (only name, id and class attributes), as other companies have messed this up in the past. If you put the attribute on the div it will be captured. Sorry about that! |
@mariusandra had a look at adding this to our fork at https://github.com/mariusandra/simmerjs/tree/local-release. One thing I had questions on was that we're not following w3c-s specificity ruleset - can you give context on why we dropped that? |
@macobo if I remember correctly, it's because a |
This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the |
This issue was closed due to lack of activity. Feel free to reopen if it's still relevant. |
Is your feature request related to a problem?
Creating actions requires some technical know-how and is quite involved.
I've now been in two interviews where the automatically suggested selector were not great:
data-testid
attributes internally for testing which could be used.data-test-foobar
was the attribute they were hoping to be usedDescribe the solution you'd like
If element has unusual data-attributes, suggest those over class-based ones.
We already seem to have a special case for one data-attribute,
data-attr
but we should expand it for other data attributes as well. https://github.com/PostHog/posthog/blob/5729fb5/frontend/src/toolbar/utils.ts#L59-L62Additional context
cc @ukupat and @andrestaht
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered: