-
Notifications
You must be signed in to change notification settings - Fork 1
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
OUT-1380 | Comment box designs #624
base: feature/M11
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Added a mechanism to refresh srcs of images while on activity fetch. - Added styles and effects on comment input while a file is being dragged. - Added attachment icon alongside submit button in comment box with a new tapwrite update, version 1.1.83
ffe0a5e
to
6299d1a
Compare
Please resolve conflicts here @arpandhakal |
const uploadFn = token | ||
? async (file: File) => { | ||
if (activeTask) { | ||
const fileUrl = await uploadImageHandler(file, token ?? '', activeTask.workspaceId, task_id) | ||
return fileUrl | ||
} | ||
} | ||
: undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const uploadFn = token | |
? async (file: File) => { | |
if (activeTask) { | |
const fileUrl = await uploadImageHandler(file, token ?? '', activeTask.workspaceId, task_id) | |
return fileUrl | |
} | |
} | |
: undefined | |
const uploadFn = token && async (file: File) => { | |
if (activeTask) { | |
const fileUrl = await uploadImageHandler(file, token ?? '', activeTask.workspaceId, task_id) | |
return fileUrl | |
} | |
} |
This should work if token is string | undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this is possible because this is passed directly to tapwrite prop uploadFn
which expects something like (file : File) => promise('string' | undefined')
and not (" " | (file : File) => promise('string' | undefined'))
dragCounter.current += 1 | ||
if (!isDragging) { | ||
setIsDragging(true) | ||
} | ||
} | ||
|
||
const handleDragLeave = () => { | ||
dragCounter.current -= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain the need for dragCounter here... don't really catch the reason for it. Don't isDragging
and dragCounter
do the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dragcounter is used because there could be multiple events firing while dragging, the events could be of same type or different type, for example drag enter, drag leave or other. To track the multiple events and stop flickering. The reason there are multiple events is because of nested dom structure. Lets say, there is a parent container and multiple child containers nested inside, if the drag is left from the innermost child container, then drag leave is fired causing setIsDragging to be false but since the drag is not out of the parent container, there is flickering.
Changes
Testing Criteria