owncloud / owncloud-design-system

:art: A pattern library for ownCloud for Vue.js
https://owncloud.design
Apache License 2.0
26 stars 19 forks source link

Enhancement: Give OcModal the option to use OcContextualHelper #2325

Closed lookacat closed 2 years ago

lookacat commented 2 years ago

Description

See https://github.com/owncloud/web/issues/6892#issuecomment-1245438400

Related Issue

https://github.com/owncloud/web/issues/6892

Motivation and Context

Why new props instead of using slot: So we can use it via code without markup

Screenshots (if appropriate):

image

Types of changes

Checklist:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

AlexAndBear commented 2 years ago

I am not quite sure if we should do this. It would be better to use a slot for the message and implement the contextualHelper there.

lookacat commented 2 years ago

The slot method is not suitable because we create the modal via code, we have no option there to dynamically provide a template

AlexAndBear commented 2 years ago

As far as I know it will be rendered in the code via vue template anyways.So it should be quite possible to pass a new variable for the ct helper in web.

It's just not a good approach at the end to add a lot of components we have to the modal it self.

AlexAndBear commented 2 years ago

Rechecked, the slot won't be used in the app.vue, so I agree that's the easiest solution here.