-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat:(label) Improved address label user experience #1978
Conversation
✅ Deploy Preview for specter-desktop-docs canceled.
|
Awesome! Looks really good! LGTM! |
We are trying to support Firefox and Chrome/Chromium, so my tests are with both: Chrome: Not fixed yet Updat: Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not working on Firefox yet.
@@ -40,6 +40,9 @@ | |||
border: 1px solid var(--main-color); | |||
background: var(--cmap-border); | |||
} | |||
tr { | |||
vertical-align: center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vertical-align: center; | |
vertical-align: middle; |
not sure whether it changes anything to have this - in any case center is an invalid property for vertical-align
I wanted to add proper backend validation / error handling at wallets api endpoint to ensure consistency between front end changes and the backend. Following the code I can see that we use rpc calls (setlabel and listlabels) in |
…ecter-desktop into improved-address-labels
.label { | ||
word-break: break-all; | ||
background: none; | ||
color: #fff; | ||
font-size: 1em; | ||
max-width: 80%; | ||
outline: none; | ||
margin-top: 1px; | ||
margin-left: 2px; | ||
white-space: nowrap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ecter-desktop into improved-address-labels
Short video on the changes in d5a0c16 (not seen in the video is that if the label is empty it can still be saved, makes kind of sense since we have logos and perhaps someone just wants to have the logo): |
@otkstdio please have a look at my changes. If okay, could you do the two remaining tasks:
|
@relativisticelectron could you do a quick test? |
@moneymanolis All fixed 👍 |
@otkstdio can you have a look at electron's points? |
I think we need a solution to the label being too long in another PR (one I'm working on). This is certainly a problem but it needs to be fixed in the context of the table not being able to handle all sized inputs, not just the label. I think we'll need the ability to scroll horizontally in tables with extended data points. Also, what's the use case of having a label of an address the same as the address? I'd hope users wouldn't actually do this as labels are effectively human readable descriptors to reflect the not-so-human-readable address, not the address itself. When it comes to clicking on other elements, I suspect this would show the user intent of cancelling the editing process and thus not updating the label. Would you agree? |
On master long labels are wrapped to multiple lines, such that all columns stay visible. I think this is the desirable behavior.
Yes. |
@otkstdio I'd also say let's keep the wrapping of the addresses for now and change that once you came up with a more general solution that you were mentioning above:
|
Some more issues:
As for the long label with multisig address, I'd suggest to change the default label of the address by sth. like "External address", see screenshot above? @relativisticelectron what do you think?
|
As for
I know. @otkstdio will take care of that in his first or second round of CSS revamp.
|
@relativisticelectron could you please test again? |
Sorry, but it still doesn't work. Moving with left-right arrow keys works, but not with the mouse. |
@relativisticelectron but this is intended / normal in the selection all that we use. Please test by removing the whole selection and then type sth. and by using the arrows and add sth. for example. |
I expect an editable field to work not only with the keyboard but also with the mouse. The wallet-name edit function works as I would expect an editable field to work:
Yes, spacebar works as intended. |
The relevant lines are (in the
The idea behind this is, that you usually want to replace the default label in the addresses (sth. like Address #5) completely and the above lines make this easier. Perhaps we can check whether this is the first click on the label (enabling the editing and thus use select all) and then the next clicks are not selecting all anymore. UPDATE: Implemented in b4f1abf - @relativisticelectron - perhaps one last check? |
I see, From GPT: I am using stopPropagation now on all click event handler in the component so the global one is not even receiving the event and it also makes checking where the click originated from in the global listener obsolete. @relativisticelectron that should have fixed your last point. Thanks a lot for the rigorous testing! |
@relativisticelectron can I merge? |
I am merging this now and will directly open an issue with @relativisticelectron input to deal better with long labels. |
New label UX for easier labelling and cleaner UX. Targeting this issue #1922
Screen.Recording.2022-11-17.at.2.03.05.PM.mov