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

[FR] Allow users to archive assets from Capture App #1942

Closed
sync-by-unito bot opened this issue Aug 15, 2022 · 53 comments
Closed

[FR] Allow users to archive assets from Capture App #1942

sync-by-unito bot opened this issue Aug 15, 2022 · 53 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Aug 15, 2022

User story:
As a Capture App user, I want to remove assets from Capture network so that I can sort of "undo" my sharing on the explorer page.

Note: We cannot remove on-chain records, so the only thing we can do is to call Asset Delete API of storage backend to remove the asset from backend db.

┆Issue is synchronized with this Asana task by Unito
┆Created By: Kenny Hung

@sync-by-unito sync-by-unito bot changed the title [FR] delete function could [FR] delete feature could work really Aug 15, 2022
@sync-by-unito sync-by-unito bot changed the title [FR] delete feature could work really [FR] Allow users to remove assets from Capture App Oct 10, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 18, 2022

➤ Tammy Yang commented:

We will use archive.

Basic flow:

  1. User click menu of their own Capture (at the top-right corner)
  2. User choose “archive” from the menu
  3. A popup shows the archived item will still be on chain but will not appear in the Numbers Network
  4. If yes, calls backend API to delete the asset

@sync-by-unito sync-by-unito bot changed the title [FR] Allow users to remove assets from Capture App [FR] Allow users to archive assets from Capture App Oct 18, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 20, 2022

➤ Ethan Wu commented:

Tammy Yang i believe this might be an ionic side implementation

the top bar is handled by ionic on the my profile => capture page

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 21, 2022

➤ Kenny Hung commented:

Tammy Yang(cc Sam) Just confirm this feature flow #1, currently, the menu(at the top-right corner) will display network action directly, so we will

  1. Follow the figma design(could see attachment), just display "network action" and "Archive" . (We could fixed the UI to match figma in the future. now, just let it close to it.)
  2. Still display network action, just add new one as "Archive" ?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 21, 2022

➤ Sam commented:

Kenny Hung, (cc: Tammy Yang)
So we just need to add one more network action "Archive"?
Here is the claap ( https://app.claap.io/numbers-protocol/qa-should-we-add-archive-to-network-actions-c-O35CsUM4Uy-IyXxJz6B0WwG ) explanation.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 21, 2022

➤ Tammy Yang commented:

Sam, no, I think we should have UX like this

  1. Click menu button on the top-right corner
  2. Show menu as in the Figma
  3. Add "More Actions" between Unpublish and Remove, which should open "network actions"
  4. For Edit, when it is clicked, allow users to edit caption
  5. For Sell, update text to "Mint & Share" and when it is clicked, do the same thing as the "Mint & Share" action
  6. For Unpublish, ask users to confirm, and if yes, do this https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_disable ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_disable )
  7. For Remove, ask users to confirm, and if yes, do this https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/assets_delete ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/assets_delete )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2022

➤ Sam commented:

Sofia Yan need your help 😅 to translate this screen ( https://asana-user-private-us-east-1.s3.amazonaws.com/assets/1200886955782960/1203205518908085/1203205518908086.wKsNLJJacfKnHuq4PnRD_height640.png?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBAaCXVzLWVhc3QtMSJIMEYCIQDYuSy1g1zAgDDbKLC98rnw6iPnG%2FUWgaJ%2BS9VwjqHX%2FgIhAOy%2FiOu23q16Zj8KUcMzGa%2F1MX6xnbEIeDfKLXY68fUmKtUECOn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMNDAzNDgzNDQ2ODQwIgxlAZi6ES5EvQLHs4IqqQS%2FVd7oFQfGr0XUVOVSC%2BgRzwSvl5yyuiD5ujK4rSqvPTYFD4diMT%2B%2FFZ3T3Kd3CdU9jY%2F2BI%2FTg%2FI4RhzExWry%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6%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=66f1213eded7432511c752e4ee7b2df4710a9d0e35fbed3f47bf79cf738f9fae#_=_ ).

  1. Edit = 編輯
  2. Mint & Share =
  3. Unpublish = 取消發布
  4. Network Actions =
  5. Remove = 消除

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2022

➤ Sofia Yan commented:

Sam

  1. Edit = 編輯
  2. Mint & Share = 鑄造並分享
  3. Unpublish = 取消發布
  4. Network Actions = 網絡動作
  5. Remove = 移除

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2022

➤ Sam commented:

Sofia Yan, need bit more help.

When a user clicks Mint & Share there might be a potential error like

  • Can not perform Mint & Share action = 無法執行 Mint & Share 操作

When a user clicks Network Actions there might be a potential error like

  • Can not perform open Network Actions page = 無法執行打開的網絡操作頁面

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 27, 2022

➤ Sam commented:

Bofu Chen, I have a question.

In this endpoint https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_list ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_list ) what is associated_id?

