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(mini-mode): comments input #971

Merged
merged 13 commits into from
Feb 21, 2024
Merged

feat(mini-mode): comments input #971

merged 13 commits into from
Feb 21, 2024

Conversation

sachin-into
Copy link
Collaborator

  1. modified useIpfs hook to upload files in mini mode
  2. created MiniCommentInput (similar to NewsfeedInput but for comment only); has different file browsing packages supporting mobile for image/video/audio selection

Copy link

netlify bot commented Feb 16, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit fda7eaa
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/65d5e1d394df6e0008d6a9ae
😎 Deploy Preview https://deploy-preview-971--teritori-dapp.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 16, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit fda7eaa
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/65d5e1d3543f440008c8885e
😎 Deploy Preview https://deploy-preview-971--testitori.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sachin-into sachin-into marked this pull request as draft February 16, 2024 10:18
@sachin-into sachin-into marked this pull request as ready for review February 16, 2024 10:31
@sachin-into sachin-into changed the title Feat: mini comments Feat: comments input for mini mode Feb 16, 2024
…ni-comments

# Conflicts:
#	package.json
#	packages/hooks/useIpfs.ts
#	packages/screens/Mini/Feed/components/detailView/MiniArticlePostDetails.tsx
#	packages/screens/Mini/Feed/components/detailView/MiniDefaultPostDetails.tsx
#	yarn.lock
omniwired
omniwired previously approved these changes Feb 19, 2024
omniwired
omniwired previously approved these changes Feb 21, 2024
@n0izn0iz n0izn0iz changed the title Feat: comments input for mini mode feat(mini-mode): comments input Feb 21, 2024
@@ -22,6 +24,7 @@ interface IPFSUploadProgress {
export interface PinataFileProps {
file: LocalFileData;
pinataJWTKey: string;
mode?: AppMode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why this hook need to be aware of the app mode

Choose a reason for hiding this comment

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

While uploading file from app instead of converting selected file to File type similar to WEB, I just used file URL to create formData and upload it to pinata. So, just to check if we are uploading from web or app I added that appmode

Copy link
Collaborator

@n0izn0iz n0izn0iz Feb 21, 2024

Choose a reason for hiding this comment

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

okay, app mode is not related to mobile or desktop, it's the mode of the ui.
an user could use mini-mode on desktop, btw mini means minimalist, not small screen

Copy link
Collaborator

Choose a reason for hiding this comment

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

use Platform.OS in here directly if possible and remove the new prop

Copy link

@sachin-55 sachin-55 Feb 21, 2024

Choose a reason for hiding this comment

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

ok, I didn't know that. Will do

Choose a reason for hiding this comment

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

I replaced app mode check with Platform.OS check

}: PinataFileProps): Promise<string | undefined> => {
try {
const formData = new FormData();
formData.append("file", file.file);
if (mode === "mini") {
//@ts-expect-error: description instead of adding file when adding url in formdata file upload to pinata
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the comment

Choose a reason for hiding this comment

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

As I state in above comment, to create formData for app side, I did it in that way.

@n0izn0iz n0izn0iz merged commit 514142b into main Feb 21, 2024
19 checks passed
@n0izn0iz n0izn0iz deleted the feat/mini-comments branch February 21, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants