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

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

Closed
mih opened this issue Oct 14, 2022 · 2 comments · Fixed by #351
Closed

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

mih opened this issue Oct 14, 2022 · 2 comments · Fixed by #351
Assignees

Comments

@mih
Copy link
Member

mih commented Oct 14, 2022

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
Copy link
Member

bpoldrack commented Oct 14, 2022

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 bpoldrack self-assigned this Oct 14, 2022
bpoldrack added a commit to bpoldrack/datalad-next that referenced this issue Oct 14, 2022
In opposition to the `Credential`'s in datalad core, the
CredentialManager splits the prompting text and the input retrieval when
asking for a property or secret by calling `ui.message` and then
`ui.question`. While this is kinda fine with CLI, other `ui` backends
like gooey can't handle this properly (leading to
datalad/datalad-gooey#340).

The `title` parameter of `ui.question` is intended for the prompting
text, which is somewhat misleading by name.
@bpoldrack
Copy link
Member

So, this is a two-part issue. Part one is, that CredentialManager splits those things - see datalad/datalad-next#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.

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 a pull request may close this issue.

2 participants