-
Notifications
You must be signed in to change notification settings - Fork 324
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: snapshot link and IPNS path copy options #937
Conversation
09c1220
to
63902d2
Compare
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.
Quick notes on cosmetics:
- I am worried about information overload on DNSLink/IPNS websites
- is "permalink" clear enough for regular users? (i have no idea - non-native speaker, so feel free to ignore below notes)
would users know the difference between "shareable link" and "permalink"?- we do, but that is because we know that IPFS is immutable and IPNS is mutable and can provide updates over time.
- on the old internet "permalink" is just "a link that is promised to work in the future", but here we have a perfect snapshot: is there a better language we could use? would "snapshot link" or "revision link" be bit more explicit? The label should highlight that the link will point to "specific version frozen in time"
- is "permalink" clear enough for regular users? (i have no idea - non-native speaker, so feel free to ignore below notes)
- We should switch our GUIs to copy
https://dweb.link/ipfs/{cid}
as the canonical URL- it will redirect to proper subdomain: https://docs.ipfs.io/how-to/address-ipfs-on-web/#automatic-leverage-the-gateway-in-go-ipfs
- backward-compatible, makes it easy for people to just swap the hostname or remove hostname, and they get "content path"
ps. some time ago I've added npm run fix:lint:standard
which should fix most of linting automatically. perhaps we should just run it as pre-commit hook, so people don't need to worry about fixing it manually?
@lidel -- some revisions and a few questions:
|
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.
This is great!
-
I made some comments on specific menu items, but overall looks great! Adding
Import
/My Node
buttons made a huge difference! ❤️ -
iirc we moved pinning to the bottom because people rarely use it, and copy actions are much more useful – I'd remove changes to pinning item from the scope of this PR (rationale in comment inline)
-
The CI failures are only for
pull_request
tests – those simulate "how master branch would look like if we merge this PR" and are caused by updated standardjs 15.x rules that landed in master when refactor: webpack 5.x #938 got merged – rebasing this PR should help (but ok to ignore it for now) -
resolveToPermalink
andresolveToImmutableIpfsPath
perform some expensive async operations and both return a promise. I've added missingawait
inea9128f
(#937) – should be fine now
(this type of bugs will be removed when we add typescript during rewrite required for What to do about Manifest V3 #666) -
It also includes cleanup of historical code which we no longer need, which I just realized makes this a bigger task. I'd say out of scope of this PR – created Replace ipfs.io with dweb.link #939 to track this separately.
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
8e4ab03
to
dff4a08
Compare
@lidel -- All items above taken care of, but two remaining concerns:
Do you mind having a look when you are able? Thank you! |
This makes path resolution to run asynchronously once, and then from cache, which makes UI snappy and not blocked by slow HTTP API. I also swapped labels on Copy X Path menu items to make them more useful for technical user (regular user will care about shareable/snapshot links). There was also change to the pin.ls API, which caused the "offline" state sometimes (instead of checking specific CID it listed ALL pinned blocks, which could take some time, during which UI was dead).
@jessicaschilling landed additional optimizations in b369846 and 6cc79cf – give it a spin in a spare moment :) Changes:
|
@lidel LGTM! Agree on "IPNS Path"/"IPFS Path" in the menu items - hover labels disambiguate this if need be. Please feel free to merge ... thank you so much! |
Closes #740.
This PR moves @DeedleFake's work originally in #745 to account for some significant changes to the codebase since then.
https://bafy..foo.ipfs.dweb.link/wiki/
/ipfs/bafy..foo/wiki/
Screenshots
Local page
🚨 🚨 Ordinary web2 page (this ain't right!):
Gateway page:
DNSLink page:
Final version (with updated labels):