Skip to content

Remove confusing "Dust" label from coincontrol / sendcoins dialog#719

Merged
hebasto merged 2 commits into
bitcoin-core:masterfrom
theStack:gui-nuke_cc_dust_label
Jul 4, 2023
Merged

Remove confusing "Dust" label from coincontrol / sendcoins dialog#719
hebasto merged 2 commits into
bitcoin-core:masterfrom
theStack:gui-nuke_cc_dust_label

Conversation

@theStack
Copy link
Copy Markdown
Contributor

@theStack theStack commented Mar 13, 2023

In contrast to to all other labels on the coin selection dialog, the displayed dust information has nothing to do with the selected coins. All that this label shows is whether at least one of the outputs qualify as dust, but the outputs are set in a different dialog. (Even worse, the dust check is currently simply wrong because it only looks at an output's nValue and just assumes a P2PKH script size.)

As the label clearly doesn't help the user and is, quite the contrary, rather increasing confusion/misguidance, it seems sensible to remove it. The label from the sendcoins dialog is also removed with the same rationale. Additionally, the "bytes" and "change" labels are aligned to the left (second commit).

Closes #699.

@DrahtBot
Copy link
Copy Markdown
Contributor

DrahtBot commented Mar 13, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK furszy, hebasto
Concept ACK jarolrod, MarcoFalke, luke-jr

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@hebasto hebasto changed the title qt: remove confusing "Dust" label from coincontrol dialog Remove confusing "Dust" label from coincontrol dialog Mar 14, 2023
@hebasto hebasto added the Wallet label Mar 14, 2023
Copy link
Copy Markdown
Member

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the "Dust" label in the send screen? it is not being set anywhere.

image

@theStack theStack force-pushed the gui-nuke_cc_dust_label branch from 8b7c589 to 944263a Compare March 19, 2023 01:35
@theStack
Copy link
Copy Markdown
Contributor Author

@furszy: Thanks, good catch, completely missed that! Force-pushed to remove that as well. (FWIW, I do think having a dust label in the sendcoins dialog would be useful, but only if it is always displayed, independently of whether coin control is used).

Copy link
Copy Markdown
Member

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are here, could also align the "bytes" and "change" labels to left. Feel free to squash this:
furszy/bitcoin-core@53165e3

@theStack
Copy link
Copy Markdown
Contributor Author

theStack commented Mar 22, 2023

While you are here, could also align the "bytes" and "change" labels to left. Feel free to squash this: furszy/bitcoin-core@53165e3

Could you post a screenshot on how dialogs look before/after this change? On my end this doesn't change anything and the alignment seems to be fine even on master.
// EDIT: Nevermind, seeing it now in your posted screenshot above. Guess that it's more a matter of taste if we want to align around the colon (:) or left though. Added your commit, I think removing an item and moving another one are different enough to having it in separate commits.

Copy link
Copy Markdown
Member

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 394300c

Copy link
Copy Markdown
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 394300c

The commit message and the PR description should mention changes in the SendCoinsDialog as well.

Comment thread src/qt/forms/sendcoinsdialog.ui Outdated
<item>
<layout class="QFormLayout" name="formLayoutCoinControl1">
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't Qt::AlignLeading a synonym for Qt::AlignLeft?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too experienced with Qt, can anyone elaborate on that question (ping @furszy as author of the second commit)? It seems at least that we already have a couple of instances in master where both Qt::AlignLeading and Qt::AlignLeft are used together:

$ git grep AlignLeading
src/qt/forms/debugwindow.ui:              <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
src/qt/forms/helpmessagedialog.ui:        <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
src/qt/forms/helpmessagedialog.ui:            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
src/qt/forms/signverifymessagedialog.ui:          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems at least that we already have a couple of instances in master where both Qt::AlignLeading and Qt::AlignLeft are used together.

Quite sure that we have them because of QT creator setting the value automatically. Probably because there is some ancient qt version that doesn't have them as synonyms.

But for us, it should be fine to drop them, even qt 4.8 has them as synonyms (link).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@furszy: Thanks a lot for checking. I removed the redundant Qt::AlignLeading properties from the second commit, i.e. it's only Qt::AlignLeft remaining.

Copy link
Copy Markdown
Contributor

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, the changes to the UI file aside from removing the dust label are changing the positioning of the Titles relevant to the value. The screenshot below shows this with the "Bytes" and "Change" field. The fully visible text is master, and the slightly transparent text is the pr.

QA-change

@maflcko
Copy link
Copy Markdown
Contributor

maflcko commented Jun 8, 2023

Concept ACK

@luke-jr
Copy link
Copy Markdown
Member

luke-jr commented Jul 1, 2023

Concept ACK, but I see no change from the second commit. Only the coincontrol dialog's "Dust" field disappears - nothing else differs in my screenshots.

In contrast to to all other labels on the coin selection dialog, the
displayed dust information has nothing to do with the selected coins.
All that this label shows is whether at least one of the _outputs_
qualify as dust, but the outputs are set in a different dialog.
(Even worse, the dust check is currently simply wrong because it only
looks at an output's nValue and just assumes a P2PKH script size.)

As the label clearly doesn't help the user and is, quite the contrary,
rather increasing confusion/misguidance, it seems sensible to remove it.

Also, remove the label from the sendcoins dialog with the same rationale.
@theStack theStack changed the title Remove confusing "Dust" label from coincontrol dialog Remove confusing "Dust" label from coincontrol / sendcoins dialog Jul 3, 2023
@theStack theStack force-pushed the gui-nuke_cc_dust_label branch from 394300c to ef4185d Compare July 3, 2023 16:12
@theStack
Copy link
Copy Markdown
Contributor Author

theStack commented Jul 3, 2023

The commit message and the PR description should mention changes in the SendCoinsDialog as well.

Sorry for the late reply, missed that. Force-pushed with an adapted commit message (and changed PR title / description as well):

$ git range-diff 394300c18...ef4185d2b
1:  944263a93 ! 1:  210ef1e98 qt: remove confusing "Dust" label from coincontrol dialog
    @@ Metadata
     Author: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>

      ## Commit message ##
    -    qt: remove confusing "Dust" label from coincontrol dialog
    +    qt: remove confusing "Dust" label from coincontrol / sendcoins dialog

         In contrast to to all other labels on the coin selection dialog, the
         displayed dust information has nothing to do with the selected coins.
    @@ Commit message
         As the label clearly doesn't help the user and is, quite the contrary,
         rather increasing confusion/misguidance, it seems sensible to remove it.

    +    Also, remove the label from the sendcoins dialog with the same rationale.
    +
      ## src/qt/coincontroldialog.cpp ##
     @@ src/qt/coincontroldialog.cpp: CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
          QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
2:  394300c18 = 2:  ef4185d2b gui: send, left alignment for "bytes" and "change" label

@theStack theStack force-pushed the gui-nuke_cc_dust_label branch from ef4185d to a582b41 Compare July 3, 2023 16:41
Copy link
Copy Markdown
Member

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a582b41

@DrahtBot DrahtBot requested a review from hebasto July 4, 2023 13:27
Copy link
Copy Markdown
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. ACK a582b41.

@hebasto hebasto merged commit 7446cb1 into bitcoin-core:master Jul 4, 2023
@theStack theStack deleted the gui-nuke_cc_dust_label branch July 4, 2023 15:03
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 4, 2023
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing/misleading "Dust:" label in coin selection dialog

7 participants