sync: canary cahnges to preview

This commit is contained in:
sriramveeraghanta
2025-07-04 13:57:40 +05:30
23 changed files with 88 additions and 29 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "admin",
"description": "Admin UI for Plane",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"scripts": {

View File

@@ -1,6 +1,6 @@
{
"name": "live",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "A realtime collaborative server powers Plane's rich text editor",
"main": "./src/server.ts",

View File

@@ -1,6 +1,6 @@
{
"name": "plane-api",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"description": "API server powering Plane's backend"

View File

@@ -1,6 +1,6 @@
{
"name": "space",
"version": "0.27.0",
"version": "0.27.1",
"private": true,
"license": "AGPL-3.0",
"scripts": {

View File

@@ -6,7 +6,7 @@ import { Disclosure } from "@headlessui/react";
// plane imports
import { useTranslation } from "@plane/i18n";
import { EUserWorkspaceRoles } from "@plane/types";
import { cn } from "@plane/utils";
import { cn, joinUrlPath } from "@plane/utils";
// hooks
import { useUserSettings } from "@/hooks/store";
@@ -72,7 +72,11 @@ const SettingsSidebarNavItem = observer((props: TSettingsSidebarNavItemProps) =>
{renderChildren ? (
<div className={buttonClass}>{titleElement}</div>
) : (
<Link href={`/${workspaceSlug}/${setting.href}`} className={buttonClass} onClick={() => toggleSidebar(true)}>
<Link
href={joinUrlPath(workspaceSlug, setting.href)}
className={buttonClass}
onClick={() => toggleSidebar(true)}
>
{titleElement}
</Link>
)}

View File

@@ -46,10 +46,11 @@ export const SettingsSidebar = observer((props: SettingsSidebarProps) => {
<SettingsSidebarHeader customHeader={customHeader} />
{/* Navigation */}
<div className="divide-y divide-custom-border-100 overflow-x-hidden w-full h-full overflow-y-scroll">
{categories.map((category) => (
<div key={category} className="py-3">
<span className="text-sm font-semibold text-custom-text-350 capitalize mb-2">{t(category)}</span>
{groupedSettings[category].length > 0 && (
{categories.map((category) => {
if (groupedSettings[category].length === 0) return null;
return (
<div key={category} className="py-3">
<span className="text-sm font-semibold text-custom-text-350 capitalize mb-2">{t(category)}</span>
<div className="relative flex flex-col gap-0.5 h-full mt-2">
{groupedSettings[category].map(
(setting) =>
@@ -66,9 +67,9 @@ export const SettingsSidebar = observer((props: SettingsSidebarProps) => {
)
)}
</div>
)}
</div>
))}
</div>
);
})}
</div>
</div>
);

View File

@@ -1,6 +1,6 @@
{
"name": "web",
"version": "0.27.0",
"version": "0.27.1",
"private": true,
"license": "AGPL-3.0",
"scripts": {

View File

@@ -2,7 +2,7 @@
"name": "plane",
"description": "Open-source project management that unlocks customer value",
"repository": "https://github.com/makeplane/plane.git",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"workspaces": [

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/constants",
"version": "0.27.0",
"version": "0.27.1",
"private": true,
"license": "AGPL-3.0",
"type": "module",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/editor",
"version": "0.27.0",
"version": "0.27.1",
"description": "Core Editor that powers Plane",
"license": "AGPL-3.0",
"private": true,

View File

@@ -1,7 +1,7 @@
{
"name": "@plane/eslint-config",
"private": true,
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"files": [
"library.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/hooks",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "React hooks that are shared across multiple apps internally",
"private": true,

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/i18n",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "I18n shared across multiple apps internally",
"private": true,

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/logger",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "Logger shared across multiple apps internally",
"private": true,

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/propel",
"version": "0.27.0",
"version": "0.27.1",
"private": true,
"license": "AGPL-3.0",
"scripts": {

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/services",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"main": "./src/index.ts",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/shared-state",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "Shared state shared across multiple apps internally",
"private": true,

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/tailwind-config",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"description": "common tailwind configuration across monorepo",
"main": "tailwind.config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/types",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"type": "module",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/typescript-config",
"version": "0.27.0",
"version": "0.27.1",
"license": "AGPL-3.0",
"private": true,
"files": [

View File

@@ -2,7 +2,7 @@
"name": "@plane/ui",
"description": "UI components shared across multiple apps internally",
"private": true,
"version": "0.27.0",
"version": "0.27.1",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",

View File

@@ -1,6 +1,6 @@
{
"name": "@plane/utils",
"version": "0.27.0",
"version": "0.27.1",
"description": "Helper functions shared across multiple apps internally",
"license": "AGPL-3.0",
"private": true,

View File

@@ -318,3 +318,57 @@ export const copyTextToClipboard = async (text: string): Promise<void> => {
}
await navigator.clipboard.writeText(text);
};
/**
* @description Joins URL path segments properly, removing duplicate slashes using URL encoding
* @param {...string} segments - URL path segments to join
* @returns {string} Properly joined URL path
* @example
* joinUrlPath("/workspace", "/projects") => "/workspace/projects"
* joinUrlPath("/workspace", "projects") => "/workspace/projects"
* joinUrlPath("workspace", "projects") => "/workspace/projects"
* joinUrlPath("/workspace/", "/projects/") => "/workspace/projects/"
*/
export const joinUrlPath = (...segments: string[]): string => {
if (segments.length === 0) return "";
// Filter out empty segments
const validSegments = segments.filter((segment) => segment !== "");
if (validSegments.length === 0) return "";
// Process segments to normalize slashes
const processedSegments = validSegments.map((segment, index) => {
let processed = segment;
// Remove leading slashes from all segments except the first
if (index > 0) {
while (processed.startsWith("/")) {
processed = processed.substring(1);
}
}
// Remove trailing slashes from all segments except the last
if (index < validSegments.length - 1) {
while (processed.endsWith("/")) {
processed = processed.substring(0, processed.length - 1);
}
}
return processed;
});
// Join segments with single slash
const joined = processedSegments.join("/");
// Use URL constructor to normalize the path and handle double slashes
try {
// Create a dummy URL to leverage browser's URL normalization
const dummyUrl = new URL(`http://example.com/${joined}`);
return dummyUrl.pathname;
} catch {
// Fallback: manually handle double slashes by splitting and filtering
const pathParts = joined.split("/").filter((part) => part !== "");
return pathParts.length > 0 ? `/${pathParts.join("/")}` : "";
}
};