You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2023/11/16 07:19:13 UTC

(incubator-answer-website) branch build-community updated (2c809877 -> b4845cd2)

This is an automated email from the ASF dual-hosted git repository.

shuai pushed a change to branch build-community
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git


    from 2c809877 docs: separate PR page, add CODE OF CONDUCT, Licensing and CLA
     new 2f97ad0d docs: add frontend development
     new b4845cd2 docs: add frontend development

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 community/contributing/contributing.md | 27 +++++++++++++++++++++++++++
 community/contributing/frontend.md     |  4 ++--
 2 files changed, 29 insertions(+), 2 deletions(-)


(incubator-answer-website) 01/02: docs: add frontend development

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch build-community
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git

commit 2f97ad0dea0a90e1d8d47c7aacc9cb18e103a325
Author: shuai <li...@sifou.com>
AuthorDate: Thu Nov 16 15:16:29 2023 +0800

    docs: add frontend development
---
 community/contributing/contributing.md | 29 +++++++++++++++++++++++++++++
 community/contributing/frontend.md     |  4 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/community/contributing/contributing.md b/community/contributing/contributing.md
index b6c0a9a7..b392a963 100644
--- a/community/contributing/contributing.md
+++ b/community/contributing/contributing.md
@@ -49,3 +49,32 @@ The subject contains a succinct description of the change:
 - entire length of the commit message must not go over 50 characters
 - describe what the commit does, not what issue it relates to or fixes
 - be brief, yet descriptive - we should have a good understanding of what the commit does by reading the subject
+
+## Development
+
+### Backend
+
+#### Installation
+
+#### Code Conventions
+
+### Frontend
+
+#### Installation
+
+1. Ensure you have [node](https://nodejs.org/en) and [pnpm](https://pnpm.io/installation) installed.
+2. After cloning the repository, run the following command. This will install all dependencies as well as build all local packages.
+```
+cd ./ui
+pnpm install
+```
+3. To start a development server, run `pnpm start`. now, your browser should already open automatically, and autoload `http://localhost:3000`. you can also manually visit it.
+4. To switch API, you can modify the `ui/.env.development` file and then re-run pnpm start. If you're just using it yourself, we recommend creating a `.env.development.local` file that defines the address of the api you're going to use.
+
+#### Code Conventions
+
+- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc.
+- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, you can run  `pnpm lint` and `pnpm prettier` to fix most code formatting.
+- **No runtime errors** Before submitting the code, please ensure that there will be no errors when running locally. This will greatly reduce the workload of review.
+
+
diff --git a/community/contributing/frontend.md b/community/contributing/frontend.md
index 0810d319..2f5b8537 100644
--- a/community/contributing/frontend.md
+++ b/community/contributing/frontend.md
@@ -104,8 +104,8 @@ All our translations are placed in the i18n directory.
 ## 📱Environment Support
 
 | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/ [...]
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- [...]
-| last 2 versions                                                                                                                                                                                          | last 2 versions                                                                                                                                                                                                  | last 2 versions                                                              [...]
+|-------------|-------------|-------------|-------------|
+| last 2 versions | last 2 versions | last 2 versions | last 2 versions |
 
 ## ⭐ Built with
 - [TypeScript](https://www.typescriptlang.org/) - Strongly typed JavaScript


(incubator-answer-website) 02/02: docs: add frontend development

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch build-community
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git

commit b4845cd237683ba59081305f44be8f92622dbbce
Merge: 2f97ad0d 2c809877
Author: shuai <li...@sifou.com>
AuthorDate: Thu Nov 16 15:18:57 2023 +0800

    docs: add frontend development

 community/contributing/contributing.md | 50 ++++++-----------------
 community/contributing/pull-request.md | 72 ++++++++++++++++++++++++++++++++++
 sidebarsCommunity.js                   |  1 +
 3 files changed, 85 insertions(+), 38 deletions(-)

diff --cc community/contributing/contributing.md
index b392a963,0066cfd1..7acfc315
--- a/community/contributing/contributing.md
+++ b/community/contributing/contributing.md
@@@ -6,75 -6,22 +6,49 @@@ slug: /contributin
  
  > Thanks for your interest in contributing to Answer!
  
- ## How to Contribute
+ ## Code of Conduct
  
- > You can contribute directly to the github repo by submitting your PR.
+ Answer has adopted a Code of Conduct that we expect project participants to adhere to. Please read the [full text](https://www.apache.org/foundation/policies/conduct.html) so that you can understand what actions will and will not be tolerated.
  
- ## Creating an Issue
+ ## Get Innolved
  
- - Feel free to ask your questions if you have any.
- 
- ## Creating a Pull Request
- 
- - We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please create an issue that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
- 
- ## Commit Message Guidelines
- 
- ```
- <type>(<scope>): <subject>
- ```
+ There are many ways to contribute to Answer, and many of them do not involve writing any code. Here's a few ideas to get started:
  
- ### type
+ - Simply start using Answer. Go through the [Getting Started](/docs/installation) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#).
+ - Look through the [open issues](https://github.com/apache/incubator-answer/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#).
+ - If you find an issue you would like to fix, [open a pull request](#). Issues tagged as [Good first issue](https://github.com/apache/incubator-answer/labels/good%20first%20issue) are a good place to get started.
+ - Read through the [Answer docs](/docs). If you find anything that is confusing or can be improved, you can click "Edit this page" at the bottom of most docs, which takes you to the GitHub interface to make and propose changes.
+ - Take a look at the [features requested](https://github.com/apache/incubator-answer/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on.
  
- - feat: A new feature
- - fix: A bug fix
- - docs: Documentation only changes
- - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- - refactor: A code change that neither fixes a bug nor adds a feature
- - perf: A code change that improves performance
- - test: Adding missing tests
- - chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
+ Contributions are very welcome. If you think you need help planning your contribution, please ping us on Twitter at [@answerdev](https://twitter.com/answerdev) and let us know you are looking for a bit of help.
  
- ### scope
+ ### Creating an Issue
  
- The scope can be anything specifying place of the commit change.
- 
- ### subject
- 
- The subject contains a succinct description of the change:
- 
- - use the imperative, present tense: "change" not "changed" nor "changes"
- - do not capitalize first letter
- - do not place a period . at the end
- - entire length of the commit message must not go over 50 characters
- - describe what the commit does, not what issue it relates to or fixes
- - be brief, yet descriptive - we should have a good understanding of what the commit does by reading the subject
+ - Feel free to ask your questions if you have any.
 +
 +## Development
 +
 +### Backend
 +
 +#### Installation
 +
 +#### Code Conventions
 +
 +### Frontend
 +
 +#### Installation
 +
 +1. Ensure you have [node](https://nodejs.org/en) and [pnpm](https://pnpm.io/installation) installed.
 +2. After cloning the repository, run the following command. This will install all dependencies as well as build all local packages.
 +```
 +cd ./ui
 +pnpm install
 +```
 +3. To start a development server, run `pnpm start`. now, your browser should already open automatically, and autoload `http://localhost:3000`. you can also manually visit it.
 +4. To switch API, you can modify the `ui/.env.development` file and then re-run pnpm start. If you're just using it yourself, we recommend creating a `.env.development.local` file that defines the address of the api you're going to use.
 +
 +#### Code Conventions
 +
 +- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc.
 +- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, you can run  `pnpm lint` and `pnpm prettier` to fix most code formatting.
 +- **No runtime errors** Before submitting the code, please ensure that there will be no errors when running locally. This will greatly reduce the workload of review.
- 
-