Skip to content

Conversation

snowystinger
Copy link
Member

@snowystinger snowystinger commented Aug 21, 2025

Closes RSP Component Milestones (view)

Implements our Editable Cell component for Table's. Note, this is called inline editing by Spectrum at the moment, but it does not correlate to aria inline editing.
This essentially works around the issue of textfields in cells or anything else in cells.

Will be adding more tests

✅ 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:

@rspbot
Copy link

rspbot commented Aug 21, 2025

@rspbot
Copy link

rspbot commented Aug 21, 2025

@rspbot
Copy link

rspbot commented Aug 25, 2025

@rspbot
Copy link

rspbot commented Aug 25, 2025

@rspbot
Copy link

rspbot commented Aug 25, 2025

@rspbot
Copy link

rspbot commented Aug 25, 2025

@rspbot
Copy link

rspbot commented Aug 25, 2025

@rspbot
Copy link

rspbot commented Aug 27, 2025

@rspbot
Copy link

rspbot commented Aug 27, 2025

let boundaryStartEdge = boundaryDimensions.scroll[AXIS[axis]] + padding;
let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[AXIS[axis]] - padding;
let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[AXIS[axis]];
let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis];
Copy link
Member Author

Choose a reason for hiding this comment

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

ignore this change for a bit, might be a bug in our positioning code

…plementation to make generic, fix density, individual cell saving state, use touch detection for showing all the time
**/
onAction?: () => void
onAction?: () => void,
focusMode?: 'cell' | 'child'
Copy link
Member Author

Choose a reason for hiding this comment

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

change we'd need to make if we want to support edit mode on some cells vs others

@rspbot
Copy link

rspbot commented Aug 28, 2025

context={TextContext}
value={{
slots: {
[DEFAULT_SLOT]: {styles: label({size})},
Copy link
Member Author

Choose a reason for hiding this comment

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

this is just a missing feature we should really have in S2

@rspbot
Copy link

rspbot commented Sep 1, 2025

@rspbot
Copy link

rspbot commented Sep 1, 2025

@rspbot
Copy link

rspbot commented Sep 2, 2025

@rspbot
Copy link

rspbot commented Sep 4, 2025

@rspbot
Copy link

rspbot commented Sep 4, 2025

@rspbot
Copy link

rspbot commented Sep 18, 2025

# Conflicts:
#	packages/@react-spectrum/s2/src/ActionButton.tsx
#	packages/@react-spectrum/s2/stories/TableView.stories.tsx
#	packages/react-aria-components/src/Button.tsx
#	packages/react-aria-components/test/Button.test.js
@rspbot
Copy link

rspbot commented Sep 19, 2025

@rspbot
Copy link

rspbot commented Sep 19, 2025

@rspbot
Copy link

rspbot commented Sep 19, 2025

@rspbot
Copy link

rspbot commented Sep 19, 2025

@snowystinger snowystinger changed the title wip: table inline editing feat: table "inline" editing Oct 1, 2025
@snowystinger snowystinger marked this pull request as ready for review October 1, 2025 05:28
@rspbot
Copy link

rspbot commented Oct 1, 2025

@rspbot
Copy link

rspbot commented Oct 1, 2025

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:EditableCell

+EditableCell {
+  align?: 'start' | 'center' | 'end' = 'start'
+  children: ReactNode
+  className?: ClassNameOrFunction<CellRenderProps>
+  colSpan?: number
+  id?: Key
+  isSaving?: boolean
+  onCancel: () => void
+  onSubmit: () => void
+  renderEditing: () => ReactNode
+  showDivider?: boolean
+  style?: StyleOrFunction<CellRenderProps>
+  textValue?: string
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants