oryanm / TrelloWidget

Android widget for Trello's lists
MIT License
61 stars 24 forks source link

Add a new card from the widget #37

Open lack opened 5 years ago

lack commented 5 years ago

I'd love a "quick add" button in the title-bar of the widget. It could open a little dialog that lets me add a card (by title only). The goal would not be to re-create trello's whole "add card" with all the features and additions and things, but just a quick thing for one-off ideas that I would then edit in trello later as I refined them.

lack commented 5 years ago

Here's what I mean by an add button in the title bar:

quickadd-button

lack commented 5 years ago

Here's my proof-of-concept for the add button. I actually have it fully coded and working:

quickadd-popup

Features:

lack commented 5 years ago

An interesting side-effect of this - I had to change the authentication a bit, as to do this kind of thing we need to start requesting write privileges.

I have this implemented and working, too, to a point. If you upgrade from a version that only has read privs, you need to logout and re-login to enable the new privs. If you click "add" and try to add a card before you've done this login/logout, the only error you get right now is a toast that tells you to login and logout again... Maybe this can be made better.

lack commented 5 years ago

I just reworked my change some, so that when you click the "add" button but we don't have write privs yet, it pops up a dialog:

image

Clicking "Cancel" just closes the dialog, and the widget functions as before (the add button can be hidden via on option screen toggle)

Clicking "OK" invalidates our cached login token and opens up the main activity where clicking the "Login" button will now request write access.

lack commented 5 years ago

FYI: Work-in-progress branch is here: https://github.com/lack/TrelloWidget/tree/add_button

oryanm commented 5 years ago

This is pretty cool. However,

I'll have to say no to this, even though it looks like you've put a decent amount of work into it.