react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

(WIP) Add renderProp support for if a Table row has visible focus within it

Open LFDanLu opened this issue 1 year ago โ€ข 6 comments

Closes https://github.com/adobe/react-spectrum/issues/5258

useful for making a row style that remains applied when anything in the table row is focused, not just the row itself (e.g. make the whole row blue when a cell inside is keyboard focused). Needed for S2.

Other changes to come as I run into them while working on S2

โœ… Pull Request Checklist:

  • [ ] Included link to corresponding React Spectrum GitHub Issue.
  • [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [ ] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

๐Ÿ“ Test Instructions:

๐Ÿงข Your Project:

RSP

LFDanLu avatar May 08 '24 21:05 LFDanLu

Can be linked to: https://github.com/adobe/react-spectrum/issues/5258 (my initial issue was to support it across whole RAC, but only needed it in the Row, which this PR seems to add ๐Ÿ™ )

jaknas avatar May 17 '24 10:05 jaknas

@jaknas thanks for the issue link (may have slipped my mind to see if anyone filed a issue for this change when making the PR ๐Ÿ˜…). I'm still evaluating what other elements should also expose some version of isFocusVisibleWithin as I work on styling an adjacent component that uses RAC table but can definitely get this merged in for now so a nightly can built. Do you also need info for isFocusWithin or is isFocusVisibleWithin sufficient for your use case?

LFDanLu avatar May 22 '24 00:05 LFDanLu

@jaknas thanks for the issue link (may have slipped my mind to see if anyone filed a issue for this change when making the PR ๐Ÿ˜…). I'm still evaluating what other elements should also expose some version of isFocusVisibleWithin as I work on styling an adjacent component that uses RAC table but can definitely get this merged in for now so a nightly can built. Do you also need info for isFocusWithin or is isFocusVisibleWithin sufficient for your use case?

I can't say for sure without testing. isFocusVisibleWithin should be enough for starters.

jaknas avatar May 28 '24 13:05 jaknas

@jaknas gotcha, I'll see about getting this merged in early then so we can get a nightly out for testing.

LFDanLu avatar May 28 '24 16:05 LFDanLu

## API Changes

unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'identifier', name: 'Column' } unknown top level export { type: 'identifier', name: 'Column' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' }

rspbot avatar May 28 '24 16:05 rspbot