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

Create paths for add things and add log #2941

Open
flatsiedatsie opened this issue Jul 14, 2022 · 1 comment
Open

Create paths for add things and add log #2941

flatsiedatsie opened this issue Jul 14, 2022 · 1 comment
Labels

Comments

@flatsiedatsie
Copy link
Contributor

It would be great if visiting /things/add or /things/newwould be a working link to the add things page.

Currently there is no way for addons to link directly to the "add new things" page. The user has to go to the things overview, and then click on the (+) button. (If there is a way to open the page through JS for addons then I'm all ears).

With this in mind perhaps /things/add_thing and /things/add_group would be better.

Maybe similar paths for /logs/add could exist?

For rules this already works; it's possible to visit /rules/new

@benfrancis
Copy link
Member

benfrancis commented Jul 22, 2022

I generally try to avoid verbs in URLs in order to keep them RESTful. Opening the form using JavaScript sidesteps the issue of choosing a URL for the add thing form, but I'm not sure if that's possible from an add-on.

If a URL really is needed then /things/new is probably better than /things/add because "new" is a not a verb and makes a bit more sense as the name of a resource. I'm guessing that would need to be implemented in the client-side router.

One other thing to be aware of is what happens when you click the back button from the add thing/add log form, i.e. whether it goes back to the things/logs page, or back to the add-on's UI.


User story: As an add-on developer, I want to be able to link to the forms to create a thing or log so that I can link to the existing forms from my add-on UI, rather than having to create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants