-
Notifications
You must be signed in to change notification settings - Fork 0
add pointer and click handler to order column cells #346
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
Conversation
✅ Deploy Preview for cell-catalog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull Request Overview
This PR adds pointer cursor styling and click handlers to order column cells in table components, allowing users to click anywhere within the cell to open order links.
- Added CSS styling for action column cells with pointer cursor
- Implemented onCell click handlers that open order links in new tabs
- Enhanced user experience by making entire table cells clickable instead of just anchor elements
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/style/table.module.css | Added cursor pointer styling for action columns and disabled state handling |
| src/components/CellLineTable/SharedColumns.tsx | Added onCell click handler to obtainLineColumn for opening order links |
| src/components/CellLineTable/NormalTableColumns.tsx | Added onCell click handler to obtainPlasmidColumn for opening order links |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| .container .action-column:has(.action-button.disabled) { | ||
| cursor: not-allowed; | ||
| } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| onClick: () => { | ||
| if (record.orderLink) { | ||
| window.open(record.orderLink, "_blank", "noopener,noreferrer"); | ||
| } | ||
| }, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| onCell: (record: UnpackedNormalCellLine) => ({ | ||
| onClick: () => { | ||
| if (record.orderPlasmid) { | ||
| window.open(record.orderPlasmid, "_blank", "noopener,noreferrer"); | ||
| } | ||
| }, | ||
| }), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
…talog into fix/order-click-target
Problem
Closes #329
Solution
Added a little CSS and and
onCellproperty for the table cells.It feels like by having the
onCellwe could potentially do away with the anchor tag approach but leaving it in felt like it was more in line with accessibility standards, and we would have to rewrite more of the CSS if we took it out.