Repository navigation
Edit resources - #92
Open
mihailefter wants to merge 38 commits into
Open
mihailefter wants to merge 38 commits into
mihailefter wants to merge 38 commits into
Conversation
…age, and rework shape loading
… gating on write permission
…y a request timeout
…directing to the resource
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.
Resource metadata was read-only. These changes add an Edit link, a form generated from the resource’s SHACL shapes, and a
PUTrequest on save.Access control
Editing requires being signed in, holding
Wpermission on the resource or being an administrator, and the backend advertising the corresponding PUT operation.useMeta.tssupplies the shared access rule for the Edit link, edit page, and route guard. Denied edit permission redirects to/not-allowed; request failures are displayed on the edit page.Resource operations use the existing API-discovery mechanism to resolve endpoint URLs and HTTP methods, following PR #64.
Edit form
The client loads SHACL shapes through the resource’s
dct:conformsToprofile.shaclUtils.tssupplies a shared property map for display and editing; property shapes withdash:editordefine form fields, ordered bysh:orderand populated from existing RDF values.ShapeFormFields.vuesupports text fields, text areas, IRIs, dates, date-times, and nested records. Entries can be added or removed within cardinality limits, and individual values can be restored. For input controls not yet implemented, the form names the missing editor and preserves the stored values.Updating and previewing the graph
shapeGraph.tsbuilds the updated graph for PUT, preserving RDF properties outside the form, literal language tags, and datatypes. The “View RDF” panel shows the serialized draft as the form changes.Validation
Before saving, local checks enforce required values and valid absolute IRIs for supported fields. The backend performs full SHACL validation; errors appear beside matching fields or in a summary, with the raw response under “View report.” Failed saves preserve edits for correction and retry.
Related UI changes
The resource header shows membership and ownership badges, with other owners’ names available to administrators.
RawContentPanel.vueshares syntax highlighting and resizing across the raw-format viewer, RDF preview, and validation reports. A modal blocks interaction during saving and confirms success before returning to the resource page.