From 8d71888c6d19701abe9ba76bb5747171e95622e8 Mon Sep 17 00:00:00 2001 From: Cláudio Date: Mon, 8 Feb 2021 18:44:18 -0300 Subject: Commit for #557 - Adding more details - Tip when lint error occur --- webui/Readme.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'webui') diff --git a/webui/Readme.md b/webui/Readme.md index 2ba94b5d..f80caa45 100644 --- a/webui/Readme.md +++ b/webui/Readme.md @@ -2,15 +2,28 @@ ## How to develop -1. Compile the go binary - - run `make` in the **root** directory -2. Run the GraphQL backend on the port 3001 - - `./git-bug webui -p 3001` -3. Run the hot-reloadable development WebUI +### Run GraphQL backend - - run `npm start` in the **webui** directory +1. Download a git-bug stable binary. -The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. +2. Execute git-bug binary inside directory for the git repository it will manage issues: + - git-bug webui -p 3001 + +### Run ReactJS front-end + +1. Clone git-bug repository. + +2. Enter webui directory and install libraries needed: + - npm install + +3. Generate ts code from graphql files and run webui in development mode + - npm start + +3.1. If You got compilation errors from lint, run lint command below and start again: + - npm run lint -- --fix + - npm start + +3.2. The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. ## Bundle the web UI -- cgit From 96d51912c80a0f5145e48c9741838e73db09a248 Mon Sep 17 00:00:00 2001 From: Cláudio Date: Mon, 8 Feb 2021 18:47:00 -0300 Subject: Commit for #557 - Formatting --- webui/Readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'webui') diff --git a/webui/Readme.md b/webui/Readme.md index f80caa45..4883d9db 100644 --- a/webui/Readme.md +++ b/webui/Readme.md @@ -19,11 +19,11 @@ 3. Generate ts code from graphql files and run webui in development mode - npm start -3.1. If You got compilation errors from lint, run lint command below and start again: - - npm run lint -- --fix - - npm start + 1. If You got compilation errors from lint, run lint command below and start again: + - npm run lint -- --fix + - npm start -3.2. The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. + 2. The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. ## Bundle the web UI -- cgit From e47052bd3a02ff6e392c82e3ed3695cf5cf1fa2b Mon Sep 17 00:00:00 2001 From: Cláudio Date: Mon, 8 Feb 2021 18:48:44 -0300 Subject: Commit for #557 - Formatting --- webui/Readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'webui') diff --git a/webui/Readme.md b/webui/Readme.md index 4883d9db..d1420b4f 100644 --- a/webui/Readme.md +++ b/webui/Readme.md @@ -18,12 +18,11 @@ 3. Generate ts code from graphql files and run webui in development mode - npm start - - 1. If You got compilation errors from lint, run lint command below and start again: + - If You got compilation errors from lint, run lint command below and start again: - npm run lint -- --fix - npm start - 2. The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. +The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. ## Bundle the web UI -- cgit From 7829db8850643b6ad2b36f8747d01f66df9024d8 Mon Sep 17 00:00:00 2001 From: Cláudio Date: Mon, 8 Feb 2021 22:58:15 -0300 Subject: Commit for #543 - To test I forced Ifloggedin always return null. - Layout is ok even when edition components are hidden. --- webui/src/components/BugTitleForm/BugTitleForm.tsx | 39 ++++++++++++---------- webui/src/pages/list/ListQuery.tsx | 16 +++++++-- 2 files changed, 35 insertions(+), 20 deletions(-) (limited to 'webui') diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index 16441c93..c47eab31 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -9,6 +9,7 @@ import { } from '@material-ui/core'; import { TimelineDocument } from '../../pages/bug/TimelineQuery.generated'; +import IfLoggedIn from '../IfLoggedIn/IfLoggedIn'; import Author from 'src/components/Author'; import Date from 'src/components/Date'; import { BugFragment } from 'src/pages/bug/Bug.generated'; @@ -156,23 +157,27 @@ function BugTitleForm({ bug }: Props) { {bug.title} {bug.humanId} -
- - -
+ + {() => ( +
+ + +
+ )} +
); } diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx index 424ffac0..87c21e3c 100644 --- a/webui/src/pages/list/ListQuery.tsx +++ b/webui/src/pages/list/ListQuery.tsx @@ -12,6 +12,8 @@ import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft'; import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight'; import Skeleton from '@material-ui/lab/Skeleton'; +import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn'; + import FilterToolbar from './FilterToolbar'; import List from './List'; import { useListBugsQuery } from './ListQuery.generated'; @@ -310,9 +312,17 @@ function ListQuery() { - + + {() => ( + + )} + {content} -- cgit From 3d86c1cc783adf448c38a51a3bcbbdf9621dc70d Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 9 Feb 2021 10:03:26 +0100 Subject: Apply suggestions from code review --- webui/Readme.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'webui') diff --git a/webui/Readme.md b/webui/Readme.md index d1420b4f..50d7afa6 100644 --- a/webui/Readme.md +++ b/webui/Readme.md @@ -4,23 +4,23 @@ ### Run GraphQL backend -1. Download a git-bug stable binary. +1. Download a git-bug stable binary or compile your own by running `make` in the **root** directory: -2. Execute git-bug binary inside directory for the git repository it will manage issues: - - git-bug webui -p 3001 +2. Run the git-bug binary inside your git repository. It will manage issues and start the API: + - `git-bug webui -p 3001` ### Run ReactJS front-end -1. Clone git-bug repository. +1. If you haven't already, clone the git-bug repository: -2. Enter webui directory and install libraries needed: - - npm install +2. Enter the `webui` directory and install the needed libraries: + - `make install` or `npm install` -3. Generate ts code from graphql files and run webui in development mode - - npm start - - If You got compilation errors from lint, run lint command below and start again: - - npm run lint -- --fix - - npm start +3. Generate the TS code from the GrapQL files and run the webui in development mode: + - `make start` or `npm start` + - If you get some lint errors, run the lint command below and start again: + - `make fix-lint` or `npm run lint -- --fix` + - `make start` or `npm start` The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend. -- cgit