From 55548e09340c7ab62528d3e21400028e5aae9867 Mon Sep 17 00:00:00 2001 From: Sarfraz Alam Date: Sun, 15 Oct 2023 10:54:51 +0530 Subject: [PATCH] Merge with master --- CONTRIBUTING.md | 24 +- src/components/Dashboard/index.jsx | 279 +++++++++--------- .../NavBar/new/MainNavbar/RightMenu.jsx | 4 +- .../Tutorials/subComps/AddNewStep.jsx | 3 +- .../Tutorials/subComps/TutorialTitle.jsx | 46 +-- 5 files changed, 182 insertions(+), 174 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5598a44..43f4cd50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,47 +89,49 @@ You should fill in these values in their relevant fields in the `.env` file. ### Firebase Emulator Setup - 1. Refer this site [https://firebase.google.com/docs/emulator-suite/install_and_configure] 2. Make sure you have the correct jdk version installed 3. Make sure you are in the parent directory -4. Now lets connect your local firebase to cloub by running command (```firebase login```) +4. Now lets connect your local firebase to cloub by running command (`firebase login`) 5. Then authenticate your firebase using browser and set the selected web app for codelabz -6. Then run the command (```firebase init```) +6. Then run the command (`firebase init`) 7. Select all the emulator necessitites by pressing a or selecting them manually and pressing space 8. Answer the commands 9. Lets set up your credentials of test data 10. Run your firebase emulator by running the following command. -``` shell +```shell make emulator ``` 11. If make command isn't installed then run command -``` shell + +```shell firebase emulators:start --import=testdata ``` - 12. If you want to start without any testdata , use the following command -``` shell + +```shell make emulator ``` 14.If make command isn't installed then run -``` shell + +```shell firebase emulator:start ``` - You will observe 3 terminals opening + +You will observe 3 terminals opening ### Run Firebase Emulator Run your firebase emulator by running the following command. -``` shell +```shell make emulator-import ``` @@ -137,7 +139,7 @@ This will run the emulator with the `testdata`. Check out [TESTDATA.md](./TESTDA if you don't want to import testdata, run -``` +``` make emulator ``` diff --git a/src/components/Dashboard/index.jsx b/src/components/Dashboard/index.jsx index f3a286b4..072dfb21 100644 --- a/src/components/Dashboard/index.jsx +++ b/src/components/Dashboard/index.jsx @@ -333,144 +333,147 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { - - onChangeName(event.target.value)} - helperText={ - nameValidateError ? nameValidateErrorMessage : null - } - fullWidth - autoComplete="handle" - required - style={{ marginBottom: "15px" }} - InputProps={{ - "data-testid": "userName", - startAdornment: ( - - - - ), - }} - /> - onChangeHandle(event.target.value)} - helperText={ - handleValidateError ? handleValidateErrorMessage : null - } - fullWidth - autoComplete="handle" - required - onFocus={onFocusHandle} - style={{ marginBottom: "15px" }} - InputProps={{ - "data-testid":"userHandle", - startAdornment: ( - - - - ), - }} - /> -
- { - setCountry(e.target.value); - setCountrySearch(e.target.value); - }} - onFocus={() => { - setCountrySearch(country); - onFocusHandle(); - }} - fullWidth - autoComplete="country" - required - style={{ marginBottom: "15px" }} - InputProps={{ - "data-testid":"userCountry", - startAdornment: ( - - - - ), - }} - /> -
- {filteredData.length !== 0 && ( -
- {filteredData.map((item) => { - return ( -
{ - setCountry(item.name); - setCountrySearch(""); - }} - style={{ color: textColor }}> - {item.name} -
- ); - })} -
- )} -
-
-
- - - - - - - {/* col-pad-24 pr-12 pt-8 pb-24 div-transition */} - setFocusLeft(false)} - item={true}> - {showOrgForm && ( - - - - -

- Organization Details -

-
-
-
+ + onChangeName(event.target.value)} + helperText={ + nameValidateError ? nameValidateErrorMessage : null + } + fullWidth + autoComplete="handle" + required + style={{ marginBottom: "15px" }} + InputProps={{ + "data-testid": "userName", + startAdornment: ( + + + + ) + }} + /> + onChangeHandle(event.target.value)} + helperText={ + handleValidateError ? handleValidateErrorMessage : null + } + fullWidth + autoComplete="handle" + required + onFocus={onFocusHandle} + style={{ marginBottom: "15px" }} + InputProps={{ + "data-testid": "userHandle", + startAdornment: ( + + + + ) + }} + /> +
+ { + setCountry(e.target.value); + setCountrySearch(e.target.value); + }} + onFocus={() => { + setCountrySearch(country); + onFocusHandle(); + }} + fullWidth + autoComplete="country" + required + style={{ marginBottom: "15px" }} + InputProps={{ + "data-testid": "userCountry", + startAdornment: ( + + + + ) + }} + /> +
+ {filteredData.length !== 0 && ( +
+ {filteredData.map(item => { + return ( +
{ + setCountry(item.name); + setCountrySearch(""); + }} + style={{ color: textColor }} + > + {item.name} +
+ ); + })} +
+ )} +
+
+
+ + + + +
+
+ {/* col-pad-24 pr-12 pt-8 pb-24 div-transition */} + setFocusLeft(false)} + item={true} + > + {showOrgForm && ( + + + + +

+ Organization Details +

+
+
+
diff --git a/src/components/NavBar/new/MainNavbar/RightMenu.jsx b/src/components/NavBar/new/MainNavbar/RightMenu.jsx index dd37606e..ea6b6bcf 100644 --- a/src/components/NavBar/new/MainNavbar/RightMenu.jsx +++ b/src/components/NavBar/new/MainNavbar/RightMenu.jsx @@ -246,7 +246,7 @@ const RightMenu = ({ mode, onClick }) => { : "#3AAFA9", marginLeft: "1rem", marginBottom: ".2rem", - cursor:"pointer", + cursor: "pointer" }} size={mode === "inline" ? "default" : "medium"} src={profile.photoURL} @@ -261,7 +261,7 @@ const RightMenu = ({ mode, onClick }) => { data-testId="nav-user" > {acronym} - + - {Fullscreen ? - - : - - } + {Fullscreen ? ( + + + + ) : ( + + + + )} )}