मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)41k · #6841

composing-grid-canvases

यह क्या करती है

यह स्किल ग्रिड कैनवास पर विजेट रखती है, खिसकाती है, आकार बदलती है और उन्हें कॉन्फ़िगर करती है, जिसमें आपका होम कैनवास भी शामिल है। यह उन लोगों के लिए है जो तैयार विजेट से अपना PostHog ओवरव्यू सजाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप अपने होम कैनवास पर कोई विजेट जोड़ना चाहें, जैसे मौसम या कार्य सूची का विजेट।
  • ✓जब आप ग्रिड पर विजेट को दोबारा व्यवस्थित या उनका आकार बदलना चाहें।
  • ✓जब आप एक ही अनुरोध से विजेट का पूरा सेट लगवाना चाहें।

Skill का लिंक

https://github.com/PostHog/posthog/blob/master/products/canvas/skills/composing-grid-canvases/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/PostHog/posthog/blob/master/products/canvas/skills/composing-grid-canvases/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे होम कैनवास पर एक कार्य सूची विजेट जोड़िए और उसे मेरे साइनअप चार्ट के बगल में रखिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI पहले कोई मौजूदा विजेट खोजता है जो फिट बैठे, और संभव हो तो उसे कॉन्फ़िगर करता है। अगर कोई फिट न बैठे, तो वह किसी करीबी विजेट को ढालता है या नया बनाता है, फिर ग्रिड लेआउट अपडेट करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Composing grid canvases

A grid canvas is a composition, not an app: a grid of placements, each rendering a component canvas (a reusable widget with its own source, build, and placement contract). The user's home canvas is an ordinary grid canvas in their personal channel. Layout is data — publishing or patching one is live immediately, with no build.

Three canvas kinds share one lifecycle:

  • freeform — a standalone app (the building-canvases skill owns these).
  • component — a reusable widget. Same source/build pipeline as freeform, plus a placement contract. Visibility rides its channel: personal channel = private, team channel = shared.
  • grid — a layout of placements referencing components. No file source; layout only.

The resolution ladder: configure, fork, build

When a grid placement needs content ("a weather widget here", "a kanban of my tasks"), resolve in this order — placing an existing component beats authoring a duplicate:

  1. Search the store: canvas-list with kind=component and search=<what the widget shows>. A component is placeable when both component_meta and published_build_id are set. If its configSchema can express the request ("weather for Lisbon" → existing weather component with config: {"location": "Lisbon"}), place and configure it — write no code.
  2. Fork when a component is close but its config cannot express the ask: read its source (canvas-source-retrieve), create a new component (canvas-create with kind=component), adapt, publish. Name the difference in the new component's description.
  3. Build new when nothing fits — see "Building a component" below.

New components land in the channel you create them in. Create them in the same channel as the grid they serve unless the user asks to share them more widely.

Building a component

A component is authored exactly like a freeform canvas — load building-react-quill-canvases (or building-html-canvases) plus querying-canvas-data and validating-and-publishing-canvases — with three additions. A component that shows PostHog data follows the same verifiability rule as any canvas: an insight-backed figure links its saved insight, an ad-hoc query exposes the exact query that ran (see "Verifiability" in querying-canvas-data). Start from the complete, buildable project in references/component-example.md; its envelope, placement contract, capability declarations, and defensive ph.state access are the parts that break when improvised.

  • Create with kind=component and a description written for store search: say what the widget shows and what its config controls. Future placements are found by this text.

  • Declare the placement contract in the project's top-level component key:

    {
      "component": {
        "size": { "defaultW": 2, "defaultH": 1, "minW": 1, "minH": 1, "maxW": 4 },
        "configSchema": {
          "type": "object",
          "properties": { "location": { "type": "string", "description": "City to show weather for" } }
        }
      }
    }
    

    Size is in grid units (widths 1–12, heights 1–40); minW <= defaultW <= maxW. The range is advisory: users may resize a placement to any size, so it informs defaults and warnings, never rejections. The config schema vocabulary is an allowlist — type, title, description, default, properties, required, additionalProperties, items, enum, const, minimum, maximum, minLength, maxLength, minItems, maxItems, format. No $ref, no pattern — validation rejects them.

  • Design responsively. Give the component's root min-h-screen so it fills the placement iframe's viewport and grows past it as content demands. Adapt the layout to any size the user drags: a 2×1 placement is a glanceable tile; a 6×4 is a full app surface. Do not use h-screen on the root: a fixed viewport height caps a flex column, so tall children shrink and clip instead of scrolling. Do not use h-full on the root either: a published component's artifact shell gives its html, body, and #root elements no explicit height, so height: 100% collapses to the content height. Render usefully at minW×minH, and treat config as the only per-placement input.

Publish and wait for the build like any canvas — a component with no ready build cannot go live on a grid.

Composing a whole canvas

A whole-canvas ask ("a home canvas that summariz

अक्सर पूछे जाने वाले सवाल

मौजूदा विजेट क्यों दोबारा इस्तेमाल करें?

तैयार विजेट लगाना तेज़ है और डुप्लिकेट से बचाता है, इसलिए स्किल पहले स्टोर देखती है।

क्या लेआउट बदलने के लिए दोबारा बिल्ड चाहिए?

नहीं। लेआउट सेव किया गया डेटा है, इसलिए बदलाव तुरंत दिखते हैं।

मेरा जोड़ा हुआ विजेट कौन देख सकता है?

दृश्यता चैनल के अनुसार चलती है। निजी चैनल के विजेट निजी रहते हैं, और टीम चैनल के विजेट साझा होते हैं।

जानकारी

लेखक का मूल विवरण

Compose PostHog grid canvases — widget grids (including the user's home canvas) built from reusable component canvases. Use when a task asks to add, fill, move, resize, or remove a widget on a grid or home canvas, to compose a whole canvas of widgets from one ask, to build a reusable widget/component, or when a placement id or grid canvas id is the target. Covers the component store search → configure → fork → build ladder, the component placement contract (size, configSchema), the placement lifecycle (pending/generating/live/failed), the guarded layout patch loop, and reading the canvas's com

repo: PostHog/posthog

लोकप्रियता

GitHub स्टार
41k
रैंकिंग में स्थान
#6841
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

depot-ci

41k

यह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-container-builds

41k

यह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-github-runners

41k

यह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

editing-agents-md

41k

यह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।

AI और एजेंटएजेंट

मिलती-जुलती skills