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
Visual Experiments - Add EditDOMMutations modal #1394
Conversation
Your preview environment pr-1394-bttf has been deployed. Preview environment endpoints are available at: |
visualChange | ||
); | ||
|
||
const deleteCustomJS = useCallback(() => { |
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.
nit: useCallback for these seems unnecessary, as it's a very inexpensive operation
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.
That's fair. It comes from a force of habit. I don't equate useCallback
as a thing to use when something is expensive but rather when 'we don't need to redefine this function per render'
Thanks @bryce-fitzsimons Largely agree with your feedback. I've updated the UI as follows, let me know what you think |
onClick={() => deleteDOMMutation(i)} | ||
style={{ fontSize: "1.2rem", paddingLeft: "0.3rem" }} | ||
> | ||
× |
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.
IMO this one looks out of place compared to the other delete links
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.
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.
Complicated! But good enough I think.
…/growthbook/growthbook into adnan/delete-visual-change-modal
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.
lgtm
This is a simple modal available on the Experiments page that allows a user to delete 1. Global CSS 2. Custom JS or 3. Any single DOM mutation from a variation in their Visual Experiment
Closes #1393
Screenshots