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: delete-modal pin guidance, improved language #1644

Merged
merged 14 commits into from
Apr 1, 2021

Conversation

jessicaschilling
Copy link
Contributor

@jessicaschilling jessicaschilling commented Sep 17, 2020

Summary

This PR prepares for pinning service continuity and improves overall UX of the Files screen "Delete" modal as follows:

Closes #1634.
Closes #1258

Done

To do

  • Wire up checkboxes (first box should be checked by default)
  • Address "Delete folder" dialog does not show folder name #1258 while we're here by adding the name of the (file, folder) to be deleted if only one item is being deleted: Are you sure you want to remove "catphoto.gif"?

Open question

Should we change CLI tutor mode guidance in any way to match?

Screenshot

(Note this doesn't include the language Are you sure you want to remove "catphoto.gif"? - can update screenshot if desired)
image

@jessicaschilling
Copy link
Contributor Author

@lidel -- this one is ready for you to wire up at your leisure 😊
Note: I've still got reservations about adding a GC checkbox ... see #1634 (comment)

@lidel
Copy link
Member

lidel commented Sep 18, 2020

Second option is blocked by #1615, I'd park this until we have pinning services wired up, then rebase this PR.

@lidel
Copy link
Member

lidel commented Oct 7, 2020

@rafaelramalho19 I won't have bandwidth for pushing this over finish line any time soon, mind taking it over?

@lidel lidel removed their assignment Oct 7, 2020
@rafaelramalho19
Copy link
Contributor

@jessicaschilling maybe the first checkbox should be selected by default?

@jessicaschilling
Copy link
Contributor Author

@rafaelramalho19 Sounds good, please do!

@jessicaschilling
Copy link
Contributor Author

Quick note: per discussion in #1258 (comment), please include the name of the (file, folder) to be deleted if only one item is being deleted. This would mean first line of text would be:

Are you sure you want to remove "catphoto.gif"?

@rafaelramalho19 happy to make up another screenshot if you want it, but this is pretty self-explanatory 😊

@jessicaschilling
Copy link
Contributor Author

@rafaelramalho19 - I rebased this against current master, so this should be relatively easy to finish up (please see the first comment for checklist of remaining items to do). It's one of the remaining issues in the pinning service integration epic, so please prioritize with that work. Thank you!

@jessicaschilling jessicaschilling modified the milestones: v2.13, v2.12 Jan 25, 2021
@lidel
Copy link
Member

lidel commented Feb 25, 2021

@rafaelramalho19 mind rebasing this?

I believe we want to land this along with #1721

@lidel lidel added the P1 High: Likely tackled by core team if no one steps up label Feb 25, 2021
@lidel
Copy link
Member

lidel commented Mar 26, 2021

@rafaelramalho19 #1713 just got merged, this PR should be unblocked now for you to rebase and resume work.

I believe the behavior we want is:

  • if file is pinned locally
    • show option to remove local pin, it should be checked by default
  • if file is pinned remotely
    • show option to remove all remote pins, but it should be unchecked by default
  • if file has no pins, we dont show those additional options
  • do not trigger GC, its removed from the scope of this work (go-ipfs may get better GC in the future, we should wait for that)

@rafaelramalho19
Copy link
Contributor

@lidel ready for review 🎉

This ensures we don't remove pins if removal failed first,
and also do pin removal in best-effort fashion to avoid crashing webui
on DAGs with multiple instances of the same CID

Also, closes #1740
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@rafaelramalho19 Thank you, works as expected (found edge case but fixed it in 5285a8b) 👌

The only remaining ask is to replace checkboxes with styled ones that we already use on Files list:

2021-03-30--00-37-24

@rafaelramalho19
Copy link
Contributor

@lidel In the last commit I also fixed #1742

This makes filename more prominent when a single item is removed.
Easier to scan when performing quick operations.
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thanks! Works as expected.

Made two cosmetic tweaks:

(1) moved item name to modal title, so it is harder to miss:

Screenshot_2021-03-31  animals pets test Files IPFS

(2) added truncation rule to the title so long filenames don't break the modal:

Screenshot_2021-03-31  animals pets test Files IPFS(1)

@jessicaschilling mind taking a quick look if above changes are ok?

@jessicaschilling
Copy link
Contributor Author

@lidel Great idea 😊 Do you mind adding the question mark on the other side of the truncation ... so it displays whether or not truncation happens?

@lidel
Copy link
Member

lidel commented Apr 1, 2021

Unfortunately i18next does not support ICU translations with both pluralizations AND embedded tags, and for truncating only the filename we would have to wrap it in a <span>.

To avoid this mess, I can move the question mark before filename, so we don't need any additional tags.

It would look like this:

Screenshot_2021-04-01  animals pets test Files IPFS(1)
Screenshot_2021-04-01  animals pets test Files IPFS

@jessicaschilling would that be better or worse?

@jessicaschilling
Copy link
Contributor Author

It's not visually pretty, but it's better semantically. Go for it. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High: Likely tackled by core team if no one steps up
Projects
None yet
3 participants