9 KiB
Contributing to SVGLayoutDesigner
First off, thank you for contributing to the project. You will be able to navigate through this document with the table of contents.
Table of contents
- Contributing to SVGLayoutDesigner
- Table of contents
- I want to contribute
- I want to report a bug
- I want to suggest enhancements
I want to contribute
- Assign a
work item
in Azure DevOps to yourself and set it toWork-in-progress
- There are two main projects: the back-end API SVGLDLibs in .NETFramework and, the front-end SVGLD in Vite.
I want to contribute to the .NETFramework API
Getting Started
Requirements:
Windows
>= 10.xMSBuildTools
>= 2017.x orVisual Studio
>= 2017.xdotnet
>= 6.x
Anything below is not officially supported.
Before developing
- Make sure you have an existing work item
- Create a new branch for the new API
- Push the branch
- Create a pull request
- Link the work item to the pull request
Testing
SVGLDLibs is a set of models and does not run anything. Any API must be build from scratch by the end-user.
In order to test the models, the project SVGLDWebAPI was created.
- Make sure the dll is compiling with
pnpm build:dotnet
- Update SVGLDWebAPI with new or updated models
- After that run
pnpm test:full
Releasing
When the tests are valids and the feature is ready to deploy, please update the version by following the versioning method in RELEASING.md.
Updating the API is usually a breaking change, so most of the time, the major version will change. So please, create a release candidate branch (or tag if merged on master).
I want to contribute to the React component
Getting Started
If you are new to React and Node.js, please install these tools:
- A chromium-based browser (
chromium
,chrome
,edge
,brave
,vivaldi
). - VSCode
- pnpm
- React DevTools
- Typescript React code snippets
- vscode-tailwindcss
- vscode-eslint
- vscode-drawio
Before developing
- Make sure you have an existing work item
- Create a new branch for the new feature
- Push the branch
- Create a pull request
- Link the work item to the pull request
- Copy the
.env.development
to.env.development.local
- Update
.env.development.local
urls to the test serverhttp://localhost:5000
orhttps://localhost/SmartMenuiserieTemplate
CORS
If you are getting CORS or HTTPS related error, please access the test server with your browser to allow the access to the unsecure website.
Develop with Vite and pnpm
Install the dependencies :
pnpm i
Then run the following command to run the projet in a dev environment:
pnpm dev
Develop with mprocs
Mprocs runs multiple commands in parallel and shows output of each command separately.
It is useful to run vite
and the test server at the same time with mprocs
.
Run pnpm d
or pnpm mprocs
to run mprocs.
Testing the external API without .NETFramework or Windows
Use the Node.js server in /test-server
to simulate the api.
node run ./test-server/http.js
The web server will be running at http://localhost:5000
Setup debugging with chrome
Inside .vscode/settings.json
, set the following :
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}",
}
]
}
Change the url
to the dev server url. Additionally, set the runtimeExecutable
to your favorite chromium browser.
Testing
Run pnpm test
to test.
Releasing
When the tests are valids and the feature is ready to deploy, please update the version by following the versioning method in RELEASING.md.
I want to report a bug
Before submitting a bug report
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the last version for both the project
svg-layout-designer
and the APISVGLDLibs
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
- Determine if your bug is really a bug and not an error on your side e.g. e.g. using incompatible environment components/versions.
- Make sure you have read the documentation.
- Make sure the issue is not already duplicated or solved in the issue list
- Make sure to search the internet
Collect the information about the bug:
- Stack trace
- OS, Platform and Version (
Windows
,Linux
,macOS
,x86
,arm
) - Browser and version (
Chrome
,Chromium
,Firefox
and any chromium and gecko based browsers)
How do i submit a good bug report?
You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to enguyen@techform.fr.
- Open an Issue
- Explain the behavior you would expect and the actual behavior
- Please provide as much context as possible and describe the reproduction steps that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will assign the bug accordingly
- If the team is not able to reproduce the issue, more information will be asked
- If the team is able to reproduce the issue, it will be marked
TODO
I want to suggest enhancements
Before submitting an enhancement
- Make sure you are using the latest version
- Read the documentation carefully and find out if the functionality is already covered, maybe by an individual configuration.
How do i submit a good enhancement suggestion?
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Describe the current behavior and explain which behavior you expected to see instead and why. At this point you can also tell which alternatives do not work for you.
- You may want to include screenshots and animated GIFs which help you demonstrate the steps or point out the part which the suggestion is related to
- Explain why this enhancement would be useful to most users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- Use Azure DevOps to add the new feature request under the epic.