Open NilsJacobsen opened 3 months ago
The following can be found here: https://link.excalidraw.com/l/1RmnkzJA3Ph/QEikyCrXjN
Interaction:
Thought through use cases:
Component structure:
In code:
const test = () => {
return <inlang-bundle
bundle={bundle}
messageIds={messageIds}
>
<inlang-message
slot="message"
message={message}
settings={settings}
>
<inlang-selector-bar
slot="selector-bar"
selectors={selectors}
message={message}
messageIds={messageIds}
>
</inlang-selector-bar>
<inlang-variant
variant={variant}
>
<inlang-pattern-editor
slot="pattern-editor"
variant={variant}
messageId={messageId}
>
</inlang-pattern-editor>
<inlang-selector-button
slot="variant-action"
message={message}
messageIds={messageIds}
>
</inlang-selector-button>
</inlang-variant>
</inlang-message>
</inlang-bundle>
}
Challenges that will still be present in the app (acceptable for now)
Seams to work quite well. Gonna open a draft PR and after some clean up and testing we can merge.
Just as a test we can nest stuff and the component is fully wired up.
The bundle component was built to work well in editing mode with slotting and nesting other stuff inside it. U basically passed in props and used an event listener to get the new value of the json back.
New Requirements:
(Updates will be tracked in this issue)