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

TACT-111: Goal setting rework #575

Merged
merged 59 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3dc0168
TACT-111: Started goal creating redesign
al-petrushin Feb 12, 2023
b75c6f6
TACT-111: Goal name editor size and margins
al-petrushin Feb 23, 2023
e6a02e4
TACT-111: Empty goal list page
al-petrushin Feb 24, 2023
fde06f3
TACT-111: Removed templates and resizable content in goal create
al-petrushin Feb 24, 2023
2e1988b
TACT-111: Disable resize and styles for editor
al-petrushin Feb 25, 2023
21bedc7
TACT-111: Created space field and goal information section
al-petrushin Feb 27, 2023
fcaf722
TACT-111: Space select field
al-petrushin Mar 1, 2023
4cbca4a
TACT-111: Date picker field
al-petrushin Mar 6, 2023
a58ad0f
TACT-111: Goals list
al-petrushin Mar 8, 2023
56f757d
TACT-111: Emoji select field
al-petrushin Mar 8, 2023
24e7fe0
TACT-111: Action menu component
al-petrushin Mar 9, 2023
55f8ed2
TACT-111: Goal states display
al-petrushin Mar 9, 2023
ba9ec85
TACT-111: Created global emoji store and refactored date picker compo…
al-petrushin Mar 10, 2023
d201e58
TACT-111: Last changes in date picker
al-petrushin Mar 10, 2023
f436080
TACT-111: Removed unnecessary functions
al-petrushin Mar 10, 2023
25c648e
TACT-111: Delayed task creation
al-petrushin Mar 12, 2023
6de9d7e
TACT-111: Disable changing goal and space for tasks
al-petrushin Mar 12, 2023
37c87a6
TACT-111: Used action menu for task item and restricted goal and spac…
al-petrushin Mar 12, 2023
17818ac
TACT-111: Disabled goal and space changing for task block
al-petrushin Mar 12, 2023
5ac4c87
TACT-111: Creation task before goal
al-petrushin Mar 12, 2023
e4f6286
TACT-111: Minor fixes
al-petrushin Mar 12, 2023
d91caf5
Merge branch 'main' of github.com:tact-app/web into TACT-111-goal-set…
al-petrushin Mar 12, 2023
f646fc8
TACT-111: Close submit modal and title error handling
al-petrushin Mar 15, 2023
4e25938
TACT-111: Lint fixes
al-petrushin Mar 15, 2023
123fa55
TACT-111: Added tooltips for space select and fixed datepicker styles
al-petrushin Mar 16, 2023
de6de6c
TACT-111: Ability to select range
al-petrushin Mar 16, 2023
a9b9cff
TACT-111: Finished datepicker styles
al-petrushin Mar 22, 2023
955783f
TACT-111: Ability to disable reference in creator
al-petrushin Mar 22, 2023
b2d84cd
TACT-111: Scrollable task list
al-petrushin Mar 22, 2023
f7cec8a
TACT-111: Goals creation fixed
al-petrushin Mar 23, 2023
18d64be
TACT-111: Changed for correct work of goal list
al-petrushin Mar 23, 2023
133c3ab
TACT-111: Removed list id for goals and editable space image
al-petrushin Mar 25, 2023
a509f1f
TACT-111: Fixed goal updating
al-petrushin Mar 25, 2023
a457530
TACT-111: Date picker for goal item
al-petrushin Mar 25, 2023
d7b1022
TACT-111: Correct goals creating and updating
al-petrushin Mar 25, 2023
4b281f7
TACT-111: Fixed task list overflow
al-petrushin Mar 25, 2023
d273733
Merge branch 'main' of github.com:tact-app/web into TACT-111-goal-set…
al-petrushin Mar 25, 2023
b3f11b9
TACT-111: Resolved conflicts with dependencies
al-petrushin Mar 25, 2023
7cffe7b
TACT-111: Minor fixes for correct work
al-petrushin Mar 26, 2023
b55419e
TACT-111: Prevent double click and descriptions loading
al-petrushin Mar 26, 2023
f59c83b
TACT-111: Ability to create and update task descriptions
al-petrushin Mar 26, 2023
001a3c4
TACT-111: Ability to change space icon
al-petrushin Mar 26, 2023
82c3a51
TACT-111: Fixed emoji select closing
al-petrushin Mar 26, 2023
a11690f
TACT-111: Fixed styles for safari
al-petrushin Mar 26, 2023
53f65fb
TACT-111: Changed cmd for strike in editor
al-petrushin Mar 26, 2023
a0a8d38
TACT-111: Updated package lock
al-petrushin Mar 26, 2023
d45cd7b
Merge branch 'main' of github.com:tact-app/web into TACT-111-goal-set…
al-petrushin Mar 26, 2023
add2f1d
TACT-111: Updated lock file
al-petrushin Mar 26, 2023
a4f1bc4
TACT-111: Job fix
al-petrushin Mar 26, 2023
dcbcc78
TACT-111: Fixes after test
al-petrushin Mar 28, 2023
c29c4da
TACT-111: Fixed task creator suggestions overlay
al-petrushin Mar 29, 2023
56edd87
TACT-111: Fixed task updating
al-petrushin Mar 29, 2023
589d9f6
TACT-111: Updated mascot image and minor fixes
al-petrushin Mar 30, 2023
486ad79
Merge branch 'main' of github.com:tact-app/web into TACT-111-goal-set…
al-petrushin Mar 30, 2023
4db14df
TACT-111: Minor fix
al-petrushin Mar 30, 2023
5e45a80
TACT-111: Updated lock file
al-petrushin Mar 30, 2023
2c5bbcf
TACT-111: Minor fix
al-petrushin Mar 30, 2023
6788123
TACT-111: Minor fix
al-petrushin Mar 30, 2023
07f07b5
TACT-111: Reverted datepicker version
al-petrushin Mar 30, 2023
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
Binary file added assets/images/mascot-goals.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@al-petrushin, why png? why not svg?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Flex, Text } from "@chakra-ui/react";
import ImageComponent from "../../../../shared/Image";
import mascotGoals from "../../../../../assets/images/mascot-goals.png";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are our other assets? don't see assets folder on the root.

