DEV: makes chat modals use the new <DModal /> component (#22495)

This commit also standardize the naming pattern of modals: `<Chat::Modal::FooBar />` and changes css class accordingly.

Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
Joffrey JAFFEUX
2023-07-10 13:43:33 +02:00
committed by GitHub
co-authored by David Taylor
parent ed2dae6d1a
commit 9830c40386
115 changed files with 1366 additions and 1179 deletions
@@ -1,5 +1,5 @@
<DButton
@class="btn-flat d-modal-cancel"
@action={{action this.close}}
@action={{@close}}
@translatedLabel={{i18n "cancel"}}
/>
@@ -1,4 +0,0 @@
import Component from "@ember/component";
export default Component.extend({
tagName: "",
});
@@ -490,4 +490,20 @@ module("Integration | Component | select-kit/single-select", function (hooks) {
assert.dom(".single-select.is-expanded").exists();
});
test("options.formName", async function (assert) {
setDefaultState(this);
await render(hbs`
<SingleSelect
@value={{this.value}}
@content={{this.content}}
@options={{hash formName="foo"}}
/>
`);
assert
.dom('input[name="foo"]')
.hasAttribute("type", "hidden")
.hasAttribute("value", "1");
});
});
@@ -311,6 +311,7 @@ export default Component.extend(
hiddenValues: null,
disabled: false,
expandedOnInsert: false,
formName: null,
},
autoFilterable: computed("content.[]", "selectKit.filter", function () {
@@ -6,6 +6,14 @@
data-name={{this.name}}
class="select-kit-selected-name selected-name choice"
>
{{#if this.selectKit.options.formName}}
<input
type="hidden"
name={{this.selectKit.options.formName}}
value={{this.value}}
/>
{{/if}}
{{#if this.item.icon}}
{{d-icon this.item.icon}}
{{/if}}