diff --git a/.github/workflows/sitemap.yml b/.github/workflows/sitemap.yml new file mode 100644 index 000000000..4b17de852 --- /dev/null +++ b/.github/workflows/sitemap.yml @@ -0,0 +1,33 @@ +name: Generate Sitemap + +on: + push: + branches: + - main + paths: + - "docs/**" + workflow_dispatch: + +permissions: + contents: write + +jobs: + sitemap: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Generate Sitemap + uses: tenelabs/docsify-sitemap-action@v1 + with: + baseUrl: https://docs.chaibuilder.com + docsPath: ./docs + sitemapPath: ./docs/sitemap.xml + + - name: Commit and Push + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add docs/sitemap.xml + git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update sitemap" && git push) diff --git a/docs/index.html b/docs/index.html index 6911667e4..f24c58336 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,7 +50,7 @@ loadSidebar: true, subMaxLevel: 3, auto2top: true, - routerMode: "history", + routerMode: "hash", search: { placeholder: "Search docs...", noData: "No results found", diff --git a/src/atoms/ui.ts b/src/atoms/ui.ts index 810085c02..3afd7a4c2 100644 --- a/src/atoms/ui.ts +++ b/src/atoms/ui.ts @@ -1,3 +1,5 @@ +import { defaultThemeValues } from "@/hooks/default-theme-options"; +import { ChaiTheme } from "@/types"; import { atom } from "jotai"; import { atomWithStorage } from "jotai/utils"; import { TreeApi } from "react-arborist"; @@ -58,3 +60,4 @@ selectedLibraryAtom.debugLabel = "selectedLibraryAtom"; export const dataBindingActiveAtom = atom(true); dataBindingActiveAtom.debugLabel = "dataBindingActiveAtom"; +export const lsThemeAtom = atomWithStorage("chai-builder-theme", defaultThemeValues); diff --git a/src/core/rjsf-widgets/rte-widget/rte-color-picker.tsx b/src/core/rjsf-widgets/rte-widget/rte-color-picker.tsx index 8bbb25f1e..9436e6fc2 100644 --- a/src/core/rjsf-widgets/rte-widget/rte-color-picker.tsx +++ b/src/core/rjsf-widgets/rte-widget/rte-color-picker.tsx @@ -1,7 +1,7 @@ +import { lsThemeAtom } from "@/atoms/ui"; import { Input } from "@/components/ui/input"; import { cn } from "@/core/utils/cn"; import { useDarkMode } from "@/hooks/use-dark-mode"; -import { lsThemeAtom } from "@/routes/demo/atoms-dev"; import { CaretDownIcon, Cross1Icon } from "@radix-ui/react-icons"; import { useDebouncedState } from "@react-hookz/web"; import { useAtom } from "jotai"; diff --git a/src/pages/client/components/save-ui-blocks/unpublished-partials-modal.tsx b/src/pages/client/components/save-ui-blocks/unpublished-partials-modal.tsx index 0f32c35b2..9a0c312ca 100644 --- a/src/pages/client/components/save-ui-blocks/unpublished-partials-modal.tsx +++ b/src/pages/client/components/save-ui-blocks/unpublished-partials-modal.tsx @@ -1,3 +1,4 @@ +import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -14,6 +15,7 @@ interface UnpublishedPartialsModalProps { isOpen: boolean; onClose: () => void; onContinue: () => void; + onViewChanges?: (partialId: string, partialName: string) => void; isPending?: boolean; partialBlocksInfo?: PartialBlockInfo[]; } @@ -22,6 +24,7 @@ const UnpublishedPartialsModal = ({ isOpen, onClose, onContinue, + onViewChanges, isPending = false, partialBlocksInfo = [], }: UnpublishedPartialsModalProps) => { @@ -31,10 +34,10 @@ const UnpublishedPartialsModal = ({ {isOpen && ( - {t("Publish Page with Unpublished Blocks?")} + {t("You have some unpublished changes")} {t( - "You have unpublished changes in the following blocks. They will be published together with the page.", + "The following partials are either unpublished or have unpublished changes.", )} @@ -43,12 +46,29 @@ const UnpublishedPartialsModal = ({