import { GoalCreateNewButton } from "../GoalCreateNewButton";
import React from "react";

export function EmptyGoalListMessage() {
return (
<Flex
flexDirection='column'
alignItems='center'
justifyContent='center'
maxW={500}
margin='auto'
pt={10}
>
<ImageComponent src={mascotGoals} width={336} />
<Text
fontSize='sm'
fontWeight='normal'
color='gray.700'
textAlign='center'
mt={4}
mb={6}
lineHeight={5}
>
You can define a meaningful destination point that will
help you focus and&nbsp;complete only essential things that
bring you closer to it, postponing or&nbsp;canceling the rest.
</Text>
<GoalCreateNewButton withHotkey>
Create new goal 🎯
</GoalCreateNewButton>
</Flex>
);
}
16 changes: 0 additions & 16 deletions components/pages/Goals/components/GoalConfiguration/index.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions components/pages/Goals/components/GoalConfiguration/store.ts

This file was deleted.

19 changes: 0 additions & 19 deletions components/pages/Goals/components/GoalConfiguration/view.tsx

This file was deleted.

86 changes: 56 additions & 30 deletions components/pages/Goals/components/GoalCreateNewButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,60 @@
import { observer } from 'mobx-react-lite';
import { Box, Button, Text } from '@chakra-ui/react';
import { LargePlusIcon } from '../../../../shared/Icons/LargePlusIcon';
import { Button, Text, ButtonProps } from '@chakra-ui/react';
import { useGoalsStore } from '../../store';
import React from 'react';
import { HotkeyBlock } from '../../../../shared/HotkeyBlock';
import { Tooltip } from "../../../../shared/Tooltip";

export const GoalCreateNewButton = observer(function GoalCreateNewButton() {
const store = useGoalsStore();
type Props = ButtonProps & {
withHotkey?: boolean;
withTooltip?: boolean;
}

return (
<Button
onClick={store.startGoalCreation}
size='xl'
display='inline-flex'
flexDirection='column'
alignItems='center'
borderRadius='xl'
h={60}
w={56}
pt={6}
pl={14}
pr={14}
pb={6}
mb={10}
mr={10}
>
<Box mb={6}>
<LargePlusIcon />
</Box>
<Text fontSize='lg' fontWeight='semibold' color='gray.400'>
New goal
</Text>
</Button>
);
});
export const GoalCreateNewButton = observer(
function GoalCreateNewButton({ children, withHotkey, withTooltip, ...buttonProps }: Props) {
const store = useGoalsStore();

return (
<>
<Tooltip
isDisabled={!withTooltip}
label='Create goal'
hotkey={withHotkey ? 'Press N' : ''}
placement='left'
>
<Button
onClick={store.startGoalCreation}
size='md'
minH={8}
mb={2}
bg='blue.400'
color='white'
_hover={{
bg: 'blue.500',
}}
_focus={{
boxShadow: 'var(--chakra-shadows-outline)',
outline: 'none',
}}
{...buttonProps}
>
{children}
</Button>
</Tooltip>
{withHotkey && !withTooltip && (
<Text
fontSize='xs'
fontWeight='normal'
lineHeight={4}
color='gray.400'
display='flex'
justifyContent='center'
>
Press
<HotkeyBlock hotkey='N' ml={1} fontSize='xs' lineHeight={4} />
</Text>
)}
</>
);
}
);
Loading