Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove unused old modal code/css (#35553)

Jarek Radosz34f37659aeb7
diff --git a/frontend/select-kit/addon/components/select-kit.js b/frontend/select-kit/addon/components/select-kit.js
index 59e2adbe44b..9d55e14fc2a 100644
--- a/frontend/select-kit/addon/components/select-kit.js
+++ b/frontend/select-kit/addon/components/select-kit.js
@@ -939,12 +939,6 @@ export default class SelectKit extends Component {
this.clearErrors();
- const inModal = this.element.closest(".fixed-modal");
- if (inModal && this.site.mobileView) {
- const modalBody = inModal.querySelector(".modal-body");
- modalBody.style = "";
- }
-
this.selectKit.onClose(event);
this.selectKit.setProperties({
@@ -963,7 +957,6 @@ export default class SelectKit extends Component {
this.selectKit.onOpen(event);
if (!this.popper) {
- const inModal = this.element.closest(".fixed-modal .modal-body");
const anchor = document.querySelector(
`#${this.selectKit.uniqueID}-header`
);
@@ -1004,7 +997,6 @@ export default class SelectKit extends Component {
},
{
name: "flip",
- enabled: !inModal,
options: {
padding: {
top:
@@ -1029,13 +1021,11 @@ export default class SelectKit extends Component {
enabled: window.innerWidth <= 450,
phase: "main",
fn({ state }) {
- if (!inModal) {
- let { x } = state.elements.reference.getBoundingClientRect();
- if (strategy === "fixed") {
- state.modifiersData.popperOffsets.x = 0 + 10;
- } else {
- state.modifiersData.popperOffsets.x = -x + 10;
- }
+ let { x } = state.elements.reference.getBoundingClientRect();
+ if (strategy === "fixed") {
+ state.modifiersData.popperOffsets.x = 0 + 10;
+ } else {
+ state.modifiersData.popperOffsets.x = -x + 10;
}
},
},
@@ -1044,23 +1034,7 @@ export default class SelectKit extends Component {
enabled: window.innerWidth <= 450,
phase: "beforeWrite",
fn: ({ state }) => {
- if (inModal) {
- const innerModal = document.querySelector(
- ".fixed-modal div.modal-inner-container"
- );
-
- if (innerModal) {
- if (this.multiSelect) {
- state.styles.popper.width = `${this.element.offsetWidth}px`;
- } else {
- state.styles.popper.width = `${
- innerModal.clientWidth - 20
- }px`;
- }
- }
- } else {
- state.styles.popper.width = `${window.innerWidth - 20}px`;
- }
+ state.styles.popper.width = `${window.innerWidth - 20}px`;
},
},
{
@@ -1081,16 +1055,6 @@ export default class SelectKit extends Component {
)}px`;
},
},
- {
- name: "modalHeight",
- enabled: !!(inModal && this.site.mobileView),
- phase: "afterWrite",
- fn: ({ state }) => {
- inModal.style = "";
- inModal.style.height =
- inModal.clientHeight + state.rects.popper.height + "px";
- },
- },
],
});
}
diff --git a/plugins/discourse-calendar/assets/stylesheets/common/discourse-post-event-invitees.scss b/plugins/discourse-calendar/assets/stylesheets/common/discourse-post-event-invitees.scss
index 5c40f1372b3..b527e1effdb 100644
--- a/plugins/discourse-calendar/assets/stylesheets/common/discourse-post-event-invitees.scss
+++ b/plugins/discourse-calendar/assets/stylesheets/common/discourse-post-event-invitees.scss
@@ -1,12 +1,4 @@
.post-event-invitees-modal {
- .modal-body {
- padding: 0;
- }
-
- .modal-inner-container {
- min-width: 350px;
- }
-
.loading-container {
height: 40vh;
overflow-y: scroll;
diff --git a/plugins/discourse-calendar/assets/stylesheets/common/post-event-builder.scss b/plugins/discourse-calendar/assets/stylesheets/common/post-event-builder.scss
index 26ed860ae3f..52a8d60e7c9 100644
--- a/plugins/discourse-calendar/assets/stylesheets/common/post-event-builder.scss
+++ b/plugins/discourse-calendar/assets/stylesheets/common/post-event-builder.scss
@@ -1,111 +1,8 @@
-.mobile-view {
- .post-event-builder-modal {
- .modal-inner-container {
- .modal-body {
- .d-date-time-input-range {
- flex-direction: column;
- width: 100%;
- border: 0;
-
- .d-date-time-input {
- .d-date-input {
- width: 100%;
- }
-
- .name {
- font-size: var(--font-down-1);
- }
-
- &.from {
- margin-right: 2.65em;
- }
-
- &.to {
- margin-top: 0.5em;
- }
- }
- }
- }
- }
- }
-}
-
.post-event-builder-modal {
- .modal-inner-container {
- width: 550px;
- }
-
.conditional-loading-section {
background: transparent;
}
- .modal-body {
- min-height: 200px;
-
- .d-date-time-input-range {
- margin-bottom: 2em;
- flex-direction: column;
-
- .d-date-time-input {
- display: flex;
- justify-content: flex-start;
- }
-
- .select-kit-header {
- height: 100%;
- }
-
- .d-date-input {
- box-sizing: border-box;
- flex: 0;
- min-width: unset;
-
- .date-picker {
- width: 155px;
- }
- }
-
- .d-time-input {
- .combo-box {
- width: 130px;
- }
-
- .selected-name {
- border: 0;
-
- .name {
- font-size: var(--font-down-1);
- }
- }
- }
-
- .to.d-date-time-input {
- .d-time-input {
- order: 1;
- }
-
- .d-date-input {
- order: 0;
- }
-
- .clear-date-time {
- order: 2;
- margin-left: auto;
- }
-
- .pika-single.is-bound {
- left: -2px !important;
- }
- }
- }
- }
-
- .modal-footer {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
.event-field {
display: flex;
margin-bottom: 2em;
diff --git a/plugins/discourse-calendar/assets/stylesheets/desktop/discourse-post-event-invitees.scss b/plugins/discourse-calendar/assets/stylesheets/desktop/discourse-post-event-invitees.scss
deleted file mode 100644
index 1769b13ceb8..00000000000
--- a/plugins/discourse-calendar/assets/stylesheets/desktop/discourse-post-event-invitees.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.post-event-invitees-modal {
- .modal-inner-container {
- min-width: 350px;
- }
-}
diff --git a/plugins/discourse-calendar/assets/stylesheets/mobile/discourse-post-event-invitees.scss b/plugins/discourse-calendar/assets/stylesheets/mobile/discourse-post-event-invitees.scss
deleted file mode 100644
index 9995538446e..00000000000
--- a/plugins/discourse-calendar/assets/stylesheets/mobile/discourse-post-event-invitees.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.post-event-invitees-modal {
- .modal-inner-container {
- min-width: 90vw;
- }
-}
diff --git a/plugins/discourse-gamification/assets/stylesheets/common/leaderboard.scss b/plugins/discourse-gamification/assets/stylesheets/common/leaderboard.scss
index 91776dcc210..213f2ae414b 100644
--- a/plugins/discourse-gamification/assets/stylesheets/common/leaderboard.scss
+++ b/plugins/discourse-gamification/assets/stylesheets/common/leaderboard.scss
@@ -270,14 +270,6 @@
}
.recalculate-scores-form-modal {
- .modal-inner-container {
- min-width: 25em;
-
- .select-kit {
- width: 100%;
- }
- }
-
.-custom-range {
display: flex;
align-items: baseline;