Skip to content
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

Fixed row click issue in product's upsell/crosssell/related grids #3865

Merged
merged 6 commits into from
Mar 7, 2024
Merged

Fixed row click issue in product's upsell/crosssell/related grids #3865

merged 6 commits into from
Mar 7, 2024

Conversation

addison74
Copy link
Contributor

When you add/remove/set position in the Related Products / Up-sells / Cross-sells grids, you may face an important issue without realizing it. As the grid functionality was thought by the Magento team, when you click on a row, regardless of the position where the mouse pointer is, the row will be checked or unchecked. As soon as you press any of the [Save] buttons, products may appear or disappear in the grid by mistake. I faced this issue many times when I was editing the position and I didn't click exactly in the box but a little next to it.

related

This PR solves the issue and limits the row click strictly to the grid cell where the checkbox is (the first column). Unlike the Products grid, where the box must be checked strictly in the square, otherwise the product editing page is loaded, this modification is more permissive and the click can be in the entire cell where the box is located (td element).

@github-actions github-actions bot added Component: Catalog Relates to Mage_Catalog Template : admin Relates to admin template Component: Adminhtml Relates to Mage_Adminhtml JavaScript Relates to js/* labels Mar 3, 2024
@addison74
Copy link
Contributor Author

@fballiano - I created this PR directly in Github. There are two commits coming from a previous PR. Please fix this issue for me. Thank you.

@addison74
Copy link
Contributor Author

For this one

/js/mage/adminhtml/grid.js

@fballiano
Copy link
Contributor

this should be ok

@github-actions github-actions bot removed Component: Catalog Relates to Mage_Catalog Template : admin Relates to admin template Component: Adminhtml Relates to Mage_Adminhtml labels Mar 3, 2024
@addison74
Copy link
Contributor Author

Many thanks. This one is ready for testing.

@andrewcbi
Copy link
Contributor

Thank you for this one!

@fballiano
Copy link
Contributor

question, since this PR modifies js/mage/adminhtml/grid.js, isn't it affecting all grids in all backend?

@addison74
Copy link
Contributor Author

addison74 commented Mar 4, 2024

I have checked all the grids in the Backend and the change in this PR affects only the grids that do not have an associated action on a row. Let's take a few examples.

For the products grid in Catalog > Manage Products, when you bring the mouse pointer on a row, it becomes a hand. There is an link for the editing action. All grids that have an action column have the same behavior.

For the subscribers grid in Newsletter > Newsletter Subscriber, the selection is made only on the first column where the checkbox is and not on the whole row as it was until now.

TODO 1: Checking the grids that have actions associated on a row, I noticed a problem that will have to be fixed in another PR. Check/Uncheck on the first column is done only in the checkbox square, if you click a little outside, the page specific to the action is loaded. Selecting a row must be done in the entire cell, not just in the checkbox square only.

TODO 2: For grids that do not have action on a row such as Related Products / Up-sells / Cross-sells / Newsletter Subscribers, the mouse pointer must remain the arrow and not the hand that symbolizes that there is a link. This problem must be fixed in another PR too.

@fballiano fballiano changed the title Row click issue in widget grid Fixed row click issue in product's upsell/crosssell/related grids Mar 6, 2024
Copy link
Contributor

@fballiano fballiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, works. couldn't find any other grid affected by this change

@fballiano fballiano merged commit 2bb591e into OpenMage:main Mar 7, 2024
14 checks passed
@addison74 addison74 deleted the ADDISON74-patch-1 branch March 7, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript Relates to js/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants