Giter VIP home page Giter VIP logo

w3ui's People

Contributors

alanshaw avatar dchoi27 avatar github-actions[bot] avatar gobengo avatar gozala avatar joaosa avatar joshjarr avatar olizilla avatar travis avatar wootch avatar yusefnapora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

w3ui's Issues

add headless infinite scroll component to `@w3ui/react-uploads-list`

it would be nice to have a headless component that used reload and next from the UploadsListProvider to make it easy for developers to implement an infinite scrolling uploads list.

I think it would look something like:

function SimpleInfiniteScroll(){
  return (
    <UploadsList>
      <InfiniteScrollList/>
    </UploadsList>
  )
}
function Upload({dataCID, carCID, uploadedAt, uploaderDID}){
  return (
    <div>
      {dataCID} was uploaded at {uploadedAt}
    </div>
  )
}

function SimpleInfiniteScroll(){
  return (
    <UploadsList>
      <InfiniteScrollList itemComponent={Upload}/>
    </UploadsList>
  )
}

add tests

UI testing! A very special hell that we should probably brave sooner than later.

We currently have a codesandbox integration configured that at least builds the example apps in CI.

We should add tests similar to the ones in the HeadlessUI component library, eg:

https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/components/combobox/combobox.test.tsx

Now that we have a bit of complexity in this library, some basic testing will probably make our lives easier down the road.

Broken uploads list

For the last 2 days, the react uploads list has been returning undefined for the dataCid and carCids. Some initial debugging of the network requests looks like the API is not returning the CIDs... has something recently changed?

Thanks for all of your hard work!

For reference, my code is here: http://github.com/codyzu/ipfs-drive

add a `react-ui` package with "customizable" components

Per #120 (comment) introduce a new package called react-ui that contains "customizable" components.

This work has started in #136 and @cmunns has a prototype for how the CSS-variable-based customization could work in #140

Components in this library will utilize the "headless" components from #145. Developers should be able to use them out of the box, and we should document the CSS variables they can use to customize the look and feel of the components when used in third party apps.

Various docs in various working states are confusing

(I'm describing my journey of trying to develop a Vue app during the UCAN build apps with IPFS workshop in the Hackerbase)

There's the fancy docs, which are:

  • missing the docs for the Provider
  • use an uploader variable which is not defined
  • use UploaderProviderInjectionKey.encodeFile which is called uploadFile in the latest library version

There's the github docs which

  • have the provider
  • have a bare-bones UI
  • are very different to the code I copied from the fancy docs

There's the codesandbox (linked in the fancy docs) which

  • work
  • are a bit more similar to the fancy docs, but also different variable names again and
  • much more UI stuff

Would be great to have a single source of truth ๐Ÿ˜…

Also, all docs are based on Vue 2 format, which is a bit sad for me ๐Ÿ˜‹ (but not bad per se)

Rename wallet to keyring

  • Rename in this repo
  • Rename in website repo
  • Republish modules to npm under new names
  • Add npm deprecation messages to @w3ui/wallet-core & @w3ui/*-wallet

react-uploader UploaderProvider breaks production Next.js apps

If I use UploaderProvider in a Next.js application it works fine in dev mode but breaks the app in production.

A very simple demonstration of this issue can be found in https://github.com/web3-storage/w3ui-swc-minify-bug - simply clone the repo and run npm install && npm run build && npm start to see the error.

I've tracked this down to something in the SWC minifier - as demonstrated on the fixed branch of the w3ui-swc-minify-bug repo the issue goes away if you disable SWC minification:

https://github.com/web3-storage/w3ui-swc-minify-bug/tree/fixed

I don't think there's anything for us to do about this - creating this issue to track the bug I'm about to file in the Next.js repository.

update w3console theme to align with that of w3ui

With these updates, we are hoping to target users who want to add uploads to their website (e.g., by dropping a widget in to their site)

Work will go into the new w3console repo that @travis is assembling now. (location currently unknown)

  • Make w3ui components default theme look like w3ui website (see below)
  • Rebuild w3console in latest version of w3ui, refine style to match w3ui default style
  • Use lessons learned in w3console layout to inform how w3ui monolithic components will look

example

Notes from @jchris
I like how the color shifts across the steps, it does a good job of saying step 1, 2, 3

maybe the drop target uploader and the list aren't on the screen on the same time in the monolithic component? like a link to the uploads list from the red screen, that minimizes (but doesn't hide) the drop target, and shows the upload list. color can shift to purple if that's not too extra.

This ticket relates to work found here: #120

add `prev` to UploadsListProvider context value

matching the next function that loads the next page of values, we should have a prev function that remembers the cursor of the page before the current one and navigates to it when prev is called.

this should be as simple as remembering the previous cursor in a new useState and using it in a new prev function that looks very similar to next

Uploads lost after unloadAndRemoveIdentity

Hello,

I built a simple application based on our work at your NodeConf workshop (great workshop, by the way!).

Repo: https://github.com/codyzu/ipfs-drive
Deployed application: https://codyzu.github.io/ipfs-drive

I have a simple login/logout workflow. Login uses registerAndStoreIdentity and logout uses unloadAndRemoveIdentity .

Workflow

Login + verify email
Add uploads
Logout
Login + verify email

Expected behavior

I expected to see my uploads after logging out and then back in.

Actual behavior

Every time I logout and then login, all of my uploads are "lost".

Observations

Every time I login, I am assigned a new signing key DID. I assume this has something to do with why the upload list disappears.

Is this the expected behavior? If I compare it to the web3.storage web interface, if I logout then login (conceptually this feels like the same workflow), my uploads remain.

Maybe I have too much of a web 2.0 perspective. However, I would still expect if I logged in with 2 different devices, that I would see the same uploads. This does not appear to be the case.

Can you help me understand what is happening? Thanks! Sorry, I would have posted this discord, but I wasn't able to access the server (#101 )

Refactor react uploads list component?

This is currently implemented as a provider, but it may be more flexible to implement this similar to the solid component - a "resource" that takes an identity.

Update w3ui website examples

The code snippets on the website need updating. They are simplified, and mostly just have styles removed, but also have some code simplifications to make it as easy as possible to understand.

refs #117

CID component

Any app that makes use of IPFS is likely to render CIDs.

I was thinking it would be nice to create a CID component that has the following features:

  • Can render a short version of the CID, e.g. bafy...hmfm
  • Copy to clipboard
  • Link to gateway(s)

Have youse considered anything like this?

is it possible to have a super-sugar API?

A couple of places in the app code that smell like they could be tucked in:

AuthProvider UploaderProvider UploadsListProvider IdentityLoader

<AuthProvider>
      <UploaderProvider>
        <UploadsListProvider>
          <IdentityLoader>

Also here:

Screen Shot 2022-11-04 at 1 57 46 PM

import { useUploader } from '@w3ui/react-uploader'
import { useUploadsList } from '@w3ui/react-uploads-list'
import { withIdentity } from './components/Authenticator'

I think the fix would be to have a monolithic upload component that includes login automatically, and has an easy way to enable lists with custom markup. Also we need to include the Authenticator so no one has to write it.

I like the withIdentity style of wrapping ContentPage, maybe we can make a monolithic withUploader?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.