Skip to content

Commit

Permalink
Added archive snap images, locking face filter lib to exact version, …
Browse files Browse the repository at this point in the history
…misc tweeks
  • Loading branch information
TowhidKashem committed Jul 5, 2020
1 parent 4ae78b6 commit 24410e3
Show file tree
Hide file tree
Showing 20 changed files with 99 additions and 218 deletions.
14 changes: 0 additions & 14 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@

dog and other filters not working suddenly

nice hardcoded chat messages / increase dummy responses

----

write end to end cypress tests

cross browser compatability / mobile
check browser stack
npm i on windows


archived snaps from prev months

lock down jeeliz git repo to exact version

const [profiles, setProfiles] = useState<any[]>([]);

--

Last:

renew all api keys in commits
make sure pwa manifest related things are being picked up once depoyed!
remove yarn lock files and keep only npm ones

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"test": "react-scripts test",
"e2e": "cypress open",
"eject": "react-scripts eject",
"postinstall": "cd public/filters && npm i && git clone [email protected]:jeeliz/jeelizFaceFilter.git && npm run gulp",
"postinstall": "cd public/filters && npm i && git clone [email protected]:jeeliz/jeelizFaceFilter.git && cd jeelizFaceFilter && git reset --hard bd3cdcd0ca01ced09d836c55af82c36047d82dac && cd .. && npm run gulp",
"cleanup": "rm -rf node_modules && cd public/filters && rm -rf node_modules jeelizFaceFilter build",
"precommit": "pretty-quick --staged && react-scripts test --watchAll=false",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"serve": "serve -s build",
"cleanup": "rm -rf node_modules && cd public/filters && rm -rf node_modules && rm -rf jeelizFaceFilter && rm -rf build"
"serve": "serve -s build"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
60 changes: 51 additions & 9 deletions public/api/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,64 @@
"thread": "Lisa",
"messages": [
{
"id": 1,
"id": "9a8fcb4b-f820-4a9b-a736-a6c7297c39e0",
"author": "Lisa",
"message": "Hey there2!",
"time": 1593057824382
"message": "Hey girl))",
"time": 1593915027272
},
{
"id": 2,
"id": "9fd0a280-02c0-4510-b768-b40e9fd9ef4a",
"author": "Lisa",
"message": "Oh wow",
"time": 1593057832262
"message": "How you been?",
"time": 1593915032403
},
{
"id": 3,
"id": "58377272-7014-4fb3-9aad-fb9cd1cb84ca",
"author": "Julia",
"message": "Hi",
"time": 1593057839073
"message": "Oh hey Lisa!!",
"time": 1593915038980
},
{
"id": "4e8bfb1f-f087-4bf1-a577-c3b83f82a811",
"author": "Julia",
"message": "I've been good, about to go to that restaurant you recomended",
"time": 1593915044855
},
{
"id": "85298dde-d272-4937-8507-fe847e5bbcc5",
"author": "Lisa",
"message": "OMG what dish are you gonna try?? 😋🍽",
"time": 1593915051122
},
{
"id": "8c75c657-172b-4185-aca7-7b6d9ef2a12b",
"author": "Julia",
"message": "The chicken parmesan of course 💁🏻‍♀️",
"time": 1593915058801
},
{
"id": "e476f51f-e72e-4922-a400-00c9eea758f0",
"author": "Lisa",
"message": "HAHAHAHAHAHA",
"time": 1593915064982
},
{
"id": "4960dbac-b86d-4604-afb6-bdc1ba6bc006",
"author": "Lisa",
"message": "You and that chicken parmesan, you know other food exists right??",
"time": 1593915071585
},
{
"id": "a2b99907-9dc0-4fa5-8e58-3a7f9acc1a5b",
"author": "Julia",
"message": "Not to me it doesn't!!!",
"time": 1593915076911
},
{
"id": "ea6891d3-dfe8-4062-a095-21d3fe1b7b1d",
"author": "Julia",
"message": "Gotta go girl, later))",
"time": 1593915083382
}
]
}
16 changes: 9 additions & 7 deletions public/api/photos.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"photos": [
{
"month": "June",
"year": 2020,
"images": ["./images/selfies/6.jpg"]
},
{
"month": "March",
"year": 2020,
"images": [
"https://www.refinery29.com/file/11154/intro-hero-mobile-v2.jpg",
"https://www.refinery29.com/file/11154/intro-hero-mobile-v2.jpg"
]
"images": ["./images/selfies/5.jpg", "./images/selfies/4.jpg"]
},
{
"month": "January",
"year": 2020,
"images": [
"https://www.refinery29.com/file/11154/intro-hero-mobile-v2.jpg",
"https://www.refinery29.com/file/11154/intro-hero-mobile-v2.jpg",
"https://www.refinery29.com/file/11154/intro-hero-mobile-v2.jpg"
"./images/selfies/3.jpg",
"./images/selfies/2.jpg",
"./images/selfies/1.jpg"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion public/filters/src/bees.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Filters.bees = {
Filters.bees.GLASSESOBJ3D.scale.multiplyScalar(1.1);
Filters.bees.GLASSESOBJ3D.position.setY(0.05);
Filters.bees.GLASSESOBJ3D.position.setZ(0.25);
addDragEventListener(Filters.bees.GLASSESOBJ3D);
// addDragEventListener(Filters.bees.GLASSESOBJ3D);
threeStuffs.faceObject.add(Filters.bees.GLASSESOBJ3D);
};
const beeLoader = new THREE.JSONLoader();
Expand Down
2 changes: 1 addition & 1 deletion public/filters/src/dog.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Filters.dog = {
Filters.dog.DOGOBJ3D.add(Filters.dog.EARMESH);
Filters.dog.DOGOBJ3D.add(Filters.dog.NOSEMESH);
Filters.dog.DOGOBJ3D.add(Filters.dog.TONGUEMESH);
addDragEventListener(Filters.dog.DOGOBJ3D);
// addDragEventListener(Filters.dog.DOGOBJ3D);
threeStuffs.faceObject.add(Filters.dog.DOGOBJ3D);
Filters.dog.ISLOADED = true;
};
Expand Down
Binary file added public/images/selfies/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/selfies/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/selfies/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/selfies/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/selfies/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/selfies/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/AppShell/duck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const initialState = {
// animationOut: 'zoomOut',
// animationInDuration: 300,
// animationOutDuration: 300,
// theme: 'stripped',
// component: 'snapMap',
// // theme: 'stripped',
// component: 'archive',
// position: 'front',
// show: true
// }
Expand Down
4 changes: 3 additions & 1 deletion src/features/Archive/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@import '~styles/extendables';

.archive {
padding-bottom: 100px;

.message {
text-align: center;
color: #bbb;
Expand All @@ -20,7 +22,7 @@

img {
margin-right: 5px;
@extend %clickable;
// @extend %clickable;
}
}
}
2 changes: 1 addition & 1 deletion src/features/Camera/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Camera: React.FC<Props> = ({ setFooterType, pickPhoto }) => {
const [takePic, setTakePic] = useState(false);

useEffect(() => {
startCamera();
// startCamera();
}, []);

const startCamera = async () => {
Expand Down
9 changes: 6 additions & 3 deletions src/features/Chat/data.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
export const dummyMessages = [
"Oh wow I can't believe it!",
"Hahaha you're so right!!",
'No way, when?!',
'No way, when?!! 😱',
'OMG I totally agree!',
"Umm I'm not so sure about that one",
'Wait, you are actually being serious rn?'
"Umm I'm not so sure about that one 🤨",
'Wait, you are actually being serious rn?',
"Hahahahaha you're too much 😂😂😂",
'Did you watch the new show last night?',
'🤡'
];
15 changes: 1 addition & 14 deletions src/features/Chat/duck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,7 @@ export const getMessages = (user) => async (dispatch) => {
if (!error) {
dispatch({
type: MESSAGES_RECEIVED,
messages: [
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages,
...response.messages
]
messages: response.messages
});
}
};
Expand Down
27 changes: 15 additions & 12 deletions src/features/Chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,24 @@ const Chat: React.FC<Props> = ({
messageContainer.current.scrollTop = messageContainer.current.scrollHeight;
}, [messages]);

const botResponse = useCallback(() => {
// Randomize the response and typing times to make the bot seem a little more "realistic"
const responseTimes = [500, 700, 900];
const typeTimes = [1200, 1400, 1600];
setTimeout(() => setTyping(true), randomArrayVal(responseTimes));
setTimeout(() => {
setTyping(false);
postMessage(thread, randomArrayVal(dummyMessages));
if (audioElem.current) playSound('newAppMessage', audioElem.current);
}, randomArrayVal(typeTimes));
}, [postMessage, thread]);
const botResponse = useCallback(
(message?) => {
// Randomize the response and typing times to make the bot seem a little more "realistic"
const responseTimes = [500, 700, 900];
const typeTimes = [1200, 1400, 1600];
setTimeout(() => setTyping(true), randomArrayVal(responseTimes));
setTimeout(() => {
setTyping(false);
postMessage(thread, message || randomArrayVal(dummyMessages));
if (audioElem.current) playSound('newAppMessage', audioElem.current);
}, randomArrayVal(typeTimes));
},
[postMessage, thread]
);

useEffect(() => {
getMessages(thread);
botResponse();
botResponse('Soooo, how was it!?');
}, [thread, getMessages, botResponse]);

const submitMessage = () => {
Expand Down
7 changes: 6 additions & 1 deletion src/features/Discover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ interface Props {
showDrawer: ShowDrawer;
}

type Profile = {
image: string;
title: string;
};

const Discover: React.FC<Props> = ({ avatar, drawerContent, showDrawer }) => {
const [profiles, setProfiles] = useState<any[]>([]);
const [page, setPage] = useState(1);
const [profiles, setProfiles] = useState<Profile[]>([]);

const loadMore = useRef(null);
const isFetching = useRef(false);
Expand Down
Loading

0 comments on commit 24410e3

Please sign in to comment.