-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(dashboard,admin-sdk,admin-shared,admin-vite-plugin): Add support for UI extensions #7383
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
|
@@ -41,6 +42,8 @@ export async function serve(options: ServeOptions) { | |||
res.setHeader("Vary", "Origin, Cache-Control") | |||
} | |||
|
|||
router.use(compression()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we pull the compression settings from the config (I see we have some there)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to have a separate compression config in projectConfig.admin
that we could pass here, as I don't necessarily think the compressions options you want generally for your server === the compression you want for the admin dashboard. But I think we can leave that for later, the default compression options seems to work great for this use case, but we should definetly open them up to people if they want to modify it for whatever reason.
@@ -5,14 +5,17 @@ | |||
"author": "Kasper Kristensen <[email protected]>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the timing is not the best, but I feel like we can do better with the naming. To me
admin-sdk
would be closer to what admin-shared
does. And the current admin-sdk
can be more something like admin-builder
. I am not saying we need to do it in this PR, but something to think about before officially releasing v2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that the naming can be better, and something we need to revisit, but would hold off on it to post RC, as it requires we update the packages a couple of different places.
packages/admin-next/dashboard/src/components/layout/settings-layout/settings-layout.tsx
Outdated
Show resolved
Hide resolved
/snapshot-this |
🚀 A snapshot release has been made for this PRTest the snapshots by updating your yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add [email protected] yarn add [email protected] yarn add @medusajs/[email protected] yarn add [email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add [email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add [email protected] yarn add [email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful
packages/admin-next/admin-shared/src/extensions/virtual/utils.ts
Outdated
Show resolved
Hide resolved
packages/admin-next/dashboard/src/components/layout/main-layout/main-layout.tsx
Outdated
Show resolved
Hide resolved
packages/admin-next/dashboard/src/components/layout/main-layout/main-layout.tsx
Outdated
Show resolved
Hide resolved
|
||
type Options = { | ||
app: Express | ||
adminConfig: ConfigModule["admin"] | ||
configModule: ConfigModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configModule: ConfigModule | |
configModule: Pick<ConfigModule> |
The idea being that you are not require to pass the entire configuration as only the admin is consumed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have a "plugins" concept again, we will need to read that to resolve where to look for possible admin extensions. So right now we only need the admin part later we will need more :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes thats true 😂 my bad 💪
@kasperkristensen, this means users will have to separately install If so, could I get you to include a changeset for it? I don't think we have that, so I can't test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
|
Ah lol sorry, a versioning mismatch on my end caused my lock-file to be incorrect. Thx! |
@olivermrbl are you cool with merging this now, so I can jump on adding InjectionZones back to admin |
Let's do it! 🚢 |
… for UI extensions (#7383) * intial work * update lock * add routes and fix HMR of configs * cleanup * rm imports * rm debug from plugin * address feedback * address feedback
* chore(medusa): strict zod versions in workspace * feat(dashboard): add campaign create to promotion UI * wip * fix(medusa): Missing middlewares export (#7289) * fix(docblock-generator): fix how type names created from Zod objects are inferred (#7292) * feat(api-ref): show schema of a tag (#7297) * feat: Add support for sendgrid and logger notification providers (#7290) * feat: Add support for sendgrid and logger notification providers * fix: changes based on PR review * chore: add action to automatically label docs (#7284) * chore: add action to automatically label docs * removes the paths param * docs: preparations for preview (#7267) * configured base paths + added development banner * fix typelist site url * added navbar and sidebar badges * configure algolia filters * remove AI assistant * remove unused imports * change navbar text and badge * lint fixes * fix build error * add to api reference rewrites * fix build error * fix build errors in user-guide * fix feedback component * add parent title to pagination * added breadcrumbs component * remove user-guide links * resolve todos * fix details about authentication * change documentation title * lint content * chore: fix bug with form reset * chore: address reviews * chore: fix specs * chore: loads of FE fixes + BE adds * chore: add more polishes + reorg files * chore: fixes to promotions modal * chore: cleanup * chore: cleanup * chore: fix build * chore: fkix cart spec * chore: fix module tests * chore: fix moar tests * wip * chore: templates + fixes + migrate currency * chore: fix build, add validation for max_quantity * chore: allow removing campaigns * chore: fix specs * chore: scope campaigns based on currency * remove console logs * chore: add translations + update keys * chore: move over filesfrom v2 to routes * chore(dashboard): Delete old translation files (#7423) * feat(dashboard,admin-sdk,admin-shared,admin-vite-plugin): Add support for UI extensions (#7383) * intial work * update lock * add routes and fix HMR of configs * cleanup * rm imports * rm debug from plugin * address feedback * address feedback * temp skip specs --------- Co-authored-by: Adrien de Peretti <[email protected]> Co-authored-by: Shahed Nasser <[email protected]> Co-authored-by: Stevche Radevski <[email protected]> Co-authored-by: Oli Juhl <[email protected]> Co-authored-by: Kasper Fabricius Kristensen <[email protected]>
What
/src/admin/routes/settings
. This change was made, as there are no difference between what a route and a settings route is in the new admin, both now uses sidebar menu items for navigation, and in the new dashboard settings can now have multiple levels of nesting -/settings/provider/:id/edit
etc.Examples
Note
defineWidgetConfig
anddefineRouteConfig
from@medusajs/medusa
, but that is not possible as the medusa package leaks Node code into the admin build. For the time being the helpers can be imported from@medusajs/admin-shared
.TODO in follow up PR(s)
/dashboard
.product.details.*
widgets, or do we want people to fetch the data themselves, etc.path
, to prevent serving the admin from reserved paths:/admin
,/store
,/auth
,/
./create
route as a child of the another route in order to render the modal on top instead of in an entirely different route.