Conversation
Testing Notes: 1. Regress all the upload workflow acros products 2. Test the limits for each product Resolves: [MWPW-NUMBER](https://jira.corp.adobe.com/browse/MWPW-NUMBER) **Test URLs:** - Before: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/upscale-video?unitylibs=stage - After: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/upscale-video?unitylibs=upscaleVid --------- Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
| const ringBg = document.createElementNS('http://www.w3.org/2000/svg', 'circle'); | ||
| ringBg.setAttribute('class', 'unity-paf-ring-bg'); | ||
| ringBg.setAttribute('cx', '24'); | ||
| ringBg.setAttribute('cy', '24'); |
There was a problem hiding this comment.
All of the svg attributes can be part of svg tag in sprite.svg. Please check. If that works it will reduce all of these lines.
|
|
||
| createInteractiveArea(block, selector, targetCfg) { | ||
| if (this.widgetName === 'prompt-bar-style') return this.el; | ||
| if (this.widgetName === 'prompt-bar-style' || this.widgetName === 'prompt-bar-audio') return this.el; |
There was a problem hiding this comment.
Same thing here...we need a more scalable way to check this instead of extending the conditional.
| } | ||
|
|
||
| function resolveCurrentPageSourceUrl(root) { | ||
| const icon = root.querySelector(`[class*="${CURRENT_PAGE_ICON_PREFIX}"]`); |
There was a problem hiding this comment.
Fetch this from verbDropdown() function
There was a problem hiding this comment.
I know we are also extracting icon-operation-<> in action-binder but this is a very small parsing and if we extract it out somewhere (utils.js) and reuse at both places will unnecessarily bloat utils.js.
@arugupta1992
| const RING_C = 2 * Math.PI * RING_R; | ||
| const RING_STROKE_WIDTH = (2.78751 * 48) / 33; | ||
| const RING_STROKE_ATTR = String(RING_STROKE_WIDTH); | ||
| const PAF_PP_PLAY_SVG = '<svg class="unity-paf-pp-svg" width="20" height="20" aria-hidden="true"><use xlink:href="#unity-play-filled-icon"></use></svg>'; |
There was a problem hiding this comment.
Move these to sprite.svg.
There was a problem hiding this comment.
PAF_PP_PLAY_SVG, PAF_PP_PAUSE_SVG are defined in sprites.svg only. we needed to use it at multiple places in the code, so just extracted them out here to make the code more readable.
PAF_PROGRESS_SVG and PAF_PLAYER_LOADING_SVG need to be defined here only as they are interactive based on the progress of the audio file played.
We can discuss if you have any concerns further.
| container.querySelectorAll('a[href]').forEach((a) => { | ||
| const href = a.getAttribute('href')?.trim() || ''; | ||
| if (!href) return; | ||
| if (/^javascript:/i.test(href)) return; |
There was a problem hiding this comment.
What does this regex do?
There was a problem hiding this comment.
it basically skips execeuting this if this url is a javascript code. But since this is internally authored we can remove this check.
| return base.toLowerCase(); | ||
| } | ||
|
|
||
| const CURRENT_PAGE_ICON_PREFIX = 'icon-operation-'; |
There was a problem hiding this comment.
Can these be used directly to save lines as in other flows?
| let promptWithStyleEvents = null; | ||
|
|
||
| function sanitizeCurrentPageFileBase(name) { | ||
| if (!name || !name.trim()) return null; |
| const VOICE_ROW_PEEK_SCROLLED_CLASS = 'unity-paf-voice-row-peek-scrolled'; | ||
| const EMPTY_PROMPT_RESTORE_MS = 10000; | ||
|
|
||
| function filterVoicesByModelId(voices, selectedModelId) { |
There was a problem hiding this comment.
Consider creating a map when the values are read for the first time and then do a lookup from the map
There was a problem hiding this comment.
good catch. Implemented.
| }); | ||
| } | ||
|
|
||
| function currentPageConfigItemToVoice(item) { |
There was a problem hiding this comment.
| function currentPageConfigItemToVoice(item) { | |
| function createVoiceObject(item) { |
There was a problem hiding this comment.
yet to merge my changes, Wait..
| }); | ||
| } | ||
|
|
||
| function currentPageConfigItemToVoice(item) { |
|
Validation done in the branch URL. |

Adding support for Text to Speech in Unity FE.
Pages/Verbs in scope:
Text 2 Speech
AI Voice Generator
AI Character voice
AI Male Voice
AI Female Voice
Epic: https://jira.corp.adobe.com/browse/MWPW-191711
Story: https://jira.corp.adobe.com/browse/MWPW-193434
Design: https://www.figma.com/design/Sk73H9qbSOtphpTJLZ3F6K/Doodlebug-Wave-2---Audio--Video--Image?node-id=1571-29203&p=f&m=dev
Authoring Document: https://wiki.corp.adobe.com/spaces/adobedotcom/pages/3872506700/Doodlebug+Wave+2.2+Audio+-+Authoring+Details
Resolves: MWPW-193434
Test URLs: