-
Notifications
You must be signed in to change notification settings - Fork 231
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
EDSC-2895: Fix download granule dropdown in table view #1241
Conversation
Need to do a tiny change. I'll mark it for review after that. |
I think that the change necessary here is to just add |
@saurabhdaware good deal. However, notice in your screenshot that there is a green line that goes over the top of the dropdown list. That should be under the dropdown. Also, a reminder to make sure you have a test that covers this bugfix. Thanks! |
Yup, I'll make those changes and add tests. Thank you! |
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.
@saurabhdaware, this is looking awesome. I have one small suggestion. Once that's patched up, this should be good to go.
@@ -76,6 +77,9 @@ describe('GranuleResultsDataLinksButton component', () => { | |||
|
|||
describe('with multiple granule links', () => { | |||
test('renders the correct element', () => { | |||
// Mocks createPortal method of ReactDOM (https://stackoverflow.com/a/60953708/8116576) | |||
ReactDOM.createPortal = jest.fn(modal => 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.
It's strange to use modal
in this case. I would prefer to see this named dropdown
or something more specific to this implementation.
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.
Yes, right! I'll make that change.
Also, we will have to write a test that checks if dropdown opens when it is clicked from table view. (This test only checks if it opens when there are more links). I'll add that test as well then we can merge I guess.
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.
Yes, that is correct. And once this is done, it'll be ready to merge!
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.
Fixed this and added a test for CustomDataLinksToggle component
Hi, I've added test for |
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.
Looks good! Thanks!
@saurabhdaware thank you for your contribution! This fix will go out in our 1.130.x release, which is scheduled for deployment to our Prod environment no later than 10/28/20. Thanks! |
Overview
What is the feature?
Fixes #1227
What is the Solution?
Not 100% sure of the possible cause but it was possibly because rowClick event of table triggering after the onClick of download button so it was immediately removing the dropdown menu.Edit: Changed implementation to use
e.stopPropogation()
What areas of the application does this impact?
It will impact the parts which has the sameonRowClick
function reference that I've made changes into.It checks if it has the
granule-results-data-links-button__button
class to check if it is the download button element.Testing
Reproduction steps
Attachments
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
Checklist