Skip to content

feat: Read-Only Field Display - #537

Merged
lornakelly merged 1 commit into
open-workflow-specification:feature/node-editingfrom
lornakelly:254/styling-part-4
Nov 13, 2026
Merged

lornakelly merged 1 commit into
open-workflow-specification:feature/node-editingfrom
lornakelly:254/styling-part-4

Conversation

@lornakelly

@lornakelly lornakelly commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Contributes to #254

Summary

Implements a centralised read-only display system for form fields, replacing disabled controls with clean, accessible text representations. This improves the user experience when viewing task details in read-only mode.

Main Changes

  • New ReadOnlyValue component that renders 8 field types as text with smart formatting
  • Update FieldControl.tsx to route to ReadOnlyValue when isReadOnly && isReadOnlyTextField(field)
  • FieldLabel.tsx uses instead of in read-only mode since there's no control to associate with
    - NodeDetailsView.tsx cleaner separation: read-only shows all node errors not in place errors
  • Control components (BooleanControl, EnumControl, NumberControl, etc.) simplified by removing read-only handling
  • TaskForm.tsx updated to work with new read-only display
  • Drill components minor adjustments for read-only mode compatibility eg display in edit mode - 1 of 2 fields set, red only - 1 field
  • Remove “Properties” section header as its redundant and takes up space
  • Add tests

Verify

Storybook > Examples

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c98728d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@openworkflowspec/diagram-editor Minor
@openworkflowspec/core Minor
@openworkflowspec/i18n Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lornakelly
lornakelly requested a balanced review from Copilot November 12, 2026 13:41
@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openworkflow-editor ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c98728d
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6af5cc89477590e904eed219
😎 Deploy Preview https://deploy-preview-537--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Read-only rendering drops edited retry payloads, misrepresents valid null and empty-string values as missing, and loses map-key styling because of an invalid CSS selector.

3 open issues
What changed in this PR

Introduces centralized text-based read-only field rendering in the diagram editor, supporting the UX refinements in issue #254.

Changes:

  • Displays eight field types as formatted text instead of disabled controls.
  • Refines labels, drill counts, task-list hints, and top-level Source placement; removes the Properties heading.
  • Updates styles, translations, tests, and release notes.

Package paths below are relative to packages/open-workflow-diagram-editor/; the changeset path is repository-relative.

File Description
tests/​side-panel/​NodeDetailsView.test.tsx Tests text rendering, heading removal, and Source placement.
tests/​side-panel/​forms/​taskFormContext.test.ts Updates drill-count comments only.
tests/​side-panel/​forms/​TaskForm.oneOfLevels.test.tsx Expects read-only variant names as text.
tests/​side-panel/​forms/​TaskForm.objectLevels.test.tsx Supports text assertions in read-only mode.
tests/​side-panel/​forms/​TaskForm.fieldValidation.test.tsx Checks read-only text without controls or alerts.
tests/​side-panel/​forms/​TaskForm.drill.test.tsx Updates read-only counts and value assertions.
tests/​side-panel/​forms/​OrderedMapRow.test.tsx Checks read-only labels as text.
tests/​side-panel/​forms/​customFields/​ThenField.test.tsx Removes the disabled-control assertion.
tests/​side-panel/​forms/​customFields/​StructuredValueField.test.tsx Removes the disabled-textarea assertion and formats tests.
tests/​side-panel/​forms/​customFields/​ReadOnlyValue.test.tsx Adds centralized rendering and formatting tests.
tests/​side-panel/​forms/​customFields/​McpProtocolVersionField.test.tsx Removes the disabled-control assertion.
tests/​side-panel/​EditFormFooter.forkTask.test.tsx Tests hiding the edit hint in read-only mode.
src/​side-panel/​SidePanel.css Styles read-only values and adjusts map and Source presentation.
src/​side-panel/​NodeDetailsView.tsx Removes Properties heading and delegates Source placement.
src/​side-panel/​forms/​VariantPicker.tsx Shows the selected variant as read-only text.
src/​side-panel/​forms/​taskFormContext.ts Updates the drill-count comment only.
src/​side-panel/​forms/​TaskForm.tsx Adds top-level footer rendering and empty-form fallback.
src/​side-panel/​forms/​FieldLabel.tsx Uses spans for read-only field labels.
src/​side-panel/​forms/​FieldControl.tsx Routes supported read-only fields to ReadOnlyValue.
src/​side-panel/​forms/​drill/​useDrillNavigation.ts Updates the filtering comment only.
src/​side-panel/​forms/​drill/​DrillRow.tsx Shows populated-field counts in read-only mode.
src/​side-panel/​forms/​customFields/​ThenField.tsx Removes control-level read-only handling.
src/​side-panel/​forms/​customFields/​TaskListDisplay.tsx Hides the edit hint in read-only mode.
src/​side-panel/​forms/​customFields/​StructuredValueField.tsx Removes textarea read-only handling.
src/​side-panel/​forms/​customFields/​StringControl.tsx Removes input read-only handling.
src/​side-panel/​forms/​customFields/​ScrollableTextField.tsx Removes textarea read-only handling.
src/​side-panel/​forms/​customFields/​ReadOnlyValue.tsx Adds shared scalar and structured-value text rendering.
src/​side-panel/​forms/​customFields/​PatternTextControl.tsx Removes input read-only handling.
src/​side-panel/​forms/​customFields/​NumberControl.tsx Removes input read-only handling.
src/​side-panel/​forms/​customFields/​EnumControl.tsx Removes picker and payload read-only handling.
src/​side-panel/​forms/​customFields/​ChildTaskListField.tsx Passes read-only mode to task-list display.
src/​side-panel/​forms/​customFields/​BooleanControl.tsx Removes switch read-only handling.
src/​i18n/​locales/​en.ts Adds field-count labels and removes Properties text.
.changeset/​read-only-display.md Records the feature as a minor release.

Review effort: Balanced

Signed-off-by: lornakelly <lornakelly88@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the centralized read-only field rendering changes.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@lornakelly
lornakelly merged commit 826e001 into open-workflow-specification:feature/node-editing Nov 13, 2026
10 checks passed
@lornakelly
lornakelly deleted the 254/styling-part-4 branch November 13, 2026 09:42
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.

4 participants