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

fix: issues with using in ESM webui #356

Closed
wants to merge 9 commits into from

Conversation

SgtPooki
Copy link
Member

This PR addresses a few issues seen when using ipld-explorer-components in webui with kubo-rpc-client

see comments in ipfs/ipfs-webui#2079 for details

Copy link
Member Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

src/bundles/explore.js Outdated Show resolved Hide resolved
SgtPooki added a commit to ipfs/ipfs-webui that referenced this pull request Feb 16, 2023
@SgtPooki SgtPooki requested a review from lidel February 16, 2023 21:10
Copy link
Contributor

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

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

nits, but not blockers.

src/bundles/explore.js Outdated Show resolved Hide resolved
Comment on lines 195 to 201
const formats = formatImports.map((actualModule) => {
if (actualModule.util == null) {
// actualModule has no util. using blockcodec-to-ipld-format
return convert(actualModule)
}
return actualModule
})
Copy link
Contributor

Choose a reason for hiding this comment

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

can this convert method handle if util exists or not?

Copy link
Member Author

Choose a reason for hiding this comment

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

it cannot, unfortunately. though it probably should do some assertion on the format and return untouched if it matches the expected format.

Copy link
Member Author

Choose a reason for hiding this comment

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

src/components/object-info/ObjectInfo.js Outdated Show resolved Hide resolved
Copy link
Contributor

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

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

For consistency and lack of TS

* * https://github.com/ipld/js-blockcodec-to-ipld-format/blob/master/src/index.js#L38-L55
*/
options.resolve = (buf, path = '') => {
let value = actualModule.decode(buf)
Copy link
Contributor

Choose a reason for hiding this comment

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

ugh, JS, does this need to be awaited?

Copy link
Member Author

@SgtPooki SgtPooki Mar 13, 2023

Choose a reason for hiding this comment

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

I don't believe so based on the modules i've seen

src/bundles/explore.js Show resolved Hide resolved
src/bundles/explore.js Show resolved Hide resolved
src/bundles/explore.js Show resolved Hide resolved
src/bundles/explore.js Outdated Show resolved Hide resolved
src/bundles/explore.js Show resolved Hide resolved
src/bundles/explore.js Show resolved Hide resolved
SgtPooki added a commit to ipfs/ipfs-webui that referenced this pull request Mar 13, 2023
* feat!: ipfs-http-client -> kubo-rpc-client

fix: error rendering peerId

fix: peers table on peerspage

fix: statusPage -> advanced -> addresses

fix: most e2e tests working with kubo-rpc-client

chore: update to go-ipfsv0.18.1

* chore: fix key.gen with patch

needed until kubo-rpc-client fix is merged

see ipfs/js-kubo-rpc-client#143
see ipfs/js-kubo-rpc-client#145

* fix: use ipld-explorer-components patch temporarily

see https://github.com/ipfs/ipfs-webui/issues/2079\#issuecomment-1426219633
see #2079 (comment)

must use until ipfs/ipld-explorer-components#356

* chore: fix ipld-explorer-components patch

not needed once ipfs/ipld-explorer-components#356 is merged

* test: add tests to explore.test.js

* tmp: trying to navigate the undocumented world of parsing CIDs

* chore: working on getting tests fully tied up

* test(e2e): finish updating explore.test.js

* chore: lint fixes

* chore: remove debugging code

* test: test clicking children links on explore page

* tmp: fix children explore views

* test: e2e explore test traverses children

* Update test/e2e/explore.test.js

Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* chore: address PR comments

---------

Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
@SgtPooki SgtPooki requested a review from whizzzkid March 13, 2023 18:14
Copy link
Contributor

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

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

Thanks!

@SgtPooki
Copy link
Member Author

SgtPooki commented Jul 3, 2023

closing this because #360 removes the need for this

@SgtPooki SgtPooki closed this Jul 3, 2023
@SgtPooki SgtPooki deleted the fix/kubo-rpc-client-in-webui branch July 3, 2023 19:45
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.

2 participants