Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Sync main from stage 5/14 #296

Merged
merged 7 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions creativecloud/blocks/interactive-marquee/interactive-marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,20 @@ export default async function init(el) {
await decorateGenfill(el, { createTag });
break;
}
case el.classList.contains('ff-masonry'): {
try {
const stylePromise = new Promise((resolve) => {
loadStyle('/creativecloud/features/firefly/firefly-masonry.css', resolve);
});
await stylePromise;
interactiveInit(el, decorateButtons, decorateBlockBg, createTag);
const { default: setMultiImageMarquee } = await import('../../features/firefly/firefly-masonry.js');
await setMultiImageMarquee(el);
} catch (err) {
window.lana?.log(`Failed to load firefly masonry: ${err}`);
}
break;
}
case el.classList.contains('firefly'): {
loadStyle('/creativecloud/blocks/interactive-marquee/milo-marquee.css');
loadStyle('/creativecloud/features/interactive-elements/interactive-elements.css');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
z-index: 2;
}

.interactive-enabled .step-slider-tray .layer.show-layer {
min-height: 205px;
}

.interactive-enabled .layer .gray-button {
position: absolute;
box-sizing: border-box;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,20 @@ function getWorkFlowInformation(el) {
export default async function init(el) {
const workflow = getWorkFlowInformation(el);
if (!workflow.length) return;
const targetAsset = await getTargetArea(el);
if (!targetAsset) return;
const stepInfo = {
el,
stepIndex: -1,
stepName: '',
stepList: workflow,
stepConfigs: el.querySelectorAll(':scope > div'),
nextStepEvent: 'cc:interactive-switch',
target: targetAsset,
displayPath: 0,
openForExecution: Promise.resolve(true),
};
await handleNextStep(stepInfo);
const targetAsset = await getTargetArea(el);
if (!targetAsset) return;
stepInfo.target = targetAsset;
await renderLayer(stepInfo);
if (workflow.length === 1) return;
el.addEventListener('cc:interactive-switch', async () => {
Expand Down
6 changes: 6 additions & 0 deletions creativecloud/deps/openInPsWeb/e2bb343a.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions creativecloud/deps/openInPsWeb/openInPsWeb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 14 additions & 15 deletions creativecloud/features/firefly/firefly-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ import { getLibs } from '../../scripts/utils.js';

const { default: defineDeviceByScreenSize } = await import('../../scripts/decorate.js');

function focusOnInput(media, createTag) {
const input = media.querySelector('.prompt-text');
if (input) {
const device = defineDeviceByScreenSize();
const blinkingCursor = createTag('div', { class: 'blinking-cursor' });
if (input.classList.contains('light')) blinkingCursor.classList.add('blink-light');
if (device === 'MOBILE' || device === 'TABLET') {
export function focusOnInput(media, createTag, inputfield = null) {
const input = inputfield === null ? media.querySelector('.prompt-text') : inputfield;
if (!input) return;
const device = defineDeviceByScreenSize();
const blinkingCursor = createTag('div', { class: 'blinking-cursor' });
if (input.classList.contains('light')) blinkingCursor.classList.add('blink-light');
if (device === 'MOBILE' || device === 'TABLET') {
input.insertAdjacentElement('beforebegin', blinkingCursor);
} else input.focus();
input.addEventListener('focusout', () => {
if (document.querySelector('.locale-modal-v2') && device === 'DESKTOP') {
input.insertAdjacentElement('beforebegin', blinkingCursor);
} else input.focus();
input.addEventListener('focusout', () => {
if (document.querySelector('.locale-modal-v2') && device === 'DESKTOP') {
input.insertAdjacentElement('beforebegin', blinkingCursor);
}
}, { once: true });
input.addEventListener('click', () => { document.querySelector('.blinking-cursor')?.remove(); });
}
}
}, { once: true });
input.addEventListener('click', () => { document.querySelector('.blinking-cursor')?.remove(); });
}

function eventOnGenerate(generateButton, media, fireflyfeature = '') {
Expand Down
Loading
Loading