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: show copy cursor in grid on key down and not just mouse move #1735

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented Jan 18, 2024

  • Adds copy cell key handler to set cursor on key down. Grid was only showing copy cursor on mouse move, not just key down. Unfortunately we still require focus to get the key down, and I don't think it's worth hacking around that.
  • Moved cursor styles to linker and irisgrid css respectively, so that it is shared to DHE. AppMainContainer.css isn't used in DHE.
  • Moved cursors and logos in to asset folder (folders named "assets" are bundled by Vite
  • Tweaked copy icon svg (aliasing is improved)
  • default cursor to "copy" in iris grid so that it shows in embed widget and DHE

BREAKING CHANGE: linker and iris grid custom cursor styling and assets are now provided by components directly. DHE css and svg files containing linker cursors should be removed/de-duplicated.

- Adds copy cell keyhandler to set cursor on keydown. Grid was only showing copy cursor on mouse move, not just key down. Unfortanetly we still require focus to get the keydown, and I don't think it's worth hacking around that.
- Moved cursor styles to base style sheet, so that it is shared to DHE
- Moved cursors and logos in to asset folder (folders named "asssets" are bundled by vite
- Tweaked copy icon svg (aliasing is improved)
- default cursor to "copy" in iris grid so that it shows in embed widget too

Breaking change: Cursors classes have additional specifity under #root id, DHE classes containing linker and copy cursors can be removed
@dsmmcken dsmmcken requested a review from mofojed January 18, 2024 20:55
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (629ed23) 46.48% compared to head (009a45f) 46.48%.
Report is 1 commits behind head on main.

Files Patch % Lines
...s/iris-grid/src/key-handlers/CopyCellKeyHandler.ts 36.36% 14 Missing ⚠️
packages/grid/src/Grid.tsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1735      +/-   ##
==========================================
- Coverage   46.48%   46.48%   -0.01%     
==========================================
  Files         617      618       +1     
  Lines       37289    37316      +27     
  Branches     9378     9386       +8     
==========================================
+ Hits        17335    17347      +12     
- Misses      19900    19915      +15     
  Partials       54       54              
Flag Coverage Δ
unit 46.48% <44.44%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mofojed
Copy link
Member

mofojed commented Jan 22, 2024

Test on Enterprise with start-community

@dsmmcken
Copy link
Contributor Author

Confirmed it works with start-community

@mofojed mofojed merged commit 0781900 into main Feb 7, 2024
5 checks passed
@mofojed mofojed deleted the dmckenzie_copy_cursor branch February 7, 2024 19:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants