feat(dataset-table): add inline editing for editable columns#2261
Open
feat(dataset-table): add inline editing for editable columns#2261
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
MockDatasetApi.datasetsControllerFindByIdAndUpdateV3, consider matching the real service method signature (e.g.(pid: string, body: any)) so tests and future call sites can rely on consistent typing and argument usage. - The
DatasetInlineEditCellComponentsubscribes to the store in the constructor; moving this subscription logic intongOnInitwould better align with Angular lifecycle best practices and make the component easier to reason about. - The new
decorateColumnshelper inDatasetTableComponentonly decoratestype === 'editable'columns; if other dynamic types (e.g. existing custom types) also rely ondynamicCellComponent, consider centralizing all such decorations in this method to avoid diverging configuration paths.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `MockDatasetApi.datasetsControllerFindByIdAndUpdateV3`, consider matching the real service method signature (e.g. `(pid: string, body: any)`) so tests and future call sites can rely on consistent typing and argument usage.
- The `DatasetInlineEditCellComponent` subscribes to the store in the constructor; moving this subscription logic into `ngOnInit` would better align with Angular lifecycle best practices and make the component easier to reason about.
- The new `decorateColumns` helper in `DatasetTableComponent` only decorates `type === 'editable'` columns; if other dynamic types (e.g. existing custom types) also rely on `dynamicCellComponent`, consider centralizing all such decorations in this method to avoid diverging configuration paths.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
fa306db to
36eea20
Compare
…umns Add a new dataset table column type, `editable`. For users with edit permission, editable cells show an edit icon on hover. Clicking the cell opens an inline input with a save button.
36eea20 to
d9d3c28
Compare
Member
|
Feedback from the UX point of view: |
Member
|
How are the permissions managed? |
nitrosx
requested changes
Mar 13, 2026
Comment on lines
+21
to
+30
| <button | ||
| mat-icon-button | ||
| type="button" | ||
| class="save-button" | ||
| aria-label="Save value" | ||
| [disabled]="isSaving" | ||
| (click)="saveValue($event)" | ||
| > | ||
| <mat-icon>save</mat-icon> | ||
| </button> |
Member
There was a problem hiding this comment.
Can we move it before the input?
| <span *ngIf="displayValue" class="inline-edit-text"> | ||
| {{ displayValue }} | ||
| </span> | ||
| <mat-icon *ngIf="canEdit" class="edit-icon">edit</mat-icon> |
Member
There was a problem hiding this comment.
Can we move it before the span item right above
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes it possible to configure columns to be editable inline in the dataset table.
Adds a new dataset table column type,
editable.For users with edit permission, editable cells show an edit icon on hover.
Clicking the cell opens an inline input with a save button.
See screencast:
Screencast from 2026-03-12 12-08-58.webm
Motivation
One highly liked feature of Scanlog (MAXIV SciCat alternative frontend) is the possibility to edit the comment field inline in the the dataset table.
Changes:
New dataset table column type, 'editable'.
Tests included
Documentation
I would like to update this, where?
official documentation info
If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included
Backend version
Summary by Sourcery
Introduce inline-editable dataset table columns with a dedicated cell component and necessary wiring.
New Features:
editablecolumn type for dataset table fields that renders cells with an inline edit UI for permitted users.DatasetInlineEditCellComponentto handle inline editing, saving, and permission checks for dataset fields.Enhancements: