Skip to content

Commit

Permalink
[doc] Add ADR on support for forking table view description
Browse files Browse the repository at this point in the history
Signed-off-by: Michaël Charfadi <[email protected]>
  • Loading branch information
mcharfadi committed Nov 6, 2024
1 parent b9adcec commit c9374d3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [ADR-169] Compute the icon of a representation
- [ADR-170] Add support for representations in the Details View
- [ADR-171] Add support for Sorting and Filtering in Tables
- [ADR-172] Add support for forking table description from representation

=== Deprecation warning

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
= ADR-172 Add support for forking table description from representation

== Context

On a table representation, we want to be able to modify the specification used as description of this table and then reload the table with this new specification.

== Decision

We will allow users to open a new studio from an opened table representation.
This new studio will contain a copy of the table description used to instantiate the table.
After modifying this new studio, the user will be able to re open the previous table representation that will use the updated table description.

=== Back-end

We will implement a new mutation `createForkedStudio` that will fork the description used by the table.
`createForkedStudio(input: CreateForkedStudioInput!): CreateForkedStudioPayload!`
```
input CreateForkedStudioInput {
id: ID!
editingContextId: String!
representationId: String!
}
```

The data fetcher will then call an event handler that will :

* Dispose the current editing context
* Create a new Studio that will be a fork of the description used by the representation
* Update the representation with the representationId given in the input with the new descriptionId
* Return the url of the newly created studio (so the front-end can redirect to this url)

=== Front-end

We will add an extension point to contribute to the settings menu item.
One contribution will add a menu item in order to send the createForkedStudio mutation.

== Advantages
* This solution does not require deep modification on how we reload representation.

== Disadvantages
* User Experience: The user that wants to make a change will need to reopen his representation after the changes.

== Status

Work in progress

== Consequences

0 comments on commit c9374d3

Please sign in to comment.