medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.45k stars 2.4k forks source link

Injection zones are not suggested #8123

Closed bunsyy closed 1 month ago

bunsyy commented 1 month ago

Bug report

Describe the bug

When I define the zone of my custom widget, I don't get the suggestion of the available zones.

System information

Medusa version (including plugins): 1.20.6-preview-20240712030459 Node.js version: v20.15.0 Database: PostgreSQL Operating system: mac Sonoma Browser (if relevant):

Steps to reproduce the behavior

  1. create a custom widget in ./src/admin/widgets/
  2. export config with defineWidgetConfig
  3. define the zone for that widget

Expected behavior

export const config = defineWidgetConfig({
  zone: "" // <- I expect typescript to suggest all the available injection zones
});

Screenshots

Screenshot 2024-07-14 at 8 38 37 in the morning Screenshot 2024-07-14 at 8 27 15 in the morning

Code snippets

N/A

Additional context

For now, I have to dive deep into index node_modules/@medusajs/admin-shared/dist/index.d.ts to see the list of INJECTION_ZONES.

surajgjadhav commented 1 month ago

Hi @srindom, can I take this up ?

srindom commented 1 month ago

@surajgjadhav sure thanks! @kasperkristensen might already have looked into this though so let's just check with him if it makes sense?