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

Fixes #1421: Add "delete server" button to connect dialog #3159

Merged

Conversation

pljones
Copy link
Collaborator

@pljones pljones commented Aug 28, 2023

Short description of changes

Adds a "delete server" tool button to the connect dialog, in the same style as the server dialog, to delete the currently selected server. There's no "undo".
image

Selected server gets deleted. Next server in list is then current in field. On exit, the updated list is saved.

CHANGELOG: Client: Add "delete server" button to connect dialog

Context: Fixes an issue?

Fixes #1421

Does this change need documentation? What needs to be documented and how?

Yes - screenshots and translation strings need updating.

Status of this Pull Request

Tested locally and appears to work as expected.

What is missing until this pull request can be merged?

Code and UI review.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@pljones pljones added this to the Release 3.11.0 milestone Aug 28, 2023
@pljones pljones self-assigned this Aug 28, 2023
@pljones pljones force-pushed the feature/1421-delete-saved-servers branch 2 times, most recently from 46a895f to e55f69e Compare August 28, 2023 12:30
@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from e55f69e to 23ac5a7 Compare September 5, 2023 17:28
@ann0see
Copy link
Member

ann0see commented Sep 10, 2023

@gilgongo Could you please comment on the UX here? How can we avoid confusion with the connect button?

src/connectdlg.cpp Outdated Show resolved Hide resolved
src/connectdlg.cpp Outdated Show resolved Hide resolved
@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from 23ac5a7 to e655609 Compare September 12, 2023 16:40
@softins
Copy link
Member

softins commented Sep 12, 2023

@gilgongo Could you please comment on the UX here? How can we avoid confusion with the connect button?

Personally, I would prefer something like a red X instead of a black backspace symbol.

@pljones
Copy link
Collaborator Author

pljones commented Sep 12, 2023

Personally, I would prefer something like a red X instead of a black backspace symbol.

Should we change the Server UI, too? (I didn't find a button with a red X on any more meaningful (I think "stop" or "wrong" rather than "delete") - though I admit the symbol chosen isn't particularly obvious.)

@ann0see
Copy link
Member

ann0see commented Sep 12, 2023

If it's changed here, it should be changed everywhere

src/connectdlg.cpp Outdated Show resolved Hide resolved
@softins
Copy link
Member

softins commented Sep 12, 2023

Personally, I would prefer something like a red X instead of a black backspace symbol.

Should we change the Server UI, too? (I didn't find a button with a red X on any more meaningful (I think "stop" or "wrong" rather than "delete") - though I admit the symbol chosen isn't particularly obvious.)

Ah, I hadn't remembered it is already used in the Server UI (I so seldom use a server with a GUI!)

@pljones
Copy link
Collaborator Author

pljones commented Sep 12, 2023

Ah, I hadn't remembered it is already used in the Server UI (I so seldom use a server with a GUI!)

