datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Asking for a token splits important info into two different locations #340

Closed mih closed 1 year ago

mih commented 1 year ago

The input dialog just says "token", while in the command log it states "An access token is required for https://gin.g-node.org. Visit https://gin.g-node.org/user/settings/applications to create a token" -- which is much more useful, but in a different window in the background.

bpoldrack commented 1 year ago

Quick exploration suggests the issue is with datalad-next patching create_sibling_gh's _set_request_header. In core this calls ui.question with that message as the title (which seems to be handled fine in gooey), but the patch seems to go via CredentialManager.get.

Edit:

And there we go: CredentialManager.get splits into a ui.message for the prompting text and a ui.question.

bpoldrack commented 1 year ago

So, this is a two-part issue. Part one is, that CredentialManager splits those things - see https://github.com/datalad/datalad-next/pull/113

Part two is, that gooey's ui.question uses the title parameter as dialog title. This is intutive, but "wrong" as the title is meant for the prompting text. Addressing this next.