So let's say we have an asset with id assetA.
Then we minted assets with id assetA which will become a product with product id productA.

My question is productA.associated_id == assetA?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Kenny Hung commented:

Sam (cc Scott Yan)
yes, associated_id = cid/Nid

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Kenny Hung cid means capture id, what nid means ?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Scott Yan commented:

nid == cid

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam
cid is content id (something from filecoin)
we are adopting the same value and calling it nid (numbers id)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Ethan Wu (cc: Olga), How can I get the product id if I only have a capture id?

Currently, I'm trying to disable product by product id using this Disable a product endpoint ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_disable ).
But to call Disable a product endpoint ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_products_disable ) I need the product id first.

I'm trying to get the product id by using the List all products endpoint ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/store_orders_confirm ) (I pass capture id as associated_id parameter).

  • If I specify associated_id parameter then results = [].
  • If I don't specify the associated_id parameter it gives me all products. Should I iterate over all products? 🤔

Is there any other endpoint I don't know?😅

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam
you can search using associated_id

insert associated_id in for cid

can you send me the cid you are trying to find the product_id for?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Ethan Wu, bafkreigarj2zcpx7fcqmzbafmw3ymp5zqlpcyjj3lu6wd6nt4e253f4cqe

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Ethan Wu, sorry I gave you the wrong cid.

This is cid for published capture

bafybeif3cvxzclo6av7dwloazocgllclqrxdgxa5kgu3vpbnrref4vmymi

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam ok yeah bc i just searched the previous and it isn't a product

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam by published do you mean it has been minted as an NFT?

it to listed in the marketplace in order to be disabled.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam is it in the marketplace? did you set a price and list it to buy?
bc both of these items are not products. they don't have product ids

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Ethan Wu, no 😅. I just run mint action. So running mint action does not make a product right?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam no it doesn't it just mints it as a NFT, makes it public but it doesn't get listed as a product.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Sam you can ask kenny for a testing account and you can test with those assets

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Ethan Wu commented:

Kenny Hung ^^

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Ethan Wu, thank you for the clarification 😀🙏

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Kenny Hung, can you pls dm me a testing account so I can test unpublish action?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Kenny Hung commented:

Sam If you need another test account, please let me know, thanks😀

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Kenny Hung, I figured it out, nothing blocking me at this point. Thanks to Kenny Hung, Ethan Wu. 🙏

I can work on unpublish feature further.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 28, 2022

➤ Sam commented:

Sofia Yan, hope these translations are not weird 😅

  • This asset is not listed in CaptureClub = 該資產未在 CaptureClub 中列出
  • Can not perform Mint & Share action = 無法執行 Mint & Share 操作
  • Can not perform open Network Actions page = 無法執行打開的網絡操作頁面

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 29, 2022

➤ Sofia Yan commented:

Sam

  • Can not perform Mint & Share action = 無法執行鑄造及分享
  • Can not perform open Network Actions page = 無法打開網絡動作頁面
  • This asset is not listed in CaptureClub = 該資產未上架 CaptureClub

@sync-by-unito sync-by-unito bot closed this as completed Oct 30, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 30, 2022

➤ Sam commented:

