UX: Full width/height modal (#61)

This commit is contained in:
Keegan George 2023-08-31 09:28:05 -07:00 committed by GitHub
parent 116bcb9c3a
commit c050e072e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 50 deletions

View File

@ -4,27 +4,6 @@
class="insert-table-modal"
>
<:body>
{{#if this.isEditingTable}}
<div class="edit-reason">
<DButton
@icon="info-circle"
@title={{theme-prefix
"discourse_table_builder.edit.modal.trigger_reason"
}}
@action={{this.showEditReasonField}}
@class="btn btn-icon btn-flat no-text btn-edit-reason"
/>
{{#if this.showEditReason}}
<TextField
@value={{this.editReason}}
@placeholderKey={{theme-prefix
"discourse_table_builder.edit.modal.reason"
}}
/>
{{/if}}
</div>
{{/if}}
<ConditionalLoadingSpinner @condition={{this.loading}}>
<div
{{did-insert this.createSpreadsheet}}
@ -50,6 +29,26 @@
</div>
<div class="secondary-actions">
{{#if this.isEditingTable}}
<div class="edit-reason">
<DButton
@icon="info-circle"
@title={{theme-prefix
"discourse_table_builder.edit.modal.trigger_reason"
}}
@action={{this.showEditReasonField}}
@class="btn-edit-reason"
/>
{{#if this.showEditReason}}
<TextField
@value={{this.editReason}}
@placeholderKey={{theme-prefix
"discourse_table_builder.edit.modal.reason"
}}
/>
{{/if}}
</div>
{{/if}}
<DPopover>
<DButton class="trigger" @icon="question" />
<ul>

View File

@ -60,11 +60,7 @@ export default class SpreadsheetEditor extends Component {
@action
showEditReasonField() {
if (this.showEditReason) {
this.showEditReason = false;
} else {
this.showEditReason = true;
}
this.showEditReason = !this.showEditReason;
}
@action

View File

@ -25,24 +25,16 @@
.modal-inner-container {
--modal-max-width: $reply-area-max-width;
width: $reply-area-max-width;
width: 100%;
height: 100%;
@media screen and (max-width: 1200px) {
--modal-max-width: 90%;
width: 100vw;
}
display: grid;
grid-template-rows: auto 1fr auto;
}
.modal-body {
padding: 0;
margin: 0.5em;
}
.btn-edit-reason {
background: none;
.d-icon {
color: var(--primary-high);
}
margin: 0;
}
.modal-footer {
@ -50,6 +42,26 @@
align-items: center;
justify-content: space-between;
.secondary-actions {
display: flex;
align-items: center;
gap: 0.5rem;
.edit-reason {
display: flex;
align-items: center;
gap: 0.5rem;
}
.btn {
margin-right: 0;
}
input {
margin: 0;
}
}
.secondary-actions .tippy-content {
h4 {
color: var(--primary);
@ -60,15 +72,4 @@
}
}
}
.jexcel_container {
padding: 0.5em;
min-width: 100%;
.jexcel_content {
min-width: 100%;
table.jexcel {
min-width: 100%;
}
}
}
}

View File

@ -254,3 +254,19 @@ table.jexcel > tbody > tr > td {
.jcontextmenu > div:not(.contextmenu-line):last-child {
display: none;
}
.jexcel_container {
padding: 0.5em;
min-width: 100%;
.jexcel_content {
min-width: 100%;
padding: 0;
table.jexcel {
min-width: 100%;
}
}
}
.jexcel_container {
padding: 0;
}