Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Add bug report button (#1603)
Oleg Isonen2dd7e2f715be
diff --git a/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx b/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsxindex 29468b391f..1bddfa56f4 100644--- a/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx+++ b/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx@@ -1,5 +1,6 @@import { useState } from "react";import {+ Box,SidebarTabs,SidebarTabsContent,SidebarTabsList,@@ -12,6 +13,7 @@ import type { TabName } from "./types";import { useClientSettings } from "~/builder/shared/client-settings";import { Flex } from "@webstudio-is/design-system";import { theme } from "@webstudio-is/design-system";+import { BugIcon } from "@webstudio-is/icons";const none = { TabContent: () => null };@@ -59,6 +61,20 @@ export const SidebarLeft = ({ publish }: SidebarLeftProps) => {</SidebarTabsTrigger>))}</SidebarTabsList>+ <Box css={{ borderRight: `1px solid ${theme.colors.borderMain}` }}>+ <SidebarTabsTrigger+ as={"button"}+ aria-label={"Report bug"}+ onClick={() => {+ window.open(+ "https://github.com/webstudio-is/webstudio/discussions/new?category=q-a&labels=bug&title=[Bug]"+ );+ }}+ >+ <BugIcon size={22} />+ </SidebarTabsTrigger>+ </Box>+<SidebarTabsContentvalue={activeTab === "none" ? "" : activeTab}css={{diff --git a/packages/icons/icons/bug.svg b/packages/icons/icons/bug.svgnew file mode 100644index 0000000000..2b40079b84--- /dev/null+++ b/packages/icons/icons/bug.svg@@ -0,0 +1,5 @@+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">+ <path d="M13.2945 9.41638L8.70154 9.41638C8.28732 9.41638 7.95154 9.75217 7.95154 10.1664C7.95154 10.5806 8.28732 10.9164 8.70154 10.9164L13.2945 10.9164C13.7087 10.9164 14.0445 10.5806 14.0445 10.1664C14.0445 9.75217 13.7087 9.41638 13.2945 9.41638Z" />+ <path d="M8.70154 12.9335L13.2945 12.9335C13.7087 12.9335 14.0445 13.2693 14.0445 13.6835C14.0445 14.0977 13.7087 14.4335 13.2945 14.4335L8.70154 14.4335C8.28732 14.4335 7.95154 14.0977 7.95154 13.6835C7.95154 13.2693 8.28732 12.9335 8.70154 12.9335Z" />+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.7685 7.67761C16.1906 6.29922 15.133 5.17177 13.8044 4.50417L15.1949 3.1137C15.4878 2.82081 15.4878 2.34594 15.1949 2.05304C14.902 1.76015 14.4271 1.76015 14.1342 2.05304L12.2254 3.96186C11.8298 3.88334 11.4207 3.84216 11.002 3.84216C10.5809 3.84216 10.1695 3.8838 9.77179 3.96319L7.86175 2.05316C7.56886 1.76027 7.09398 1.76027 6.80109 2.05316C6.5082 2.34605 6.5082 2.82093 6.80109 3.11382L8.19413 4.50686C6.86809 5.17479 5.8125 6.30107 5.23543 7.67761L2.56396 7.67761C2.14975 7.67761 1.81396 8.0134 1.81396 8.42761C1.81396 8.84183 2.14975 9.17761 2.56396 9.17761L4.81839 9.17761C4.77462 9.47613 4.75195 9.7815 4.75195 10.0922V11.1742L2.56396 11.1742C2.14975 11.1742 1.81396 11.51 1.81396 11.9242C1.81396 12.3384 2.14975 12.6742 2.56396 12.6742L4.75195 12.6742V13.7579C4.75195 14.0704 4.77488 14.3775 4.81914 14.6776L2.56396 14.6776C2.14975 14.6776 1.81396 15.0134 1.81396 15.4276C1.81396 15.8418 2.14975 16.1776 2.56396 16.1776L5.23759 16.1776C6.18327 18.4278 8.40808 20.0079 11.002 20.0079C13.5958 20.0079 15.8206 18.4278 16.7663 16.1776L19.4359 16.1776C19.8501 16.1776 20.1859 15.8418 20.1859 15.4276C20.1859 15.0134 19.8501 14.6776 19.4359 14.6776L17.1848 14.6776C17.229 14.3775 17.252 14.0704 17.252 13.7579V12.6742L19.4359 12.6742C19.8501 12.6742 20.1859 12.3384 20.1859 11.9242C20.1859 11.51 19.8501 11.1742 19.4359 11.1742L17.252 11.1742V10.0922C17.252 9.7815 17.2293 9.47613 17.1855 9.17761L19.4359 9.17761C19.8501 9.17761 20.1859 8.84183 20.1859 8.42761C20.1859 8.0134 19.8501 7.67761 19.4359 7.67761L16.7685 7.67761ZM11.002 5.34216C8.3786 5.34216 6.25195 7.46881 6.25195 10.0922V13.7579C6.25195 16.3813 8.3786 18.5079 11.002 18.5079C13.6253 18.5079 15.752 16.3813 15.752 13.7579V10.0922C15.752 7.46881 13.6253 5.34216 11.002 5.34216Z"/>+</svg>diff --git a/packages/icons/src/__generated__/bug.tsx b/packages/icons/src/__generated__/bug.tsxnew file mode 100644index 0000000000..91283b982e--- /dev/null+++ b/packages/icons/src/__generated__/bug.tsx@@ -0,0 +1,15 @@+// Generated from icons/bug.svg++import { forwardRef } from "react";+import type { IconProps } from "../types";++// prettier-ignore+export const BugIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" width={size} height={size} fill={color} {...props} ref={forwardedRef}><path d="M13.294 9.416H8.703a.75.75 0 0 0 0 1.5h4.592a.75.75 0 0 0 0-1.5ZM8.702 12.934h4.592a.75.75 0 0 1 0 1.5H8.703a.75.75 0 0 1 0-1.5Z" /><path fillRule="evenodd" d="M16.768 7.678a6.274 6.274 0 0 0-2.964-3.174l1.39-1.39a.75.75 0 1 0-1.06-1.061l-1.909 1.909a6.28 6.28 0 0 0-2.453.001l-1.91-1.91a.75.75 0 0 0-1.06 1.06l1.392 1.394a6.274 6.274 0 0 0-2.959 3.17H2.564a.75.75 0 0 0 0 1.5h2.254a6.302 6.302 0 0 0-.066.915v1.082H2.564a.75.75 0 0 0 0 1.5h2.188v1.084c0 .312.023.62.067.92H2.564a.75.75 0 0 0 0 1.5h2.674a6.252 6.252 0 0 0 11.528 0h2.67a.75.75 0 0 0 0-1.5h-2.251c.044-.3.067-.608.067-.92v-1.084h2.184a.75.75 0 0 0 0-1.5h-2.184v-1.082c0-.31-.023-.616-.066-.914h2.25a.75.75 0 0 0 0-1.5h-2.668Zm-5.766-2.336a4.75 4.75 0 0 0-4.75 4.75v3.666a4.75 4.75 0 1 0 9.5 0v-3.666a4.75 4.75 0 0 0-4.75-4.75Z" clipRule="evenodd" /></svg>+ );+ }+);++BugIcon.displayName = "BugIcon";diff --git a/packages/icons/src/__generated__/index.ts b/packages/icons/src/__generated__/index.tsindex fda9e8a41c..b697185ccc 100644--- a/packages/icons/src/__generated__/index.ts+++ b/packages/icons/src/__generated__/index.ts@@ -36,6 +36,7 @@ export * from "./border-width-top";export * from "./box";export * from "./bp-star-off";export * from "./bp-star-on";+export * from "./bug";export * from "./button-element";export * from "./checkbox-checked-filled";export * from "./checkbox-checked";