Skip to content
Open
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
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy to Vercel

on:
push:
branches:
- main
- uat

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get commit author email
id: author
run: echo "email=${{ github.event.head_commit.author.email }}" >> $GITHUB_OUTPUT

- name: Trigger Vercel deploy (main)
if: github.ref == 'refs/heads/main' && steps.author.outputs.email != 'thapecroth@gmail.com'
run: wget -qO- 'https://api.vercel.com/v1/integrations/deploy/prj_QwPrIonTdSeiQZfcFyQnKYNClmeY/3VS0kem3yS'

- name: Trigger Vercel deploy (uat)
if: github.ref == 'refs/heads/uat' && steps.author.outputs.email != 'thapecroth@gmail.com'
run: wget -qO- 'https://api.vercel.com/v1/integrations/deploy/prj_QwPrIonTdSeiQZfcFyQnKYNClmeY/t6PUH5YKFc'
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
37 changes: 21 additions & 16 deletions src/components/layout/main-layout/main-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ import { Collapsible as RadixCollapsible } from "radix-ui";
import { useTranslation } from "react-i18next";
import { Link, useLocation, useNavigate } from "react-router-dom";

import { useLogout } from "../../../hooks/api";
import { useStore } from "../../../hooks/api/store";
import { useDocumentDirection } from "../../../hooks/use-document-direction";
import { queryClient } from "../../../lib/query-client";
import { useExtension } from "../../../providers/extension-provider";
import { useSearch } from "../../../providers/search-provider";
import { Skeleton } from "../../common/skeleton";
import { INavItem, NavItem } from "../../layout/nav-item";
import { Shell } from "../../layout/shell";
import { UserMenu } from "../user-menu";
import { useLogout } from "@/hooks/api";
import { useStore } from "@/hooks/api/store";
import { useDocumentDirection } from "@/hooks/use-document-direction";
import { queryClient } from "@/lib/query-client";
import { useExtension } from "@/providers/extension-provider";
import { useSearch } from "@/providers/search-provider";
import { Skeleton } from "@/components/common/skeleton";
import { Shell } from "@/components/layout/shell";
import { UserMenu } from "@/components/layout/user-menu";
import type { INavItem } from "@/components/layout/nav-item";
import { NavItem } from "@/components/layout/nav-item";

export const MainLayout = () => {
return (
Expand Down Expand Up @@ -284,13 +285,17 @@ const useCoreRoutes = (): Omit<INavItem, "pathname">[] => {
to: "/requests/product/",
},
{
label: t("requests.product-tag"),
to: "/requests/product-tag",
},
{
label: t("requests.product-type"),
to: "/requests/product-type",
label: t("requests.customTag"),
to: "/requests/custom-tag",
},
// {
// label: t("requests.product-tag"),
// to: "/requests/product-tag",
// },
// {
// label: t("requests.product-type"),
// to: "/requests/product-type",
// },
{
label: t("requests.review-remove"),
to: "/requests/review-remove",
Expand Down
8 changes: 4 additions & 4 deletions src/components/layout/nav-item/nav-item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
PropsWithChildren,
ReactNode,
type PropsWithChildren,
type ReactNode,
useCallback,
useEffect,
useState,
Expand All @@ -12,8 +12,8 @@ import { Collapsible as RadixCollapsible } from "radix-ui";
import { useTranslation } from "react-i18next";
import { NavLink, useLocation } from "react-router-dom";

import { useGlobalShortcuts } from "../../../providers/keybind-provider/hooks";
import { ConditionalTooltip } from "../../common/conditional-tooltip";
import { useGlobalShortcuts } from "@/providers/keybind-provider/hooks";
import { ConditionalTooltip } from "@/components/common/conditional-tooltip";

type ItemType = "core" | "extension" | "setting";

Expand Down
36 changes: 20 additions & 16 deletions src/dashboard-app/dashboard-app.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import {
CustomFieldContainerZone,
CustomFieldFormTab,
CustomFieldFormZone,
CustomFieldModel,
InjectionZone,
type CustomFieldContainerZone,
type CustomFieldFormTab,
type CustomFieldFormZone,
type CustomFieldModel,
type InjectionZone,
NESTED_ROUTE_POSITIONS,
} from "@medusajs/admin-shared"
import * as React from "react"
import type * as React from "react"
import {
createBrowserRouter,
RouteObject,
type RouteObject,
RouterProvider,
} from "react-router-dom"
import { INavItem } from "../components/layout/nav-item"
import { Providers } from "../providers"
import { getRouteMap } from "./routes/get-route.map"
import { createRouteMap, getRouteExtensions } from "./routes/utils"
import {
import type { INavItem } from "@/components/layout/nav-item"
import { Providers } from "@/providers"
import { getRouteMap } from "@/dashboard-app/routes/get-route.map"
import { createRouteMap, getRouteExtensions } from "@/dashboard-app/routes/utils"
import type {
ConfigExtension,
ConfigField,
ConfigFieldMap,
Expand Down Expand Up @@ -130,6 +130,7 @@ export class DashboardApp {
`[@medusajs/dashboard] Menu item for path "${item.path}" can't be added to the sidebar as it contains a parameter.`
)
}

return
}

Expand All @@ -146,6 +147,7 @@ export class DashboardApp {
`[@medusajs/dashboard] Nested settings menu item "${item.path}" can't be added to the sidebar. Only top-level settings items are allowed.`
)
}

return // Skip this item entirely
}

Expand All @@ -165,6 +167,7 @@ export class DashboardApp {
`[@medusajs/dashboard] Nested menu item "${item.path}" can't be added to the sidebar as it is nested under "${parentItem.nested}".`
)
}

return
}

Expand Down Expand Up @@ -309,6 +312,7 @@ export class DashboardApp {
zoneStructure = { components: [], tabs: new Map() }
formZoneMap.set(zone, zoneStructure)
}

return zoneStructure
}

Expand Down Expand Up @@ -345,7 +349,7 @@ export class DashboardApp {
private populateDisplays(plugins: DashboardPlugin[]): DisplayMap {
const displays = new Map<
CustomFieldModel,
Map<CustomFieldContainerZone, React.ComponentType<{ data: any }>[]>
Map<CustomFieldContainerZone, React.ComponentType<{ data: unknown }>[]>
>()

plugins.forEach((plugin) => {
Expand All @@ -356,7 +360,7 @@ export class DashboardApp {
model as CustomFieldModel,
new Map<
CustomFieldContainerZone,
React.ComponentType<{ data: any }>[]
React.ComponentType<{ data: unknown }>[]
>()
)
}
Expand All @@ -380,10 +384,10 @@ export class DashboardApp {

private processDisplays(
displays: DisplayExtension[]
): Map<CustomFieldContainerZone, React.ComponentType<{ data: any }>[]> {
): Map<CustomFieldContainerZone, React.ComponentType<{ data: unknown }>[]> {
const modelDisplayMap = new Map<
CustomFieldContainerZone,
React.ComponentType<{ data: any }>[]
React.ComponentType<{ data: unknown }>[]
>()

displays.forEach((display) => {
Expand Down
19 changes: 19 additions & 0 deletions src/dashboard-app/routes/get-route.map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,25 @@ export function getRouteMap({
},
],
},
{
path: "custom-tag",
handle: {
breadcrumb: () => t("requests.customTag"),
},
children: [
{
path: "",
lazy: () => import("../../routes/requests/custom-tag"),
children: [
{
path: "create",
lazy: () =>
import("../../routes/requests/custom-tag/custom-tag-create"),
},
],
},
],
},
{
path: "return",
handle: {
Expand Down
Loading