Files
plane/apps/dev-wiki/app/layout.tsx
Bavisetti Narayan 9e11dc9cdc [WIKI-511] feat: inline page comments (#3599)
* feat: page comments

* chore: added node id

* chore: changed reverse relation

* chore: added resolve comment endpoint

* fix: build errors

* fix: basic comment decoration added

* fix: add marks

* fix: operations

* fix: to ditch decorations approach!

* fix: move dev-wiki into apps

* fix: new approach with some more types

* fix: link view container

* fix: editor ee packages updated

* fix: basic threads implementation added

* fix: comments scroll and filtering

* fix scrolling

* chore: added total count for comments

* fix: seperate the comments store

* fix: comments removal

* feat: multi comment on same mark

* fix: mark fixed and styles of comments fixed!

* feat: added better animations

* fix: better styles and animations for comments

* fix: ee seperation

* fix: threads api fix

* fix: new comment store attached

* fix: resolve and delete

* fix: remove framer motion

* fix: add comment ordering

* fix: delete extension

* fix: web

* fix: context aware comments

* fix: new working comment store

* fix: getting changes to web

* fix: ui of comments

* fix: comment mark resolution fixed

* fix: move changes to store

* temp fix: project pages

* fix: comments using lite text editor

* fix: rerendering infinitely

* fix: comment box and reference

* chore: updated the migration file

* fix: move things to ee

* chore: un commented the feature flag logic

* chore: removed an extra line in feature flag

* fix: editor types

* fix: scrolling of thread items

* fix: scrolling of thread items

* fix: type errors

* fix: comment creation

* fix: page comments

* fix: page comments

* fix: remove utils

* fix: added feature flagging

* fix:loading json content

* fix: upload items

* fix: upload items

* fix: ui chanegs

* fix: comment box

* fix: better spacing

* Fix spacing and removing the divs not needed anymore

* fix: comments storing json

* Add comment thread management hooks

* Replace use-new-comment hook with use-scroll-manager

Remove useNewComment hook and related logic. Add useScrollManager hook
for managing scroll behavior in the comments sidebar. Refactor
threads-sidebar to use scroll manager for thread and comment box
navigation. Add cancel button to new comment box.

* Remove hover and click effects for resolved comment marks

* Auto-scroll new comments in sidebar after order sync

Adds highlight and scroll-to behavior for newly created comments.
Sidebar now scrolls to the new thread after comments order updates.

* Add granular page comment permissions and UI checks

Introduce canCurrentUserCommentOnPage permission for pages. Update
comment UI to respect user comment permissions. Refactor comment
creation logic into useNewComment hook. Hide comment/reply UI for users
without permission.

* Refactor comments components and imports for clarity and type safety

* Refactor comments components to use local types and remove unused files

- Move type definitions from shared types file into local components -
Remove unused comment-reactions component and types/index.ts - Update
imports to use local hooks and types - Minor code cleanup and formatting

* Refactor comments feature flag and clean up comments components

- Replace isPageCommentsEnabled with isCommentsEnabled in page stores -
Remove unused types, utils, and reactions components from comments -
Move and rename comments components for consistency - Update editor
flagging to use new comments feature flag logic - Simplify comments
sidebar and thread item structure - Remove redundant exports and props
from comments modules

* Refactor comments extension to use workspace feature flag

- Pass storeType to navigation pane extensions - Check isCommentsEnabled
with workspaceSlug before rendering comments - Update canComment logic
to use canCurrentUserCommentOnPage - Remove console.log and unused code
- Fix types for extension props

* Add canCurrentUserCommentOnPage to TeamspacePage

* Refactor TCommentConfig type and move EditorSideEffects

- Move TCommentConfig to ce/types/editor.ts and ee

* fix: ce sync

* fix: prosemirror-model fixed

* chore: removed the extra migration

* chore: added page comments serializer

* fix: comments

* refactor: comments

* fix: ce/ee seperation

* chore: changed the page serialization

* fix: page comments refactored

* fix: remove ce changes

* fix: restoration for nested pages fixed

* fix: less ce changes

* fix: imports

* fix: better refactoring of page root and editor body

* fix: renaming files

* fix: editor sideeffects

* fix: add comments json field

* fix: page comments types

* fix: lint warnings

* fix: props name change

* fix: props name

* fix: comment mark

* fix: import type

* fix: review changes

* fix: extra checks

* fix: type changes

* fix: remove editor ref current

* fix: renaming

* fix: renaming files

* fix: comments extension revamp

* fix: declaring better types

* fix: better types

* fix: hooks seperated

* fix: edit box

* fix: html validation

* fix: agents md

* fix: naming convention

* fix: update names and service methods

* fix: more fixes

* fix: attributs

* fix: dev wiki sync

---------

Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
2025-09-01 20:56:52 +05:30

106 lines
4.0 KiB
TypeScript

import { Metadata, Viewport } from "next";
import Script from "next/script";
// styles
import "@/styles/globals.css";
import { SITE_DESCRIPTION, SITE_NAME } from "@plane/constants";
// helpers
import { cn } from "@/helpers/common.helper";
// local
import { AppProvider } from "./provider";
export const metadata: Metadata = {
title: "Plane | Simple, extensible, open-source project management tool.",
description: SITE_DESCRIPTION,
metadataBase: new URL("https://app.plane.so"),
openGraph: {
title: "Plane | Simple, extensible, open-source project management tool.",
description: "Open-source project management tool to manage work items, cycles, and product roadmaps easily",
url: "https://app.plane.so/",
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Plane - Modern project management",
},
],
},
keywords:
"software development, plan, ship, software, accelerate, code management, release management, project management, work item tracking, agile, scrum, kanban, collaboration",
twitter: {
site: "@planepowers",
card: "summary_large_image",
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Plane - Modern project management",
},
],
},
};
export const viewport: Viewport = {
minimumScale: 1,
initialScale: 1,
maximumScale: 1,
userScalable: false,
width: "device-width",
viewportFit: "cover",
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
const isSessionRecorderEnabled = parseInt(process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0");
return (
<html lang="en">
<head>
<meta name="theme-color" content="#fff" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest.json" />
<link rel="shortcut icon" href="/favicon/favicon.ico" />
{/* Meta info for PWA */}
<meta name="application-name" content="Plane" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content={SITE_NAME} />
<meta name="format-detection" content="telephone=no" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="/icons/icon-512x512.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/icons/icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/icons/icon-180x180.png" />
<link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512x512.png" />
<link rel="manifest" href="/manifest.json" />
</head>
<body>
<div id="context-menu-portal" />
<div id="editor-portal" />
<AppProvider>
<div
className={cn(
"h-screen w-full overflow-hidden bg-custom-background-100 relative flex flex-col",
"app-container"
)}
>
<main className="w-full h-full overflow-hidden relative">{children}</main>
</div>
</AppProvider>
</body>
{process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN && (
<Script defer data-domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN} src="https://plausible.io/js/script.js" />
)}
{!!isSessionRecorderEnabled && process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY && (
<Script id="clarity-tracking">
{`(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];if(y){y.parentNode.insertBefore(t,y);}
})(window, document, "clarity", "script", "${process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY}");`}
</Script>
)}
</html>
);
}