-
Notifications
You must be signed in to change notification settings - Fork 384
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
fix(ui): improve "Add Tag" ux #784
Conversation
I had a recent UX thought on the "Create & Add" workflow, sometimes you'll type the tag name wrong, hitting enter brings up the create tag window. It would be great if hitting Esc in that case closes the create tag window and puts highlight back on the search input field Want me to make a separate issue for that or is it small enough to incorporate in this PR? |
This messes with the result order, child tags could show up before the parent tag, even if the tag is fully spelled out in the search |
Don't worry, I noticed that too with a few tags and drafted this. My current plan is to split the results up by "priority" on the |
Known issue: this bypasses the tag_limit
Looks great! It looks like you missed one though, I added this to the PanelWidget to make it respond to diff --git a/tagstudio/src/qt/widgets/panel.py b/tagstudio/src/qt/widgets/panel.py
index 141849b..2e22fb0 100755
--- a/tagstudio/src/qt/widgets/panel.py
+++ b/tagstudio/src/qt/widgets/panel.py
@@ -95,6 +95,11 @@ class PanelModal(QWidget):
self.root_layout.addWidget(self.button_container)
widget.parent_post_init()
+ def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: # noqa N802
+ if event.key() == QtCore.Qt.Key.Key_Escape:
+ self.close()
+ return super().keyPressEvent(event)
+
def closeEvent(self, event): # noqa: N802
self.done_button.click()
event.accept() |
Thank you! However this patch overrides and breaks the following change in this PR:
I did notice though that some panels were missed, such as the tag color selection panel, so I'll be making sure those work as intended in an upcoming PR or commit |
That is true, however currently Esc does nothing there, because the PanelModal takes precedence (because of the |
#793: I've added the event handler to every extra missing modal as well as tweaked the TagSearchPanel's handler to selectively defer to PanelWidget's handler rather than completely override it |
Summary
This PR makes several tweaks and changes to improve the tagging user experience. Since these were fixing lots of small bugs and issues, I decided not to open up any additional bug reports as it would take less time to fix these than it would be to open up reports for all of them.
Fixes & Changes
datetime
consistent