From f8a0efc4360faf4b40a9aa592681fcd345c3c01a Mon Sep 17 00:00:00 2001 From: nitro <143457057+n7itro@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:44:19 +0200 Subject: [PATCH 01/16] v28 release notes --- src/lib/release-notes.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts index ed9f36b..eb4ea52 100644 --- a/src/lib/release-notes.ts +++ b/src/lib/release-notes.ts @@ -566,7 +566,41 @@ export const releaseNotes: ReleaseNote[] = [ issue: 355 } ] - } + }, + { + version: "1.0.0-a.28", + date: "22/08/2024", + extra: "This release is the twenty-eighth alpha release of the 1.0.0-alpha series.", + features: [ + "Enabled JPEG XL", + "Changed Zen Core Components license to CC BY-SA", + "Added support for color themes in theme creation", + "Fixed sidebar shortcuts", + "Started work on browser translations" + ], + fixes: [ + { + description: "No way to restore native theming to toolbar", + issue: 426 + }, + { + description: "Address bar icons are hidden", + issue: 430 + }, + { + description: "Tabs don't appear in vertical tab bar", + issue: 429 + }, + { + description: "Location bar is not focused when opening new window", + issue: 414 + }, + { + description: "The treshhold for the expanded tab sidebar in compact mode is too high", + issue: 389 + } + ] + }, ].reverse(); export function releaseNoteIsAlpha(note: ReleaseNote) { From 9007583cf4fa6c04fdeff69a41cd8b77c02b2b38 Mon Sep 17 00:00:00 2001 From: nitro <143457057+n7itro@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:21:21 +0200 Subject: [PATCH 02/16] refer to official docs instead of github issue --- src/components/download.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/download.tsx b/src/components/download.tsx index bc6018c..2ab7f6e 100644 --- a/src/components/download.tsx +++ b/src/components/download.tsx @@ -245,7 +245,7 @@ export default function DownloadPage() { className="mt-5" onClick={() => (window.location.href = - "https://github.com/zen-browser/desktop/issues/53") + "https://docs.zen-browser.app/guides/install-macos") } > Download Zen for MacOS From ba5028f72d47c5b6a4f35911fa76b898715748e3 Mon Sep 17 00:00:00 2001 From: Pushpank Dhruw Date: Thu, 22 Aug 2024 21:01:27 +0530 Subject: [PATCH 03/16] feat(image): Improved image loading and optimization --- next.config.mjs | 19 ++++++++++++++----- src/components/theme-card.tsx | 9 +++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 244af26..48f03d4 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,11 +1,20 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { - serverActions: { - // edit: updated to new key. Was previously `allowedForwardedHosts` - allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], - }, + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'raw.githubusercontent.com', + }, + ], + }, + experimental: { + serverActions: { + // edit: updated to new key. Was previously `allowedForwardedHosts` + allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], }, + + }, }; export default nextConfig; diff --git a/src/components/theme-card.tsx b/src/components/theme-card.tsx index aae70f6..988bbce 100644 --- a/src/components/theme-card.tsx +++ b/src/components/theme-card.tsx @@ -1,7 +1,7 @@ +import Image from "next/image"; import { getThemeAuthorLink, ZenTheme } from "@/lib/themes"; import styled from "styled-components"; -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog"; -import { Button } from "./ui/button"; +import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog";import { Button } from "./ui/button"; const ThemeCardWrapepr = styled.div` `; @@ -15,8 +15,9 @@ export default function ThemeCard({ { if (event.target instanceof HTMLAnchorElement) return; window.open(`/themes/${theme.id}`, "_self"); - }} className="flex flex-col justify-start p-5 rounded-lg shadow-sm bg-muted dark:bg-muted/50 border border-grey-900 dark:border-muted w-full hover:shadow-lg transition duration-300 ease-in-out hover:bg-muted/100 hover:border-blue-500 cursor-pointer select-none hover:border-blue-500 hover:shadow-lg"> - {theme.name} + }} className="flex flex-col justify-start p-5 rounded-lg shadow-sm bg-muted dark:bg-muted/50 border border-grey-900 dark:border-muted w-full hover:shadow-lg transition duration-300 ease-in-out hover:bg-muted/100 hover:border-blue-500 cursor-pointer select-none "> + {theme.name}

{theme.name}

{theme.homepage && ( From 38453638e175b308ba00d0f2862071246ecf7f86 Mon Sep 17 00:00:00 2001 From: Pushpank Dhruw Date: Thu, 22 Aug 2024 21:43:23 +0530 Subject: [PATCH 04/16] refector: Add useEffect dependency --- src/components/theme-page.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/theme-page.tsx b/src/components/theme-page.tsx index 444a2b7..b8be7fd 100644 --- a/src/components/theme-page.tsx +++ b/src/components/theme-page.tsx @@ -1,3 +1,4 @@ +import Image from "next/image"; import { getThemeAuthorLink, getThemeMarkdown, ZenTheme } from "@/lib/themes"; import { Button } from "./ui/button"; import { useEffect, useState } from "react"; @@ -9,12 +10,12 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) { const [readme, setReadme] = useState(null); useEffect(() => { getThemeMarkdown(theme).then(setReadme); - }, []); + }, [theme]); return ( -
+
- {theme.name} + {theme.name}

{theme.name}

{theme.description}

{theme.homepage && ( From 0a64b14664ae12437cafada9139c42d2b544b818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?mauro=20=F0=9F=A4=99?= <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:07:53 +0000 Subject: [PATCH 05/16] refactor: Add dialog background color input to CreateThemePage component --- src/components/create-theme.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/create-theme.tsx b/src/components/create-theme.tsx index 663e666..01a6a1f 100644 --- a/src/components/create-theme.tsx +++ b/src/components/create-theme.tsx @@ -179,6 +179,13 @@ export default function CreateThemePage() {
setColorsBorder(e.target.value)} />
+
+ Dialog background color + +
+ setDialogBg(e.target.value)} /> +
From 1a10f011420367a6caed44654df4dc09b95e3038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?mauro=20=F0=9F=A4=99?= <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:10:52 +0000 Subject: [PATCH 06/16] Fixed features --- src/components/features.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index b5df379..16c13f7 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -136,7 +136,7 @@ export default function Features() {
))}
-
+
From 60b21f7f42162b4c22b2ad21bade42e491145d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?mauro=20=F0=9F=A4=99?= <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:21:41 +0200 Subject: [PATCH 07/16] Update create-theme.tsx --- src/components/create-theme.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/create-theme.tsx b/src/components/create-theme.tsx index 01a6a1f..806be32 100644 --- a/src/components/create-theme.tsx +++ b/src/components/create-theme.tsx @@ -179,7 +179,7 @@ export default function CreateThemePage() {
setColorsBorder(e.target.value)} />
-

Dialog background color

From f0c29781ba946956641fb725ac58df50dd080f10 Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Fri, 23 Aug 2024 12:04:10 +0200 Subject: [PATCH 08/16] refactor: Update CreateThemePage component to use dynamic theme data --- src/components/features.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index 16c13f7..014fdce 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -136,10 +136,10 @@ export default function Features() {
))}
-
+
-
+ Checkout our themes store From 200c18f0eb0b6b88c76fa01c6ffb55624cc79749 Mon Sep 17 00:00:00 2001 From: Nima Date: Fri, 23 Aug 2024 20:52:22 +0330 Subject: [PATCH 09/16] Fix Downlaod buttons not going to /download --- src/components/features.tsx | 5 +++-- src/components/release-note.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index 014fdce..384f621 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -28,6 +28,7 @@ import { UpdateIcon, } from "@radix-ui/react-icons"; import Image from "next/image"; +import Link from "next/link"; import { Button } from './ui/button'; import { COLORS } from './create-theme'; import { Slider } from './ui/slider'; @@ -129,7 +130,7 @@ export default function Features() { We are always looking for ways to make your experience better. With stackable themes that can be mixed and matched, you can create a browser that is truly yours. Learn more

- +
{COLORS.map((color) => ( @@ -163,7 +164,7 @@ export default function Features() { Killer feature
- +
diff --git a/src/components/release-note.tsx b/src/components/release-note.tsx index 8cf450a..9dc2c15 100644 --- a/src/components/release-note.tsx +++ b/src/components/release-note.tsx @@ -97,7 +97,7 @@ export default function ReleaseNoteElement({ data }: { data: ReleaseNote }) {
- +
From da088d029266897771d54a328950d27058d296ab Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Fri, 23 Aug 2024 20:09:23 +0200 Subject: [PATCH 10/16] refactor: Disable "Create theme" button on CreateThemePage This commit disables the "Create theme" button on the CreateThemePage component by adding the `disabled` attribute to the Button component. This change is made to prevent users from creating new color themes for the browser until a more accessible solution is implemented. However, users can still create their own themes and share them with the community. --- src/components/create-theme.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/create-theme.tsx b/src/components/create-theme.tsx index 806be32..1d3be00 100644 --- a/src/components/create-theme.tsx +++ b/src/components/create-theme.tsx @@ -187,9 +187,12 @@ export default function CreateThemePage() { setDialogBg(e.target.value)} />
+
+ Right now, we aren't taking more color themes for the browser, until we find a way to make it more accessible for everyone. However, you can still create your own theme and share it with the community. +
- + From 1c0ad13629b762f7269830e13de0872022be2995 Mon Sep 17 00:00:00 2001 From: Shawn Santhoshgeorge <32755895+ShawnGeorge03@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:03:12 -0400 Subject: [PATCH 11/16] fix: Fixed download links for Branding Assets --- src/components/branding-assets.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/branding-assets.tsx b/src/components/branding-assets.tsx index fb14914..5100b07 100644 --- a/src/components/branding-assets.tsx +++ b/src/components/branding-assets.tsx @@ -1,3 +1,4 @@ + import { LOGO_COLORS } from "@/lib/logos"; export function BrandingAssets() { @@ -19,6 +20,7 @@ export function BrandingAssets() {
{color} @@ -40,7 +42,7 @@ export function BrandingAssets() {
{color} From de147a219f9358c5d81006bb34f59b090f36cc32 Mon Sep 17 00:00:00 2001 From: busybox11 Date: Sat, 24 Aug 2024 01:43:09 +0200 Subject: [PATCH 12/16] fix: Use NextJS recommended config for styled-components --- next.config.mjs | 10 +++++---- src/app/layout.tsx | 5 +++-- src/lib/styled-components-registry.tsx | 29 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 src/lib/styled-components-registry.tsx diff --git a/next.config.mjs b/next.config.mjs index 48f03d4..431d026 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,17 +3,19 @@ const nextConfig = { images: { remotePatterns: [ { - protocol: 'https', - hostname: 'raw.githubusercontent.com', + protocol: "https", + hostname: "raw.githubusercontent.com", }, ], }, experimental: { serverActions: { // edit: updated to new key. Was previously `allowedForwardedHosts` - allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], + allowedOrigins: ["localhost:3000", "get-zen.vercel.app"], }, - + }, + compiler: { + styledComponents: true, }, }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3de6cf4..971e56e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,8 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.css"; -import { ThemeProvider } from "@/components/theme-provider" +import { ThemeProvider } from "@/components/theme-provider"; +import StyledComponentsRegistry from "@/lib/styled-components-registry"; const inter = Inter({ subsets: ["latin"] }); @@ -25,7 +26,7 @@ export default function RootLayout({ enableSystem disableTransitionOnChange > - {children} + {children} diff --git a/src/lib/styled-components-registry.tsx b/src/lib/styled-components-registry.tsx new file mode 100644 index 0000000..fa12293 --- /dev/null +++ b/src/lib/styled-components-registry.tsx @@ -0,0 +1,29 @@ +"use client"; + +import React, { useState } from "react"; +import { useServerInsertedHTML } from "next/navigation"; +import { ServerStyleSheet, StyleSheetManager } from "styled-components"; + +export default function StyledComponentsRegistry({ + children, +}: { + children: React.ReactNode; +}) { + // Only create stylesheet once with lazy initial state + // x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state + const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet()); + + useServerInsertedHTML(() => { + const styles = styledComponentsStyleSheet.getStyleElement(); + styledComponentsStyleSheet.instance.clearTag(); + return <>{styles}; + }); + + if (typeof window !== "undefined") return <>{children}; + + return ( + + {children} + + ); +} From 465b1ab524b7f2339d4d9399c01155211d01be48 Mon Sep 17 00:00:00 2001 From: camilo Date: Fri, 23 Aug 2024 21:21:14 -0500 Subject: [PATCH 13/16] fix(theme-page): resolve sidebar overlapping footer issue - Fixed the issue where the sidebar was overlapping the footer by changing `lg:fixed` to `lg:sticky` and adjusting padding/margin. - Removed unused imports (`LoaderIcon`, `LoaderPinwheelIcon`, `MoveLeftIcon`) from `lucide-react`. - Moved "Go back" button to the top of the sidebar for better UX. --- src/components/theme-page.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/theme-page.tsx b/src/components/theme-page.tsx index b8be7fd..6a89b9d 100644 --- a/src/components/theme-page.tsx +++ b/src/components/theme-page.tsx @@ -4,7 +4,7 @@ import { Button } from "./ui/button"; import { useEffect, useState } from "react"; import Markdown from "react-markdown"; import '../app/privacy-policy/markdown.css'; -import { ChevronLeft, LoaderCircleIcon, LoaderIcon, LoaderPinwheelIcon, MoveLeftIcon } from "lucide-react"; +import { ChevronLeft, LoaderCircleIcon } from "lucide-react"; export default function ThemePage({ theme }: { theme: ZenTheme }) { const [readme, setReadme] = useState(null); @@ -14,7 +14,11 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) { return (
-
+
-
-
window.history.back()}> - -

Go back

-
+
{readme === null ? ( - + ) : ( {`${readme}`} )} From 0861a2f44d8afcc8f30c0aec93734dd0ae25c0f2 Mon Sep 17 00:00:00 2001 From: ayn2op Date: Sat, 24 Aug 2024 14:46:58 +0530 Subject: [PATCH 14/16] fix: capitalize "firefox" --- src/app/privacy-policy/page.tsx | 2 +- src/components/features.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/privacy-policy/page.tsx b/src/app/privacy-policy/page.tsx index 7a9af0a..5408dea 100644 --- a/src/app/privacy-policy/page.tsx +++ b/src/app/privacy-policy/page.tsx @@ -52,7 +52,7 @@ Zen Browser offers a "Sync" feature, this is implemented using Mozilla Firefox's # 4. Data Security Although Zen Browser does not collect your data, we are committed to protecting the information that is stored locally on your device and, if you use the Sync feature, the encrypted data stored on Mozilla's servers. We recommend that you use secure passwords, enable device encryption, and regularly update your software to ensure your data remains safe. -* Note that most of the security measures are taken care by mozilla firefox. +* Note that most of the security measures are taken care by Mozilla Firefox. # 5. Your Control ## 5.1. Data Deletion diff --git a/src/components/features.tsx b/src/components/features.tsx index 384f621..2b10417 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -74,7 +74,7 @@ export default function Features() { Goodbye bad performance

- We are constantly tweak firefox's engine and settings to make it + We are constantly tweak Firefox's engine and settings to make it faster than ever. Learn more

@@ -102,7 +102,7 @@ export default function Features() { Secure by default

- We are always using the latest security features from firefox to + We are always using the latest security features from Firefox to keep you safe. Learn more

From e0ba5c0fbcc0be5d4ef7d48349c3fbf719d7d3fa Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Sat, 24 Aug 2024 11:40:36 +0200 Subject: [PATCH 15/16] refactor: Remove redundant code for features layout --- src/components/features.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index 384f621..7490690 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -118,8 +118,6 @@ export default function Features() {
-
-
@@ -149,8 +147,6 @@ export default function Features() {
-
-
From 9c49f996c3d289e848ce684b504bed29ca5557cb Mon Sep 17 00:00:00 2001 From: thebluedev Date: Sat, 24 Aug 2024 15:16:13 +0530 Subject: [PATCH 16/16] fix: Fix grammar in features --- src/components/features.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index 014fdce..eecd57c 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -73,7 +73,7 @@ export default function Features() { Goodbye bad performance

- We are constantly tweak firefox's engine and settings to make it + We constantly tweak firefox's engine and settings to make it faster than ever. Learn more