Yeah, it means "clear field" there (where the user can't directly type into the field), so there is a distinction.

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from e655609 to 56fae59 Compare September 12, 2023 17:34
@ann0see
Copy link
Member

ann0see commented Sep 13, 2023

@pljones
Copy link
Collaborator Author

pljones commented Sep 13, 2023

As it says on the last reference, "X" tends to imply cancel - rather than remove or delete. So I'm not keen on anything looking just like an "X". The character I've used is called "erase to the left", which is - essentially - what it does. https://www.fileformat.info/info/unicode/char/232b/index.htm

@ann0see
Copy link
Member

ann0see commented Sep 13, 2023

Agree. You just don't see that often.

@ann0see
Copy link
Member

ann0see commented Sep 14, 2023

Just a behavioral discussion point: If the entry is emptied with backspace, and then the new button is clicked, we jump to another entry from the list. I wouldn't expect that. Maybe the button should be grayed out then? Or just do nothing?

@ann0see
Copy link
Member

ann0see commented Sep 14, 2023

(Also if we add this, the UX should be the same for custom directories, I'd say.)

@pljones
Copy link
Collaborator Author

pljones commented Sep 15, 2023

(Also if we add this, the UX should be the same for custom directories, I'd say.)

That would want a separate issue raised... though I agree. The existing solution is inelegant.

@pljones
Copy link
Collaborator Author

pljones commented Sep 15, 2023

Just a behavioral discussion point: If the entry is emptied with backspace, and then the new button is clicked, we jump to another entry from the list. I wouldn't expect that. Maybe the button should be grayed out then? Or just do nothing?

"Do nothing" is possible -- currently the redisplay happens anyway (as if the connect window had been closed then opened again).

I'd rather not have to catch every update to the text in the field and decide whether or not to disable the button.

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from 56fae59 to bd682e5 Compare September 18, 2023 18:04
@ann0see
Copy link
Member

ann0see commented Sep 18, 2023

Ok. Then I think the do nothing should be implemented.

Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

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

Seems to work fine now.

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from bd682e5 to 60e8240 Compare September 19, 2023 17:22
@pljones
Copy link
Collaborator Author

pljones commented Sep 19, 2023

Ok. Then I think the do nothing should be implemented.

Done.

@pljones
Copy link
Collaborator Author

pljones commented Sep 23, 2023

Here's a comparison with the "Clear text" button in Calibre:
image
which, I think, is close enough to the glyph used here (inverse colours, bold text, maybe - and overlayed in the input box, which could be fun to replicate in Qt). (The button disappears when the field is empty.)

@pljones
Copy link
Collaborator Author

pljones commented Sep 24, 2023

Oh, and apparently Qt Designer uses the same glyph. I wonder where it gets it...
image

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch 3 times, most recently from 098584d to c349d19 Compare October 29, 2023 11:58
@pljones
Copy link
Collaborator Author

pljones commented Oct 29, 2023

Reverting to 10c5931, pretty much, but with width 24, bold and using the unicode glyph directly.

Linux local builds: QMake version 3.1, Qt version 6.6.0 and Qt version 5.15.2
and
Linux github artifact: Qt version 5.9.5
image
image
Server address drop down and new button same height. The text colour doesn't match the drop down arrow colour, unfortunately -- and, from what I can see in the manual, you can't refer to the widget colours, so I'd have to hard code it, which would break Qt theming.

Windows github artifact:
(My Windows local builds for Qt 6.6.0 crash out.)
image
image
image
Not perfect but close.


Given that Qt seems unable to provide a consistent, cross-platform experience for this, we're going to have to compromise.

@ann0see
Copy link
Member

ann0see commented Nov 1, 2023

BTW: can you look at your git configuration? I believe something is wrong with your GPG key.

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from c349d19 to 327a07f Compare November 2, 2023 18:27
@pljones
Copy link
Collaborator Author

pljones commented Nov 2, 2023

BTW: can you look at your git configuration? I believe something is wrong with your GPG key.

I've been trying to fix it... I know why it broke, just too long since I first got it working to remember what needs doing.

@ann0see
Copy link
Member

ann0see commented Nov 6, 2023

I believe it's in GitHubs' documentation about GPG keys.

@pljones
Copy link
Collaborator Author

pljones commented Nov 9, 2023

I believe it's in GitHubs' documentation about GPG keys.

Not the bit I needed... I don't know if I've fixed it until I create a new commit, though...

@pljones pljones force-pushed the feature/1421-delete-saved-servers branch 2 times, most recently from 30b2024 to 1281d3a Compare December 14, 2023 18:00
@pljones pljones force-pushed the feature/1421-delete-saved-servers branch from 1281d3a to d5d1ab0 Compare January 14, 2024 10:24
@softins
Copy link
Member

softins commented Jan 16, 2024

@pljones what's the current status of this? I've just built it on my Pi and it seems to work fine.

I noticed that the branch pljones/feature/add-tooltips-to-connectdlg contains additions to this PR that haven't been pushed to it yet. Is it planned to add them before merging?

I also happened to notice that in Settings / Advanced Setup there is a combi-box with drop-down for multiple Custom Directories that could usefully have a similar button. I currently have two entries in that list, with no way I can see to remove one of them.

EDIT: I've just discovered that in the Custom Directories drop-down, I can backspace over the entry I don't want, and then click on the drop-down arrow, and the entry does get removed from the list. However, the same trick didn't work in the Connect dialog.

@ann0see
Copy link
Member

ann0see commented Jan 16, 2024

I believe it's ok except for the button. But it's not too important.

@pljones
Copy link
Collaborator Author

pljones commented Jan 16, 2024

EDIT: I've just discovered that in the Custom Directories drop-down, I can backspace over the entry I don't want, and then click on the drop-down arrow, and the entry does get removed from the list. However, the same trick didn't work in the Connect dialog.

Yes, this was the requested method for the Custom Directories drop-down, with a separate, different requested method for the Connect dialog. I think it would better if they both worked the same, but this request is only about the Connect dialog and, if the Custom Directories drop-down needs changing, that needs a new issues/PR raised.

@ann0see ann0see added the needs documentation PRs requiring documentation changes or additions label Feb 12, 2024
@ann0see
Copy link
Member

ann0see commented Feb 12, 2024

Probably going to approve it like this. I'm a bit unsure about the UX though the backspace icon is used in the server too, but maybe there's something clearer.

@ann0see ann0see merged commit e462529 into jamulussoftware:main Feb 12, 2024
11 checks passed
@ann0see
Copy link
Member

ann0see commented Feb 12, 2024

However, the same trick didn't work in the Connect dialog.

@softins @pljones could you please open an issue on that?

@pljones
Copy link
Collaborator Author

pljones commented Feb 12, 2024

@softins @pljones could you please open an issue on that?

Done.

@pljones pljones deleted the feature/1421-delete-saved-servers branch February 12, 2024 19:52
@pljones pljones removed the needs documentation PRs requiring documentation changes or additions label Aug 4, 2024
@pljones
Copy link
Collaborator Author

pljones commented Aug 4, 2024

jamulussoftware/jamuluswebsite#1002 raised for documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add option to delete stored servers from combo lists
4 participants