Skip to content

Commit

Permalink
fix MWPW-139492
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchika Sinha authored and Ruchika Sinha committed Nov 22, 2023
1 parent 62b363f commit 19ece39
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 42 deletions.
35 changes: 8 additions & 27 deletions creativecloud/features/firefly/firefly-interactive.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,52 +93,33 @@
}

@media screen and (max-width: 1799px) and (min-width: 1650px) {
.firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 370px);
}

[dir="rtl"] .firefly-selectortray {
[dir="ltr"] .firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 407px);
right: -85px;
}
}

@media screen and (max-width: 1649px) and (min-width: 1438px) {
.firefly-selectortray {
[dir="ltr"] .firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 320px);
}

[dir="rtl"] .firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 407px);
right: -35px;
}
}

@media screen and (max-width: 1437px) and (min-width: 1200px) {
.firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 280px);
}

[dir="rtl"] .firefly-selectortray {
[dir="ltr"] .firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 407px);
right: 5px;
}
}

@media screen and (min-width: 1800px) {
@media screen and (min-width: 1200px) {
.firefly-selectortray {
top: 144px;
position: absolute;
right: calc(50% - 407px);
right: -122px;
}
}

17 changes: 16 additions & 1 deletion creativecloud/features/firefly/firefly-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ let media;
let mediaP;

function focusOnInput() {
media.querySelector('#promptinput')?.focus();
media.querySelector('#promptinput')?.focus();;
}

function waitForModal() {
var checkInterval = setInterval(function () {
var modalClose = document.querySelector('.dialog-close');
if (modalClose) {
clearInterval(checkInterval);
const input = media.querySelector('#promptinput');
modalClose?.addEventListener('click', () => input?.focus());
}
}, 100);
}


function eventOnGenerate(generateButton) {
const btnConfigs = {
TextToImage: ['SubmitTextToImage', 'SubmitTextToImageUserContent', 'goToFirefly'],
Expand Down Expand Up @@ -144,6 +156,7 @@ export default function setInteractiveFirefly(el) {
});
}

focusOnInput();
/* Handle action on click of each firefly option button */

textToImageButton.addEventListener('click', () => {
Expand Down Expand Up @@ -182,3 +195,5 @@ export default function setInteractiveFirefly(el) {
focusOnInput();
});
}

waitForModal();
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* Prompt Bar */
.promptbar {
height: 30px;
background: #FFFFFF;
Expand Down Expand Up @@ -37,7 +36,6 @@
background: #111111;
}

/* Enticement */
.enticement-arrow {
display: none;
width: 49px !important;
Expand All @@ -58,7 +56,6 @@
color: #FFFFFF;
}

/* Selector Tray */
.selector-tray {
border-radius: 4px;
display: flex;
Expand Down Expand Up @@ -126,7 +123,6 @@
border: 1px solid #1473E6;
}

/* Genfill Prompt */
.genfill-prompt {
position: absolute;
bottom: 106px;
Expand Down Expand Up @@ -157,7 +153,6 @@
}

@media screen and (min-width: 1200px) {
/* Prompt Bar */
.promptbar {
height: 50px;
padding-inline-start: 40px;
Expand All @@ -171,7 +166,6 @@
width: 294px;
}

/* Enticement */
.enticement-arrow {
right: 575px;
top: -45px;
Expand All @@ -188,7 +182,6 @@
margin-right: 510px;
}

/* Selector Tray */
.options {
margin-bottom: 16px;
padding: 15px;
Expand All @@ -209,7 +202,6 @@
bottom: inherit;
justify-content: center;
align-items: center;
/*height: 248px;*/
}

.selector-tray:nth-last-child(n+3) ~ .selector-tray{
Expand Down Expand Up @@ -238,7 +230,6 @@
margin-bottom: auto;
}

/* Genfill prompt */
.genfill-prompt {
bottom: 46px;
margin-inline-start: 40px;
Expand All @@ -256,7 +247,6 @@
}

@media (min-width: 600px) and (max-width: 1199px) {
/* Prompt Bar */
.promptbar {
height: 40px;
padding-inline-start: 32px;
Expand All @@ -270,7 +260,6 @@
line-height: var(--type-body-l-lh);
}

/* Enticement */
.enticement-arrow {
right: 575px;
top: -45px;
Expand All @@ -287,7 +276,6 @@
margin-right: 525px;
}

/* Genfill Prompt */
.genfill-prompt {
bottom: 145px;
margin-inline-start: 32px;
Expand All @@ -303,7 +291,6 @@
padding: 7px 18px 8px;
}

/* Selector Tray */
.options {
margin-inline-end: 16px;
padding: 7px;
Expand Down
2 changes: 1 addition & 1 deletion creativecloud/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const miloLibs = setLibs(LIBS);
if ((window.location.search.includes('goToFirefly')
|| window.location.search.includes('goToFireflyEffects')
|| window.location.search.includes('goToFireflyGenFill'))) {
await loadIms();
try { await loadIms(); } catch { return; }
if (window.adobeIMS?.isSignedInUser()) {
const { redirectWithParam } = await import('../features/firefly/firefly-susi.js');
redirectWithParam();
Expand Down

0 comments on commit 19ece39

Please sign in to comment.