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

API: add path support (navigation) #352

Merged
merged 7 commits into from
Sep 2, 2019
Merged

Conversation

ottodevs
Copy link
Contributor

@ottodevs ottodevs commented Jul 25, 2019

Changes
Added request handler to the wrapper, then handle path from there and finally connect API and slightly modify API-react to use this new handler from the observable

If you are modifying the external API of one of the modules, please remember to also change the documentation
Pending docs until some approval feedback / polish

  • I have updated the associated documentation with my changes
    TBD

@auto-assign auto-assign bot requested review from 2color and sohkai July 25, 2019 15:33
@welcome
Copy link

welcome bot commented Jul 25, 2019

Thanks for opening this pull request! Someone will review it soon 🔍

Copy link
Contributor

@sohkai sohkai left a comment

Choose a reason for hiding this comment

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

Looks good @ottodevs, the main thing is how we handle the path requests and changes.

Let me know if it's confusing and we can discuss in more detail :).

@@ -81,6 +77,9 @@ function AragonApi({

// network
api.network().subscribe(network => setNetwork(network || null)),

// path
api.path().subscribe(path => setPath(path)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Does a default value make sense here? Like a '' or '/'?

packages/aragon-wrapper/src/rpc/handlers/path.js Outdated Show resolved Hide resolved
packages/aragon-api/src/index.js Outdated Show resolved Hide resolved
packages/aragon-wrapper/src/index.js Outdated Show resolved Hide resolved
@stale stale bot added the abandoned label Aug 24, 2019
@aragon aragon deleted a comment from stale bot Aug 24, 2019
@stale stale bot removed the abandoned label Aug 24, 2019
@sohkai sohkai marked this pull request as ready for review September 1, 2019 22:37
@sohkai sohkai changed the base branch from apireact-path to master September 1, 2019 22:37
@sohkai
Copy link
Contributor

sohkai commented Sep 1, 2019

@ottodevs I've done a few things to this PR:

In particular, clients should now respond to pathIntents and set the corresponding app's path using wrapper.setAppPath() when allowing a request.


I've also started on a self isolated context for each app (AppContext), to hold observables and state that is not relevant for any other app or a client (see #361 (comment)).

@sohkai sohkai mentioned this pull request Sep 1, 2019
1 task
@sohkai sohkai changed the title First approach to integrate custom path using API API: add paths (navigation) Sep 1, 2019
@sohkai sohkai changed the title API: add paths (navigation) API: add path support (navigation) Sep 2, 2019
@sohkai
Copy link
Contributor

sohkai commented Sep 2, 2019

@bpierre I've also thought about if it made sense to pass along more than a string; perhaps we can pass a string and an optional object that contains client-specific behaviour.

Ideally asking to navigate to something like the email notifications would be more robust than harding coding the client's preferences query string into the path request.

But we can do this on a second iteration since this change would be backwards compatible with the current API.

Copy link
Contributor

@bpierre bpierre left a comment

Choose a reason for hiding this comment

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

LGTM 💥

@sohkai sohkai merged commit 897f7be into aragon:master Sep 2, 2019
@welcome
Copy link

welcome bot commented Sep 2, 2019

Congrats on merging your first pull request! Aragon is proud of you 🦅
Eagle gif

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.

3 participants