-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[BOUNTY] Directory page UI improvements #7536
Conversation
This comment has been minimized.
This comment has been minimized.
Thanks, @neatonk! @aschmahmann -- can you please have a look as you're able? |
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.
@neatonk are you able to provide steps for testing your changes with real go-ipfs?
I tried:
- updated
.gitmodule
to point at your fork - checked out version from [BOUNTY] Directory page UI improvements dir-index-html#38:
$ cd assets $ git -C dir-index-html checkout c5d042ac5fd9c15631f95c6656e686a65f9f65ba
- regenerated assets via
go generate .
- rebuilt go-ipfs
- Opened
/ipfs/QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm/
from local gateway
And... I don't see the CID column described in ipfs/dir-index-html#38.
Am I missing anything?
@lidel I think you need to actually commit the submodule change or the generate step will not use it. |
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.
Ack, after commiting I had to run go generate .
again and then was able to build it – thanks @neatonk 👍
Found some bugs when loading listing via subdomain gateway:
For test URL http://bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y.ipfs.localhost:8080/1%20-%20Barrel%20-%20Part%201 none of newly added links work correctly because they use content paths under subdomain:
To illustrate:
- http://bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y.ipfs.localhost:8080/ipfs/bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y/1%20-%20Barrel%20-%20Part%201 is broken because it should point at either:
- http://localhost:8080/ipfs/bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y/1%20-%20Barrel%20-%20Part%201 (preferred – will redirect user to correct subdomain)
- or http://bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y.ipfs.localhost:8080/1%20-%20Barrel%20-%20Part%201 (fine, but previous one is better)
Thanks @lidel! I'll update the links. |
@lidel, looks like this is ready for your review when you're able. Thanks! |
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.
Thank you @neatonk, listings on subdomains now work as expected, I also tested DNSLink gateway mode and works fine too 👍
Overall lgtm from functional perspective, but found small nits that need to be addressed (details inline)
Summary:
- 💚 http://bafybeihfg3d7rdltd43u3tfvncx7n5loqofbsobojcadtmokrljfthuc7y.ipfs.localhost:8080/
- 💚 http://ipfs.io.ipns.localhost:8080/images (but 💔 for
/ipns/
being a broken link) - 💚
curl -H "Host: ipfs.io" -sD - "http://127.0.0.1:8080/images"
(DNSLink gateway) - 💔 http://bafybeig2ed6fx4mzkgopqafswqgjclffnscfphwsjmajt2otat5wc2zaim.ipfs.localhost:8080/foo/ipfs/bar (false-negative for subdomain breadcrumb)
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.
Looks good so far! 💔 from my previous comment turned 💚 👍
Next steps for the bounty:
- ✅ review and merge [BOUNTY] Directory page UI improvements dir-index-html#38
- ✅ reconcile dir-index.html and dir-index-uncat.html: Reconcile dir-index.html and dir-index-uncat.html dir-index-html#39
- ✅ release dir-index-html
- switch this PR to updated dir-index-html
- fix anything that breaks, eg. tests that match plain text without breadcrumb links (examples)
Not a part of the bounty, could be a separate PR:
- add
test/sharness/t0115-gateway-dir-index.sh
(example)- ensure dir-index includes proper size, hashes, and breadclumb links in path gateway and subdomains
- guard subdomain edge cases described in [BOUNTY] Directory page UI improvements #7536 (review)
ipfs/dir-index-html#39 takes care of reconciling Regarding @lidel's comment above,
@neatonk, not sure if adding that test is something you'd be interested in? |
@neatonk @lidel Release 1.1.0 is available now, added some checkmarks to the list above: https://github.com/ipfs/dir-index-html/releases/tag/v1.1.0 |
Heads up: ipfs/dir-index-html#40 introduces a build script that, if it's the approach we want to take, may be worth cutting a new release for and using here (if only for efficiency). |
I'd argue for leaving ipfs/dir-index-html#40 out of this PR for simplicity. |
I will not be able to commit to adding |
@lidel I've updated this PR to use dir-index-html@v1.1.0 and fixed the gateway tests which match on the "Index of" lines. Apologies for not having time to add the sharness tests you mentioned. |
New https://github.com/ipfs/dir-index-html/releases/tag/v1.2.0 should be applicable to straight-out sub in to this PR without any modifications, per ipfs/dir-index-html#40 (review) -- @lidel, up to you whether you want to do so. Thanks! |
Switched to dir-index-html v1.2.0, will add quick sharness tests shortly. |
This adds subdomain tests for breadcrumbs added in: ipfs#7536 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
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.
All green, thank you @neatonk for this contribution! ❤️
Listing CIDs next to files and clicable breadcrumbs will not only improve experience of everyday use for a lot of people, but more importantly, enable learning-by-exploration.
@aschmahmann I believe this is ready for your review. Most of the changes happened in assets/dir-index-html
subdmodule, see ipfs/dir-index-html#38
Preview:
@neatonk - sent you a note re bounty! |
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 looks great, thanks all for making this happen. @lidel I noticed some issues while trying to generate the bindata locally. It looks like we had an issue #7605 which @Stebalien fixed.
Do you mind rebasing on master and running go generate on the two commits that bump the submodule? I was going to do it myself and forcepush, but want to double check that we actually get the same results before merging anyway.
This regenerates bindata as noted in ipfs#7536 (review) License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
This adds subdomain tests for breadcrumbs added in: ipfs#7536 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
@aschmahmann done! ready for your final take FYSA rebasing this PR is indeed tricky: good call on double-checking.
To avoid that problem, I went with |
@@ -45,6 +45,7 @@ commit. | |||
```bash | |||
> go generate . | |||
> git add bindata.go | |||
> git add bindata_version_hash.go |
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.
@lidel it looks like you forgot to run this while rebasing as I don't see any changes to the bindata_version_hash.go file.
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.
@Stebalien merged #7609 and I rebased on top and added the relevant files. @lidel if you could double check in the morning that things look right that'd be great.
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.
@aschmahmann retested locally and looks good, super happy about deterministic assets 👍
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.
absolutely, it also helped with the fact that different OSes would give different modes.
These changes are needed to prepare for the Directory page UI improvements implemented in ipfs/dir-index-html#37. - update dir-index-html type structs - emit gateway URL for root links - emit CID of each directoryItem - emit size of directory - emit breadcrumbs
https://github.com/ipfs/dir-index-html/releases/tag/v1.2.0 also: https://github.com/ipfs/dir-index-html/releases/tag/v1.1.0 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
This adds subdomain tests for breadcrumbs added in: ipfs#7536 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
[BOUNTY] Directory page UI improvements This commit was moved from ipfs/kubo@e80601b
These changes are needed to prepare for the Directory page UI improvements
implemented in ipfs/dir-index-html#38.
@jessicaschilling
@aschmahmann