From e642da295079f6d17507c6886c503bb8ad14316b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:47:03 +0000 Subject: [PATCH 1/2] Initial plan From 4f6e9c2f0b52800ec978dd18e2e6a3123d9b3744 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:51:58 +0000 Subject: [PATCH 2/2] Add contribution guidelines and GitHub templates - Add CONTRIBUTING.md with comprehensive guidelines - Add bug report issue template (.github/ISSUE_TEMPLATE/bug_report.yml) - Add feature request issue template (.github/ISSUE_TEMPLATE/feature_request.yml) - Add issue template configuration (.github/ISSUE_TEMPLATE/config.yml) - Add pull request template (.github/PULL_REQUEST_TEMPLATE.md) Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 106 +++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 + .github/ISSUE_TEMPLATE/feature_request.yml | 109 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 79 +++++++ CONTRIBUTING.md | 236 +++++++++++++++++++++ 5 files changed, 541 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..bc69f98f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,106 @@ +name: ๐Ÿ› Bug Report +description: Report a bug or unexpected behavior in Chartifact +title: "[Bug]: " +labels: ["bug", "needs-triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report a bug! Please fill out this form as completely as possible. + + - type: textarea + id: description + attributes: + label: Description + description: A clear and concise description of what the bug is. + placeholder: What went wrong? + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Detailed steps to reproduce the behavior. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: Describe what you expected to happen + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + placeholder: Describe what actually happened + validations: + required: true + + - type: textarea + id: document + attributes: + label: Sample Document (if applicable) + description: If the bug relates to a specific document, please provide a minimal example (JSON or Markdown) + placeholder: Paste your .idoc.json or .idoc.md content here + render: json + + - type: textarea + id: environment + attributes: + label: Environment + description: Please provide information about your environment + value: | + - OS: [e.g., Windows 11, macOS 14, Ubuntu 22.04] + - Browser: [e.g., Chrome 120, Firefox 121, Safari 17] + - Node.js version: [e.g., 20.10.0] + - Chartifact version: [e.g., 1.0.0] + - VS Code version (if applicable): [e.g., 1.85.0] + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: Screenshots or Screen Recording + description: If applicable, add screenshots or a screen recording to help explain the problem + placeholder: Drag and drop images or paste links here + + - type: textarea + id: logs + attributes: + label: Console Logs or Error Messages + description: Please include any relevant console logs or error messages + placeholder: Paste console output here + render: shell + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context about the problem here + placeholder: Any additional information that might be helpful + + - type: checkboxes + id: checklist + attributes: + label: Pre-submission Checklist + description: Please verify the following before submitting + options: + - label: I have searched for existing issues to avoid duplicates + required: true + - label: I have provided all the required information above + required: true + - label: I can reproduce this issue consistently + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..d483556d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: ๐Ÿ’ฌ Discussions + url: https://github.com/microsoft/chartifact/discussions + about: Ask questions, share ideas, and engage with the community + - name: ๐Ÿ“– Documentation + url: https://microsoft.github.io/chartifact/ + about: Browse the official Chartifact documentation and examples + - name: ๐Ÿ”’ Security Vulnerability + url: https://github.com/microsoft/chartifact/security/advisories/new + about: Report security vulnerabilities privately (do not use public issues) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..b84f3fca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,109 @@ +name: โœจ Feature Request +description: Suggest a new feature or enhancement for Chartifact +title: "[Feature]: " +labels: ["enhancement", "needs-triage"] +body: + - type: markdown + attributes: + value: | + Thanks for suggesting a new feature! Please provide as much detail as possible to help us understand your request. + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: Is your feature request related to a problem? Please describe the problem you're trying to solve. + placeholder: I'm always frustrated when... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: Describe the solution you'd like to see + placeholder: A clear and concise description of what you want to happen + validations: + required: true + + - type: dropdown + id: component + attributes: + label: Component Area + description: Which component or area of Chartifact does this relate to? + options: + - Document Schema + - Runtime/Sandbox + - VS Code Extension + - Web Viewer/Editor + - Text/Markdown + - Charts (Vega/Vega-Lite) + - Tables (Tabulator) + - Inputs (Forms) + - Diagrams (Mermaid) + - Images + - Presets + - Data Sources/REST + - CSS/Styling + - Documentation + - Examples + - Build/Tooling + - Other + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Describe any alternative solutions or features you've considered + placeholder: What other approaches have you thought about? + + - type: textarea + id: examples + attributes: + label: Examples or Use Cases + description: Provide examples of how this feature would be used + placeholder: | + Example 1: ... + Example 2: ... + + - type: textarea + id: mockup + attributes: + label: Mockups or Design Ideas + description: If applicable, add mockups, wireframes, or code examples + placeholder: Drag and drop images or paste code snippets here + + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - Nice to have + - Would improve my workflow + - Important for my use case + - Blocking my use of Chartifact + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context, screenshots, or references about the feature request + placeholder: Links to similar features in other tools, research, etc. + + - type: checkboxes + id: checklist + attributes: + label: Pre-submission Checklist + description: Please verify the following before submitting + options: + - label: I have searched for existing feature requests to avoid duplicates + required: true + - label: I have provided a clear description of the problem and solution + required: true + - label: This feature aligns with Chartifact's goals as a declarative, interactive document format + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e2184e5a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,79 @@ +## Description + + + +## Related Issues + + + +Fixes # + +## Type of Change + + + +- [ ] ๐Ÿ› Bug fix (non-breaking change which fixes an issue) +- [ ] โœจ New feature (non-breaking change which adds functionality) +- [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] ๐Ÿ“ Documentation update +- [ ] โ™ป๏ธ Code refactoring (no functional changes) +- [ ] ๐ŸŽจ Style/formatting changes +- [ ] ๐Ÿงช Test additions or updates +- [ ] ๐Ÿ”ง Build/tooling changes + +## Changes Made + + + +- +- +- + +## Testing + + + +- [ ] I have tested these changes locally +- [ ] All existing tests pass +- [ ] I have added new tests (if applicable) +- [ ] I have manually verified the changes work as expected + +### Test Details + + + +## Screenshots/Recordings + + + +## Documentation + +- [ ] I have updated the documentation (if applicable) +- [ ] I have updated examples (if applicable) +- [ ] Code comments are clear and helpful + +## Checklist + + + +- [ ] My code follows the project's coding guidelines +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] My changes generate no new warnings or errors +- [ ] I have checked for security issues in my changes +- [ ] I have not committed secrets, credentials, or sensitive data +- [ ] I have kept changes minimal and focused on the issue being addressed +- [ ] I have updated CONTRIBUTING.md if I added new development workflows + +## Additional Context + + + +## For Maintainers + + + +- [ ] Code review completed +- [ ] All CI checks passing +- [ ] Documentation reviewed +- [ ] Ready to merge diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..41aa6c8a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,236 @@ +# Contributing to Chartifact + +Thank you for your interest in contributing to Chartifact! This document provides guidelines and information to help you contribute effectively. + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [How to Contribute](#how-to-contribute) +- [Development Workflow](#development-workflow) +- [Coding Guidelines](#coding-guidelines) +- [Submitting Changes](#submitting-changes) +- [Reporting Issues](#reporting-issues) +- [Community](#community) + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Getting Started + +### Prerequisites + +- Node.js (latest LTS version recommended) +- npm (comes with Node.js) +- Git +- A code editor (VS Code is recommended for the best development experience) + +### Setting Up Your Development Environment + +1. **Fork the repository** on GitHub +2. **Clone your fork** locally: + ```bash + git clone https://github.com/YOUR_USERNAME/chartifact.git + cd chartifact + ``` +3. **Add the upstream remote**: + ```bash + git remote add upstream https://github.com/microsoft/chartifact.git + ``` +4. **Install dependencies**: + ```bash + npm install + ``` +5. **Build the project**: + ```bash + npm run build + ``` + +### Project Structure + +Chartifact uses a monorepo structure with multiple packages: + +- `packages/` - Core packages and components +- `docs/` - Documentation and website content +- `.github/` - GitHub configuration and workflows + +## How to Contribute + +We welcome contributions in many forms: + +- ๐Ÿ› **Bug fixes** - Help us squash bugs +- โœจ **New features** - Add new capabilities to Chartifact +- ๐Ÿ“ **Documentation** - Improve our docs, add examples +- ๐ŸŽจ **Examples** - Create new example documents +- ๐Ÿงช **Tests** - Improve test coverage +- ๐Ÿ’ก **Ideas** - Share your ideas in discussions or issues + +## Development Workflow + +### Creating a Branch + +Create a new branch for your work: + +```bash +git checkout -b feature/your-feature-name +# or +git checkout -b fix/your-bug-fix +``` + +### Making Changes + +1. Make your changes in your branch +2. Follow the [coding guidelines](#coding-guidelines) +3. Test your changes thoroughly +4. Commit your changes with clear, descriptive commit messages + +### Testing Your Changes + +Before submitting your changes: + +1. Ensure all existing tests pass +2. Add new tests for new functionality +3. Test your changes manually if applicable +4. Verify that the build completes successfully + +### Keeping Your Fork Updated + +Regularly sync your fork with the upstream repository: + +```bash +git fetch upstream +git checkout main +git merge upstream/main +git push origin main +``` + +## Coding Guidelines + +### General Principles + +- Write clear, readable code +- Follow existing code style and patterns +- Add comments for complex logic +- Keep functions small and focused +- Use meaningful variable and function names + +### TypeScript Guidelines + +- Use TypeScript for type safety +- Define proper interfaces and types +- Avoid using `any` when possible +- Document public APIs with JSDoc comments + +### Documentation + +- Update documentation when adding or changing features +- Include examples for new features +- Keep the README.md up to date +- Add inline comments for complex code + +### Security + +- **Never commit secrets or credentials** +- Follow secure coding practices +- Report security vulnerabilities privately (see [SECURITY.md](SECURITY.md)) +- Sanitize user inputs appropriately + +### Examples + +When creating examples in `packages/web-deploy/json/`: + +- Use JSON format for examples +- Validate against the schema in `docs/schema/idoc_v1.d.ts` +- Do not use HTML elements (Markdown only) +- Test examples in the viewer before submitting +- Follow existing example patterns and structure + +## Submitting Changes + +### Pull Request Process + +1. **Ensure your code is ready**: + - All tests pass + - Code follows style guidelines + - Documentation is updated + - Commits are clean and descriptive + +2. **Create a pull request**: + - Push your branch to your fork + - Open a pull request against the `main` branch + - Fill out the pull request template completely + - Link any related issues + +3. **Code review**: + - Address reviewer feedback promptly + - Make requested changes in new commits + - Keep the conversation professional and constructive + +4. **After approval**: + - A maintainer will merge your pull request + - Your branch will be deleted automatically + +### Commit Message Guidelines + +Write clear, concise commit messages: + +``` +Short summary (50 characters or less) + +More detailed explanation if needed. Wrap at 72 characters. +Explain what and why, not how. + +Fixes #123 +``` + +### Pull Request Title + +Use a descriptive title that summarizes the change: + +- โœจ `Add support for custom chart colors` +- ๐Ÿ› `Fix dropdown selection bug in tables` +- ๐Ÿ“ `Update installation documentation` +- โ™ป๏ธ `Refactor variable binding logic` + +## Reporting Issues + +### Before Creating an Issue + +- Check if the issue already exists +- Verify the issue is reproducible +- Gather relevant information (version, environment, steps to reproduce) + +### Creating a Good Issue + +Use the appropriate issue template and provide: + +- Clear, descriptive title +- Detailed description of the problem or feature +- Steps to reproduce (for bugs) +- Expected vs. actual behavior (for bugs) +- Screenshots or examples if applicable +- Your environment details (OS, Node version, etc.) + +## Community + +### Getting Help + +- ๐Ÿ“– Read the [documentation](https://microsoft.github.io/chartifact/) +- ๐Ÿ’ฌ Start a [discussion](https://github.com/microsoft/chartifact/discussions) +- ๐Ÿ› Check existing [issues](https://github.com/microsoft/chartifact/issues) + +### Communication Guidelines + +- Be respectful and inclusive +- Stay on topic +- Help others when you can +- Follow the [Code of Conduct](https://opensource.microsoft.com/codeofconduct/) + +## License + +By contributing to Chartifact, you agree that your contributions will be licensed under the [MIT License](LICENSE). + +--- + +Thank you for contributing to Chartifact! ๐ŸŽ‰