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

fix: possible fix for the cell losing focus when clicking on the border #4080

Conversation

sharath-1517
Copy link
Contributor

@sharath-1517 sharath-1517 commented Dec 16, 2024

Fixes #2987

Technical details

  • Found that the cell was given box-shadow for the [data-active-cell] element.
  • I have changed the box-shadow to outline and set outline-offset in order to make sure that the outline stays inside the cell avoiding overlaps with other cells.

Screenshots

  • Active state of the cell
Screenshot 2024-12-16 at 4 27 45 PM
  • Inactive state of the cell
Screenshot 2024-12-16 at 4 27 47 PM

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I tried running the project locally and verified that there are no
    visible errors.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@sharath-1517 sharath-1517 changed the title Possible fix for the cell losing focus when clicking on the border fix: possible fix for the cell losing focus when clicking on the border Dec 16, 2024
@zackkrida zackkrida requested a review from seancolsen December 17, 2024 15:53
@zackkrida zackkrida added the pr-status: review A PR awaiting review label Dec 17, 2024
Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

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

Here's what I'm seeing in Chrome and Firefox:

image

image

  • Cell content is displaying right next to the cell border. This is a regression.
  • I don't see any outline to indicate the active cell. That's also a regression.

Since this doesn't seem ready to merge on first glance, I haven't spent time looking at the code.

@seancolsen seancolsen added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Dec 18, 2024
@sharath-1517
Copy link
Contributor Author

Thank you for the review. I'll make sure to check to check in other browsers as well the next time. @seancolsen could you list out the browsers that I need to check with for each UI change please? Thanks!

@seancolsen
Copy link
Contributor

could you list out the browsers that I need to check

Generally just only one browser, so long as it's a relatively recent one. We very rarely run into browser-specific issues, so I don't think it's worth the time to check multiple browsers regularly. I mentioned two in my comment above because I was surprised and confused at the possibility that I might be seeing something different from what you're seeing. If that does end up being the case, we can continue troubleshooting to figure out why.

@sharath-1517
Copy link
Contributor Author

could you list out the browsers that I need to check

Generally just only one browser, so long as it's a relatively recent one. We very rarely run into browser-specific issues, so I don't think it's worth the time to check multiple browsers regularly. I mentioned two in my comment above because I was surprised and confused at the possibility that I might be seeing something different from what you're seeing. If that does end up being the case, we can continue troubleshooting to figure out why.

Sure Sean, I get you. I guess I'll check cross browser issues for this issue, since I saw an issue live in your dev in firefox and chromium. I'll let you know if I get to know anything or make push it so you can take a look on it.

@zackkrida
Copy link
Contributor

@seancolsen I'd be curious for you to test this again. I'm seeing the correct behavior in Chrome Version 131.0.6778.139 (Official Build) (64-bit) and Firefox 133.0.3 (64-bit) for Fedora.

Screenshot From 2024-12-18 10-19-32

This appears to fix the documented bug, and also has a nice benefit of fixing an older behavior where table headers covered the cell focus:

image

@zackkrida zackkrida added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Dec 18, 2024
@zackkrida zackkrida assigned seancolsen and unassigned sharath-1517 Dec 18, 2024
@sharath-1517
Copy link
Contributor Author

sharath-1517 commented Dec 18, 2024

@zackkrida: So do you think I dont have to check potential issues which Sean faced Zack?

@zackkrida
Copy link
Contributor

@sharath-1517 based on the code changes, which only change from using box-shadow to an offset outline for the cell border, I believe @seancolsen may have been facing a different issue or configuration problem. It's not clear to me how the code here would produce the result in his screenshot.

I'd like to have Sean take another look before you check potential issues. Thanks!

@sharath-1517
Copy link
Contributor Author

@sharath-1517 based on the code changes, which only change from using box-shadow to an offset outline for the cell border, I believe @seancolsen may have been facing a different issue or configuration problem. It's not clear to me how the code here would produce the result in his screenshot.

I'd like to have Sean take another look before you check potential issues. Thanks!

Got it, thanks!

@seancolsen
Copy link
Contributor

Thanks @zackkrida. I tried again. Yeah, something must have been messed up when I first viewed this.

I tried again, and here's what I'm seeing:

image

This seems consistent with the screenshots in the PR description, so I'll continue my review from here...

This is still not okay because it modifies the visual design of the active cell indicator. I have exactly the same feedback here as the feedback I left on a previous PR attempting to tackle this same issue. The indicator needs to extend outside the active cell.

Consider some sort of pointer-events: none; CSS or something. I've not dug into it myself, but I don't imagine it would be that tricky. Perhaps it is though. But that's what we're after: no visual changes. Just changes in click behavior.

@seancolsen seancolsen added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Dec 18, 2024
@sharath-1517
Copy link
Contributor Author

Thanks @zackkrida. I tried again. Yeah, something must have been messed up when I first viewed this.

I tried again, and here's what I'm seeing:

image

This seems consistent with the screenshots in the PR description, so I'll continue my review from here...

This is still not okay because it modifies the visual design of the active cell indicator. I have exactly the same feedback here as the feedback I left on a previous PR attempting to tackle this same issue. The indicator needs to extend outside the active cell.

Consider some sort of pointer-events: none; CSS or something. I've not dug into it myself, but I don't imagine it would be that tricky. Perhaps it is though. But that's what we're after: no visual changes. Just changes in click behavior.

Hey Sean yes of course I read the previous PR conversation just right after I created this PR. I will make sure to make some research on it and fix it up if that's alright? Also could you assign me this issue? Thanks!

@sharath-1517
Copy link
Contributor Author

@seancolsen seems like you've already assigned me, please kindly ignore that question from previous comment. Thanks for your patience.

@sharath-1517
Copy link
Contributor Author

I am closing this PR since I couldn't find any leads on this issue. If I get to know anything that could be used to fix this issue I'll create a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: revision A PR awaiting follow-up work from its author after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cell loses focus when clicking on its outline
4 participants