Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/ focus mode #158

Merged
merged 66 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7c87212
feat: :construction: add lablel to tasks list
Undeadlol1 Nov 1, 2020
8876567
fix: "isStale" function
Undeadlol1 Nov 4, 2020
9b13804
fix: "isStale" function
Undeadlol1 Nov 4, 2020
3609ea4
Merge branch 'master' into feat/add-stale-condition-to-tasks-list
Undeadlol1 Nov 6, 2020
b73fcc9
feat: separate TasksList and TasksListItem
Undeadlol1 Nov 6, 2020
0eb71ca
fix: TaskListItem stories
Undeadlol1 Nov 6, 2020
4ced5aa
feat: add stale indicator to TasksListItem
Undeadlol1 Nov 6, 2020
aef3257
fix: unused import
Undeadlol1 Nov 6, 2020
eff89d6
fix: :bug: "isStale" not detecting stale tasks
Undeadlol1 Nov 6, 2020
18031ce
fix: remove console.logs
Undeadlol1 Nov 6, 2020
9f147cf
fix: remove loggings
Undeadlol1 Nov 6, 2020
3c197f7
ci: :arrow_down: downgrade eslint to pass CI tests
Undeadlol1 Nov 6, 2020
d016204
Merge remote-tracking branch 'origin/master' into feat/add-stale-cond…
Undeadlol1 Nov 6, 2020
9d63a4c
refactor: minor
Undeadlol1 Nov 6, 2020
656b1e8
feat: improve stale function
Undeadlol1 Nov 7, 2020
d5426f9
Merge remote-tracking branch 'origin/master' into feat/add-stale-cond…
Undeadlol1 Nov 7, 2020
ff69fe6
fix: forgot package-lock
Undeadlol1 Nov 7, 2020
5ca771a
feat: add test boilerplate for TaskService
Undeadlol1 Nov 7, 2020
0e98cb4
feat: :white_check_mark: add few "isStale" tests
Undeadlol1 Nov 7, 2020
b87f189
feat: :white_check_mark: add more tests
Undeadlol1 Nov 7, 2020
928ee62
refactor: minor
Undeadlol1 Nov 7, 2020
a7aecc4
ci: :green_heart: temporary disable caching to fix ci builds
Undeadlol1 Nov 7, 2020
19d8f7a
ci: :green_heart: reenable caching and add "package.json" to cach hash
Undeadlol1 Nov 7, 2020
36af82f
feat: rework hard choices
Undeadlol1 Nov 8, 2020
30a699b
refactor: minor
Undeadlol1 Nov 8, 2020
669ca96
Merge branch 'master' into feat/add-stale-condition-to-tasks-list
Undeadlol1 Nov 9, 2020
4de1902
ci: rename test workflow
Undeadlol1 Nov 9, 2020
61dda9d
ci: :green_heart: also cache node_modules
Undeadlol1 Nov 9, 2020
ebd4c7d
Merge remote-tracking branch 'origin/master' into feat/add-stale-cond…
Undeadlol1 Nov 9, 2020
b48cfbc
ci: fix typescript being downloaded unnecessary
Undeadlol1 Nov 9, 2020
3b30bd6
feat: add FocusModePage boilerplate
Undeadlol1 Nov 9, 2020
964d7b6
feat: add focue mode page rout
Undeadlol1 Nov 9, 2020
d10e9fa
Merge remote-tracking branch 'origin/master' into feat/-focus-mode-(#…
Undeadlol1 Nov 9, 2020
1efdb84
refactor: move files in proper folders
Undeadlol1 Nov 10, 2020
a0696e6
refactor: move files to appropriate folders
Undeadlol1 Nov 10, 2020
0b20ee6
feat: :construction: adding slider
Undeadlol1 Nov 10, 2020
1db77ae
feat: :construction: adding slider
Undeadlol1 Nov 10, 2020
9ad95ca
feat: add Icon component
Undeadlol1 Nov 10, 2020
778fb4f
feat: add "size" to Icon
Undeadlol1 Nov 10, 2020
4e6b3f5
feat: :construction: improving slider
Undeadlol1 Nov 10, 2020
d1e4f82
feat: add "onChange" to WhatDoYouFeelSlider
Undeadlol1 Nov 12, 2020
f6fa3ea
feat: :construction:
Undeadlol1 Nov 12, 2020
9520e81
feat: improve templates
Undeadlol1 Nov 12, 2020
67c6afb
refactor: :recycle: remove unnecessary container from TasksList
Undeadlol1 Nov 12, 2020
bfe1d78
Merge branch 'feat/add-stale-condition-to-tasks-list' into feat/-focu…
Undeadlol1 Nov 12, 2020
01c6469
feat: add Autocomplete
Undeadlol1 Nov 12, 2020
ad67924
feat: :construction: improving autocomplete
Undeadlol1 Nov 12, 2020
c0e9c3e
feat: :construction: improve autocomplete
Undeadlol1 Nov 12, 2020
1d6e3ee
Merge remote-tracking branch 'origin/master' into feat/-focus-mode-(#…
Undeadlol1 Nov 16, 2020
adf0e3f
feat: add TasksList to FocusModePage
Undeadlol1 Nov 16, 2020
d796819
fix: hide elements in FocusMode during loading
Undeadlol1 Nov 16, 2020
b85cd61
fix: type issues
Undeadlol1 Nov 16, 2020
13cea58
fix(storybook): delete unused story
Undeadlol1 Nov 16, 2020
534c6ab
Merge remote-tracking branch 'origin/master' into feat/-focus-mode-(#…
Undeadlol1 Nov 16, 2020
d610843
fix: remove unused imports
Undeadlol1 Nov 16, 2020
1a5e7e2
Merge branch 'feat/-focus-mode-(#110)' of https://github.com/Undeadlo…
Undeadlol1 Nov 16, 2020
8b8900f
refactor(TaskPage): :recycle:
Undeadlol1 Nov 16, 2020
dc31a53
refactor: :recycle: various
Undeadlol1 Nov 16, 2020
5eaaafb
feat: add options to autocomplete
Undeadlol1 Nov 16, 2020
f6c88ad
feat: add EmotionIconButton
Undeadlol1 Nov 16, 2020
bd74a15
feat: add "onClick" to EmotionIconButton
Undeadlol1 Nov 16, 2020
c3fc15b
feat: rework icons via EmotionIconButton
Undeadlol1 Nov 16, 2020
7967179
feat: change emotion icons to kawaii faces
Undeadlol1 Nov 16, 2020
bd48761
fix: :bulb: remove comment
Undeadlol1 Nov 17, 2020
44641c7
Merge branch 'feat/-focus-mode-(#110)' of https://github.com/Undeadlo…
Undeadlol1 Nov 17, 2020
a91ab3c
Merge remote-tracking branch 'origin/master' into feat/-focus-mode-(#…
Undeadlol1 Nov 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"react-i18next": "^11.7.3",
"react-if": "^4.0.1",
"react-joyride": "^2.1.1",
"react-kawaii": "^0.16.0",
"react-mailto.js": "^2.1.0",
"react-redux": "^7.2.2",
"react-redux-firebase": "^3.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/@types/libraries.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
declare module 'react-use-toggle';
declare module 'react-kawaii';
declare module 'react-firebaseui-localized';
1 change: 0 additions & 1 deletion src/RouterAndDataLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default memo((props: { children?: JSX.Element }) => {
const [today, setToday] = useState(Date.now());
const yesterday = subHours(today, getHours(today)).getTime();

// Refetch data every hour.
useInterval(() => {
console.log('Refetching data every hour...');
setToday(Date.now());
Expand Down
41 changes: 32 additions & 9 deletions src/components/ui/EmotionIconButton/EmotionIconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
import { Fab } from '@material-ui/core';
import { IconButton, useTheme } from '@material-ui/core';
import React, { memo } from 'react';
import { Icon } from '../../ui/Icon';
import { Planet } from 'react-kawaii';

type EmotionTypes = 'happy_face' | 'sad_face';

export interface EmotionIconButtonProps {
type: 'happy_face' | 'sad_face';
color?: 'primary' | 'secondary';
type: EmotionTypes;
onClick?: (
event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
) => void;
}

const EmotionIconButton = memo(function EmotionIconButton({
type,
color = 'secondary',
onClick,
}: EmotionIconButtonProps) {
const theme = useTheme();

function geticon() {
const kawaiiIconSize = 75;
switch (type) {
case 'happy_face':
return (
<Planet
mood="happy"
size={kawaiiIconSize}
color={theme.palette.primary.main}
/>
);
case 'sad_face':
return (
<Planet
mood="sad"
size={kawaiiIconSize}
color={theme.palette.secondary.main}
/>
);
}
}

return (
<Fab color={color} onClick={onClick}>
<Icon code={type} size="large" />
</Fab>
<IconButton style={{ padding: 0 }} onClick={onClick}>
{geticon()}
</IconButton>
);
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/unsorted/Autocomplete/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Autocomplete = memo(function Autocomplete(
filterOptions={(options, params) => {
const filtered = filter(options, params);

// Suggest the creation of a new value
// Suggest the creation of a new value.
if (params.inputValue !== '') {
filtered.push({
// TODO this.
Expand Down
2 changes: 1 addition & 1 deletion src/components/unsorted/WhatDoYouFeelAboutTheTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const WhatDoYouFeelAboutTheTask = memo((props: Props) => {
</Grid>
<Grid item xs>
<Link to={`${url}/isTroublesome`}>
<EmotionIconButton type="sad_face" color="primary" />
<EmotionIconButton type="sad_face" />
</Link>
</Grid>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/components/unsorted/WhatDoYouFeelSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const WhatDoYouFeelSlider = memo(function WhatDoYouFeelSlider(
<Grid item container justify="space-between">
<Grid item xs={2}>
<Box textAlign="center">
<EmotionIconButton color="primary" type="sad_face" />
<EmotionIconButton type="sad_face" />
</Box>
</Grid>
<Grid item xs>
Expand Down