Closed Bug 2091576 Opened 15 days ago Closed 8 hours ago

Add a controller to submit prompts to WidgetGenerator and update progress

Categories

(Firefox :: Widgets, task, P2)

task
Points:
5

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: fchasen, Assigned: fchasen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [hnt][hnt-wattle])

Attachments

(1 external file)

When a prompt is submitted we need to add a controller to handle calling WidgetGenerator.generate({ prompt }).

It should display the placeholder until finished or the generation error.

Opening and closing and reopening the sidebar should not stop the generation.

Points: --- → 5
Assignee: nobody → fchasen
Status: NEW → ASSIGNED
Priority: -- → P2

WidgetCreator generates and installs one widget at a time across all windows. Each window has a WidgetsController that submits prompts and disables new submissions while a request is pending.

  • Disables the “Create a widget” button in every window until the request finishes.
  • Disables the submit button in other open composers until the request finishes. Users can still edit their prompts.
  • Passes the ZIP file path from WidgetGenerator.generate() to GeneratedWidgetsProvider.install().
  • Dispatches WidgetCreator:Creating with the pending promise so all Widget Studio sidebars can follow the request.
  • Dispatches WidgetCreator:Error with the error and original prompt if generation or installation fails.
  • Calling WidgetCreator.cancel() during generation prevents the widget from being installed.
Attachment #9686670 - Attachment description: Bug 2091576 - Add WidgetCreator and WidgetsController to create widgets from prompts. r=mconley! → Bug 2091576 - Add WidgetCreator and WidgetsController to create widgets from prompts. r=mconley!,fluent-reviewers!,flod!
Attachment #9686670 - Attachment description: Bug 2091576 - Add WidgetCreator and WidgetsController to create widgets from prompts. r=mconley!,fluent-reviewers!,flod! → Bug 2091576 - Add WidgetCreator and WidgetsController to create widgets from prompts. r=mconley!
Pushed by mconley@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/69770d2dac8c https://hg.mozilla.org/integration/autoland/rev/5ba652117809 Add WidgetCreator and WidgetsController to create widgets from prompts. r=mconley,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 8 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: