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

TableCellView tabbableChildren should support changing dynamically #2210

Open
msmithNI opened this issue Jun 24, 2024 · 2 comments
Open

TableCellView tabbableChildren should support changing dynamically #2210

msmithNI opened this issue Jun 24, 2024 · 2 comments
Assignees

Comments

@msmithNI
Copy link
Contributor

msmithNI commented Jun 24, 2024

🧹 Tech Debt

Currently TableCellView tabbableChildren is assumed to be static (or at least, the number of elements in it not changing). This may not be true generally - changes to table/ column configuration may necessitate it changing (more/less interactive elements in a cell; alternatively, an interactive element may get disabled, in which case it's no longer tabbable, and should no longer be included).

We should consider making this property @observable, and updating keyboard focus as needed if it changed (re-focus cell if it changes or the current focus is no longer valid, potentially).

See PR comment thread

@msmithNI
Copy link
Contributor Author

msmithNI commented Jun 24, 2024

Of note, we may be avoiding a potential error case related to this just due to the focusedRecycleCallback right now - if an anchor is focused when data changes, it'll be blurred, in which case focus resets to the cell. So we shouldn't end up in a case where cellContentIndex is out of bounds even if tabbableChildren changed (anchor link present in initial data, not in updated data).

Edit: Even with the PR where focusedRecycleCallback is removed, this doesn't look like it's an issue. KeyboardNavigationManager.handleChange() will still focus the cell in this case, which has the same effect (focusType is no longer cellContent, so cellContentIndex is irrelevant until the content is refocused if possible).

@m-akinc m-akinc moved this to Current Iteration in Nimble Design System Priorities Jun 25, 2024
@m-akinc m-akinc removed the triage New issue that needs to be reviewed label Jun 25, 2024
@msmithNI msmithNI self-assigned this Jun 25, 2024
@msmithNI msmithNI moved this from Current Iteration to In progress in Nimble Design System Priorities Jul 8, 2024
@m-akinc m-akinc moved this from In Progress to Current Iteration in Nimble Design System Priorities Jul 30, 2024
@rajsite
Copy link
Member

rajsite commented Oct 29, 2024

@fredvisser was mentioning the possibility of editable table cells where on interaction (click / touch / keyboard cell enter) the cell contents are replaced (or text -> numeric text field) and on commit / cancel switched back (numeric text field -> text). Need to prototype but possible this issue may need to be addressed for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Iteration
Development

No branches or pull requests

3 participants