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: adds space-finder autocomplete combobox #268

Merged
merged 10 commits into from
Jan 19, 2023
Merged

feat: adds space-finder autocomplete combobox #268

merged 10 commits into from
Jan 19, 2023

Conversation

olizilla
Copy link
Contributor

Riffing on #266

w3console

travis and others added 7 commits January 17, 2023 21:43
this displays 42 spaces on my localhost, which makes sense... I guess? but I'm getting an error calling setCurrentSpace:

```
agent.js:361 Uncaught (in promise) Error: Agent has no proofs for [object Object].
    at _Agent.setCurrentSpace (agent.js:361:13)
    at setCurrentSpace (Keyring.tsx:92:17)
```

@olizilla handing the baton to you!
Sometimes a space fails to register - before this patch if you
clicked on one of those spaces it would look like you logged
out.

With these changes we now give the user an opportunity to
register the space so that they can start uploading files to it.
take a slightly different approach from the other stories - wrap
SpaceList in a component specifically made for StoryBook testing
that passes values to a Context Provider and renders the component
under test inside the Provider.

This lets us craft an interface in StoryBook that will make sense
to designers and other folks.
- add a space-finder combobox based on https://headlessui.com/react/combobox
- updates w3console layout to look fancy

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
@jchris
Copy link
Contributor

jchris commented Jan 19, 2023

@cmunns just want to get your eye on this animation of the new space picker UI 😀

