Hey folks! I'd like to contribute to the Payload repo with a very simple css one-liner change, but I'm a bit of a newbie in the open-source community, and I'm currently struggling to figure out how to build Payload locally to test my changes (the instructions in
contributing.md
aren't really helping in that regard unfortunately).
Any pointers? 👀 🙏
How to build Payload locally and test changes?
Happy to help. Are you running into something specific?
The flow should be something like this:
- Clone payload repo
- yarn
- create new git branch
feat/some-feature
- Make code changes
- Run the code locally and verify changes via one of the test directories ex.
yarn dev fields
would run the code in the
test/fields
directory
- Once verified, make PR
There is some instructions over here too 👌
Oh that's helpful, thanks you two.
- Run the code locally and verify changes via one of the test directories ex. yarn dev fields would run the code in the test/fields directory
This one was the step I was unsure about. But James explanation in that thread you linked Elliot helped clear things out!
Gonna give these at try! 😊 🙏
@denolfe follow up question: if my fix requires a slight change of the test config (in my case, I needed to add one field positioned in the sidebar), what's the process here? Should I commit the changes to the test along with my fix?
Or just mention in details the test I've ran in the pull request but don't commit anything related to test?
If your fixed required a test (an integration(backend) or E2E(UI)) then I would say commit the change. BUT, some fixes, esp css changes do not always require tests so you could just omit the changes you made to the test config.
there may be other collections in the test folder that use a sidebar and you could just boot that config up
and just to throw more resources out there 🙂
https://github.com/payloadcms/payload/blob/master/contributing.mdStar
Discord
online
Get dedicated engineering support directly from the Payload team..