TrelloWidget icon indicating copy to clipboard operation
TrelloWidget copied to clipboard

Add a new card from the widget

Open lack opened this issue 6 years ago • 6 comments

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 avatar Jul 26 '19 23:07 lack

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

quickadd-button

lack avatar Jul 26 '19 23:07 lack

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

quickadd-popup

Features:

  • Type in some text and click the "AT END" or "AT TOP" button, and a new card is created in the current list at either the top or the bottom, with the provided text as the title. The popup closes and the widget is refreshed - There's your new card.
  • Want to do more that just add a title? Enable "And open". After you click the "AT END" or "AT TOP" button, the card is created and then opened either in the Trello app or your browser. You can add a description, checklists, other users, etc.
  • Want to add a bunch of cards all at once? Enable the "Multiples" option. When you click "AT END" or "AT TOP", the dialog isn't closed - Instead it creates the new card and clears the "title" text entry box, ready for another.
  • Click the "X" button to close the dialog.

lack avatar Jul 26 '19 23:07 lack

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 avatar Jul 26 '19 23:07 lack

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 avatar Jul 27 '19 04:07 lack

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

lack avatar Jul 27 '19 04:07 lack

This is pretty cool. However,

  • I would prefer to keep the widget as a read-only thing and not expand the feature set to a point where it's now an app that is being developed in parallel to the official one. (Ideally if the guys at Trello got their act together and created a usable widget instead of what they currently offer, this widget will be "deprecated").
  • This arguably only saves you the couple of clicks of pressing the title to open the app and creating a card from there.
  • Plus the widget title is already looking a bit crowded with buttons.

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

oryanm avatar Oct 24 '19 14:10 oryanm