return (
<div className={className}>
<Combobox value={selected} onChange={setSelected} by={(a, b) => a.sameAs(b)}>
<div className="relative mt-1">
Copy link
Member

Choose a reason for hiding this comment

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

I'm down to merge this as-is, but just a note that we'll need to translate this Tailwind styling to CSS-variable-based styling before we ship this package for real

export function SpaceFinder ({ spaces, selected, setSelected, className }) {
const [query, setQuery] = useState('')

console.log('space', query, selected)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log('space', query, selected)

we don't actually need to change the signature of registerSpace (though it's a bit inconvenient - more on that later) and my TODOs aren't needed anymore
sweet sweet conformance
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 19, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ed1e2d1:

Sandbox Source
@w3ui/example-react-file-upload Configuration
@w3ui/example-react-sign-up-in Configuration
@w3ui/example-react-uploads-list Configuration
@w3ui/example-solid-file-upload Configuration
@w3ui/example-solid-sign-up-in Configuration
@w3ui/example-solid-uploads-list Configuration
@w3ui/example-vue-file-upload Configuration
@w3ui/example-vue-sign-up-in Configuration
@w3ui/example-vue-uploads-list Configuration

@travis travis linked an issue Jan 19, 2023 that may be closed by this pull request
@travis
Copy link
Member

travis commented Jan 19, 2023

chatted with @olizilla out of band to double check he's happy with my changes in here - good to merge!

@travis travis merged commit 3dcd647 into main Jan 19, 2023
@travis travis deleted the space-finder branch January 19, 2023 21:59
travis added a commit that referenced this pull request Feb 2, 2023
🤖 I have created a release *beep* *boop*
---


##
[2.1.0](keyring-core-v2.0.1...keyring-core-v2.1.0)
(2023-02-02)


### Features

* adds space-finder autocomplete combobox
([#268](#268))
([3dcd647](3dcd647))
* delegate access to spaces
([#293](#293))
([441d757](441d757))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis@dag.house>
travis added a commit that referenced this pull request Feb 3, 2023
🤖 I have created a release *beep* *boop*
---


##
[2.1.1](keyring-core-v2.1.0...keyring-core-v2.1.1)
(2023-02-03)


### Features

* add `sameAs` function to compare spaces by DID ([#268](#268)) ([3dcd647](3dcd647))
* fix bug in `name` function ([#268](#268)) ([3dcd647](3dcd647))
* add createDelegation function to delegate access to spaces ([#293](#293)) ([441d757](441d757))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis@dag.house>
travis pushed a commit that referenced this pull request Mar 23, 2023
🤖 I have created a release *beep* *boop*
---


## 1.0.0 (2023-03-23)


### ⚠ BREAKING CHANGES

* use new account model
([#400](#400))

### Features

* add terms of service page
([#417](#417))
([6deb24d](6deb24d))
* adds space-finder autocomplete combobox
([#268](#268))
([3dcd647](3dcd647))
* allow users to set page size in W3APIProvider
([#308](#308))
([814a293](814a293))
* club tropical w3 auth boxen
([#350](#350))
([2266eb2](2266eb2))
* delegate access to spaces
([#293](#293))
([441d757](441d757))
* import a space into w3console
([#309](#309))
([a69a95b](a69a95b))
* Improve upload component flow
([#285](#285))
([ba9a3bf](ba9a3bf))
* publish console to IPFS & Cloudflare from CI
([#287](#287))
([e2a833e](e2a833e))
* Storybook story improvements
([#294](#294))
([e0de2cc](e0de2cc))
* use new account model
([#400](#400))
([66dd20b](66dd20b))
* w3console example app
([#255](#255))
([df08029](df08029))


### Bug Fixes

* add _headers ([#418](#418))
([4eb1da1](4eb1da1))
* fix w3console styling
([#320](#320))
([74a298c](74a298c))
* remove authenticator class when registed
([#352](#352))
([3668f3b](3668f3b))
* w3console polish
([#284](#284))
([9a67365](9a67365))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
alanshaw pushed a commit that referenced this pull request Nov 28, 2023
🤖 I have created a release *beep* *boop*
---


## 1.0.0 (2023-11-28)


### Features

* adds space-finder autocomplete combobox
([#268](#268))
([3dcd647](3dcd647))
* allow users to set page size in W3APIProvider
([#308](#308))
([814a293](814a293))
* club tropical w3 auth boxen
([#350](#350))
([2266eb2](2266eb2))
* Customizable UI components
([#208](#208))
([0a776fe](0a776fe))
* implement reverse paging
([#381](#381))
([10f059a](10f059a))
* Improve upload component flow
([#285](#285))
([ba9a3bf](ba9a3bf))
* simplify ([#591](#591))
([d1dfdf0](d1dfdf0))
* Storybook story improvements
([#294](#294))
([e0de2cc](e0de2cc))


### Bug Fixes

* fix w3console styling
([#320](#320))
([74a298c](74a298c))
* remove authenticator class when registed
([#352](#352))
([3668f3b](3668f3b))
* w3console polish
([#284](#284))
([9a67365](9a67365))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
travis pushed a commit that referenced this pull request Nov 30, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](react-v1.1.1...react-v1.2.0)
(2023-11-30)


### Features

* add a logout function
([#595](#595))
([0995fd5](0995fd5))
* adds space-finder autocomplete combobox
([#268](#268))
([3dcd647](3dcd647))
* allow users to set page size in W3APIProvider
([#308](#308))
([814a293](814a293))
* club tropical w3 auth boxen
([#350](#350))
([2266eb2](2266eb2))
* Customizable UI components
([#208](#208))
([0a776fe](0a776fe))
* implement reverse paging
([#381](#381))
([10f059a](10f059a))
* Improve upload component flow
([#285](#285))
([ba9a3bf](ba9a3bf))
* simplify ([#591](#591))
([d1dfdf0](d1dfdf0))
* Storybook story improvements
([#294](#294))
([e0de2cc](e0de2cc))


### Bug Fixes

* fix w3console styling
([#320](#320))
([74a298c](74a298c))
* homepage URL in package.json
([1229119](1229119))
* remove authenticator class when registed
([#352](#352))
([3668f3b](3668f3b))
* w3console polish
([#284](#284))
([9a67365](9a67365))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

add space picker to w3console
3 participants