Here is the PR ( #2239 ).

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 9, 2022

➤ Kenny Hung commented:

Tammy YangSam
Just double confirm about "mint & share" option, it should just mint nft or operate "mint & share" network action?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 9, 2022

➤ Tammy Yang commented:

Kenny Hung since it is called "mint & share", it should do exactly the same thing as network action (and charge the same amount)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 9, 2022

➤ Kenny Hung commented:

Sam ( cc Tammy Yang) could this one add to next tuesday release? 😣
because 0.69.0 → only mint the asset not "mint & share". Sorry I misunderstand this one.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 10, 2022

➤ Sam commented:

Kenny Hung, so I just need to change the text to "Mint" right?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 10, 2022

➤ Kenny Hung commented:

Sam No, Please let this button just like network action “mint & share”.

  1. could display popup to set price & caption
  2. charge the same amount.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 10, 2022

➤ Sam commented:

Kenny Hung, Like this?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 10, 2022

➤ Kenny Hung commented:

yes

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 10, 2022

➤ Sam commented:

Kenny Hung, I created a separate asana card ( https://app.asana.com/0/1201016280880500/1203341838065866/f ) for clear separation.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 24, 2022

➤ Kenny Hung commented:

SamTammy Yang (cc Scott YanSherry Chung) capture app 0.69.2 testing
QA found the remove feature on android have some error.
reproduce steps:

  1. choose an asset & press option button
  2. choose “remove”
  3. will display error “File does not exist”
  4. the asset will remove actually

@sync-by-unito sync-by-unito bot reopened this Nov 24, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 25, 2022

➤ Sam commented:

Kenny Hung, I was able to reproduce this issue.
It happens when Android tries to delete a photo/vidoe captured from iPhone.

I use this photo ( https://i.imgur.com/3dl1C3e.png ). Steps to reproduce.

  • Take Photo with iPhone (iphoneCapture.jpeg)
  • Take Photo with Android (androidCapture.jpeg)
  • pull to refresh from iOS device to see all captures
  • pull to refresh from Android device to see all captures
  • try to delete iphoneCapture.jpeg from Android phone

@sync-by-unito sync-by-unito bot closed this as completed Nov 25, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 25, 2022

➤ Sam commented:

Here is the PR ( #2339 ) and here is the claap explanation ( https://app.claap.io/numbers-protocol/capture-delete-issue-fix-c-O35CsUM4Uy-g_X7fb0BAynA ).

@sync-by-unito sync-by-unito bot reopened this Nov 27, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 27, 2022

➤ Bofu Chen commented:

Sam PR 2339 seems to be a workaround that hides the "File does not exist" error on Android.

What is the root cause that only Android Capture shows this error?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sam commented:

Bofu Chen, I haven't looked for the root cause. I just found that Android has some issues deleting files captured from iPhones.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Bofu Chen commented:

Sam If we do not know the root cause, we can not ensure that the fix/workaround can close the issue without any side effects.

Tammy Yang I think this will be a release blocker and need a suggestion from a product point of view.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sam commented:

Bofu Chen, I will look dig deeper and see if I can find the root cause.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Tammy Yang commented:

Bofu ChenSam every issue that related to asset storage is critical. Therefore, here is my suggestion

  1. If PR2339 does not bring any additional issues, we can accept it now with conditions
  2. If PR2339 is accepted, open a critical issue in the next sprint to find out the root cause

What do you think?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sam commented:

Tammy Yang, "asset storage is critical" understood.

A conditional pass for PR2339 sounds good. Currently, I'm investigating why this issue is happening.

Along the way, I found other issues, for example.
Let's say the account Sam has in picture A.
Sam delete picture A from Android.
Then sam opens his iOS app and still can see picture A when Sam tries to delete picture A he got an error.
👆The issue above is more related to sync between devices, but I'm not sure if in real-world capture users use capture app from iOS and Android devices.

I assume regular capture app user has one device iPhone or Android.

the issue for PR2339 only happens if

  • user takes photo A from iPhone
  • then open the Android app and tries to delete photo A it will give File not exist error (but still deletes photo)

It's interesting because photos taken from android can be deleted from iPhone without any issues. I'm not sure if it's a framework bug or not, will investigate further.

Also since the details page is iframe we no longer can view details page when we offline, therefore it make sense to save thumbnails for photo/video only and do not save actual images/videos it takes user's space.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Bofu Chen commented:

Sam Thanks for sharing the new finding. To make it easier to discuss and re-cap, I suggest visualizing the issue on Miro. I made the visualization ( https://miro.com/app/board/o9J_knEiIYo=/?moveToWidget=3458764539776247320&cot=14 ) this time, and you can feel free to update it.

I will accept PR2339 and create a release today.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sam commented:

Bofu Chen, I set breakpoints and I think it's more related to the sync issue (claap ( https://app.claap.io/numbers-protocol/delete-file-issue-c-O35CsUM4Uy-4TzWWWFPo-lJ )). Will investigate further.

Steps to reproduce:

  • Take photos on Android
  • Take photos on iOS
  • Open web version and try pull to refresh
  • Remove 1-2 photos from Android or iOS
  • Open web version and try pull to refresh

@sync-by-unito sync-by-unito bot closed this as completed Nov 29, 2022
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

No branches or pull requests

0 participants