Skip to content
Merged
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Bug report
description: Report a reproducible problem in PDF Elements
title: "[Bug]: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
Thanks for helping improve PDF Elements. Please provide a minimal, reproducible report and do not upload confidential PDFs.

- type: textarea
id: description
attributes:
label: What happened?
description: Describe the problem and what you expected instead.
placeholder: Tell us what you observed and what should have happened.
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: Include the smallest set of steps, code or sample needed to reproduce the issue.
placeholder: |
1. Render PDFElements with...
2. Add an element...
3. Resize...
validations:
required: true

- type: input
id: version
attributes:
label: PDF Elements version
placeholder: e.g. 1.2.7
validations:
required: true

- type: input
id: vue
attributes:
label: Vue version
placeholder: e.g. 3.5.28

- type: input
id: environment
attributes:
label: Browser and operating system
placeholder: e.g. Firefox 143 on Fedora 42

- type: textarea
id: logs
attributes:
label: Console output or screenshots
description: Paste relevant logs or drag screenshots here. Remove secrets and sensitive data.

- type: checkboxes
id: checks
attributes:
label: Before submitting
options:
- label: I searched existing issues for duplicates.
required: true
- label: I removed confidential or sensitive information from the report.
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

blank_issues_enabled: true
contact_links:
- name: Live demo
url: https://libresign.github.io/pdf-elements/
about: Reproduce and explore PDF Elements behavior in the browser.
- name: LibreSign
url: https://github.com/LibreSign/libresign
about: Report issues that belong to the LibreSign application rather than the PDF Elements component.
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Feature request
description: Propose an improvement or new use case for PDF Elements
title: "[Feature]: "
labels:
- enhancement
body:
- type: textarea
id: problem
attributes:
label: What problem would this solve?
description: Describe the user or developer problem before describing the solution.
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Use case
description: Show where this would be useful in a real PDF or document workflow.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: Describe an API, UI or behavior if you already have an approach in mind.

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Include workarounds or alternative approaches you have tried.

- type: checkboxes
id: contribution
attributes:
label: Contribution
options:
- label: I would be interested in working on this change.

- type: checkboxes
id: checks
attributes:
label: Before submitting
options:
- label: I searched existing issues for similar requests.
required: true
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-->

## What does this change?

Describe the problem and the approach used to solve it.

## How was it tested?

List the automated or manual checks you ran.

## Checklist

- [ ] The change is focused on one problem.
- [ ] Tests were added or updated when behavior changed.
- [ ] Documentation was updated when public behavior or APIs changed.
- [ ] `npm run lint`, `npm run typecheck`, `npm run test` and `npm run build` pass when applicable.
- [ ] New source files include SPDX headers.
136 changes: 91 additions & 45 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,113 @@ SPDX-License-Identifier: AGPL-3.0-or-later

# Contributing to @libresign/pdf-elements

Thank you for your interest in contributing to @libresign/pdf-elements! We welcome contributions from the community.
Contributions are welcome. You do not need to work on a large feature to help: bug reports, reproduction cases, documentation, accessibility improvements, tests and focused code changes are all useful.

## Code of Conduct
## Before you start

- Check the [open issues](https://github.com/LibreSign/pdf-elements/issues) to avoid duplicate work.
- For a substantial behavior or API change, open an issue first so the approach can be discussed before implementation.
- Keep pull requests focused on one problem whenever possible.

## Reporting bugs

Use the bug report template and include:

- a clear description of the problem;
- exact steps to reproduce it;
- expected and actual behavior;
- browser and operating-system information when relevant;
- a minimal reproduction or sample PDF when possible;
- screenshots or console output when they help explain the issue.

Please avoid attaching confidential or sensitive documents.

## Suggesting improvements

Feature requests are welcome. Describe the user problem first, then the proposed solution. Concrete use cases make requests easier to evaluate and implement.

Good contributions are not limited to new features. Improvements to documentation, test coverage, accessibility, performance and developer experience are also valuable.

## Development setup

1. Fork the repository.
2. Clone your fork:

This project follows the LibreSign Code of Conduct. By participating, you are expected to uphold this code.
```bash
git clone https://github.com/YOUR-USERNAME/pdf-elements.git
cd pdf-elements
```

## How to Contribute
3. Install dependencies:

### Reporting Bugs
```bash
npm ci
```

Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
4. Start the demo:

* Use a clear and descriptive title
* Describe the exact steps which reproduce the problem
* Provide specific examples to demonstrate the steps
* Describe the behavior you observed after following the steps
* Explain which behavior you expected to see instead and why
* Include screenshots if possible
```bash
npm run dev
```

### Suggesting Enhancements
5. Create a focused branch and make your changes.

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
## Validate your change

* Use a clear and descriptive title
* Provide a detailed description of the suggested enhancement
* Provide examples of how the enhancement would be used
* Explain why this enhancement would be useful
Run the checks relevant to your change before opening a pull request:

### Pull Requests
```bash
npm run lint
npm run typecheck
npm run test
npm run build
```

* Fill in the required template
* Follow the JavaScript/Vue.js style guide
* Include SPDX headers in all new files
* Update the README.md with details of changes if needed
* Update the CHANGELOG.md following Keep a Changelog format
* Ensure all tests pass and linting is clean
For user-interface or browser behavior changes, also run:

## Development Setup
```bash
npm run test:e2e
```

1. Fork the repository
2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/pdf-elements.git`
3. Install dependencies: `npm install`
4. Create a feature branch: `git checkout -b my-feature`
5. Make your changes
6. Run lint: `npm run lint`
7. Build the library: `npm run build:lib`
8. Commit your changes: `git commit -am 'Add some feature'`
9. Push to the branch: `git push origin my-feature`
10. Create a Pull Request
The CI executes linting, type checking, package validation, unit tests and Playwright coverage.

## Coding Standards
## Pull requests

* Use 2 spaces for indentation
* Follow Vue.js style guide
* Add SPDX headers to all source files:
```javascript
// SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
// SPDX-License-Identifier: AGPL-3.0-or-later
A good pull request should:

- explain the problem being solved;
- describe the approach taken;
- include regression coverage for bug fixes when practical;
- update documentation when public behavior changes;
- include SPDX headers in new source files;
- keep unrelated refactors out of the same change.

Use meaningful Conventional Commit-style messages where possible, for example:

```
fix: keep element coordinates after zoom
feat: expose custom page footer slot
docs: add worker configuration example
test: cover cancelled element placement
```

## Coding standards

- Follow the existing Vue and TypeScript conventions in the repository.
- Use the repository ESLint configuration instead of manually formatting around lint rules.
- Add SPDX headers to new source files:

```text
SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
```
* Write meaningful commit messages
* Keep pull requests focused on a single feature or fix

- Prefer small components and focused changes.
- Add or update tests for behavior changes.

## Code of Conduct

This project follows the [LibreSign Code of Conduct](https://github.com/LibreSign/libresign/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to follow it.

## License

Expand Down
Loading
Loading