Bug: Dropdown Picker For '/Add New Property' Highlights Index Of Both Property And Tag Option
Bug: Dropdown Picker for '/Add new property' Highlights Index of Both Property and Tag Option
Dropdown pickers are a crucial component in many applications, allowing users to select from a list of options. However, when it comes to the '/Add new property' command in Logseq, a bug has been discovered that highlights the index of both property and tag options. In this article, we will delve into the details of this bug, its reproduction, and the expected behavior.
When selecting from the dropdown of the '/Add new property' command, a peculiar issue arises. When hovering the mouse over the first and second indexed property items in the list, the first and second items of the "Tags" segment are also highlighted. This behavior is unexpected and can lead to confusion among users.
To reproduce this bug, follow these steps:
- Create 2 properties and 2 tags with similar names: Create two properties and two tags with similar names to test the bug.
- Add a row to the tag database table: Add a row to the tag database table, for example, by adding a new tag to the "Event" item.
- Navigate to the Event item "node": Navigate to the Event item "node" to test the bug.
- Use the /Add new property command from within a text segment: Use the '/Add new property' command from within a text segment to trigger the bug.
The expected behavior is that only the item that contains the mouse location (hover) should change the background highlight color. In other words, when hovering over a property item, only that item should be highlighted, and not the corresponding tag item.
Unfortunately, no files were provided to accompany this bug report.
The bug was reported on a specific commit in the Logseq repository: https://github.com/logseq/logseq/commit/7b8a9d4.
No additional context was provided to help resolve this bug.
Unfortunately, the user who reported this bug is not willing to submit a PR to fix the issue.
In conclusion, the bug in the dropdown picker for the '/Add new property' command highlights the index of both property and tag options. This behavior is unexpected and can lead to confusion among users. To reproduce this bug, follow the steps outlined above. The expected behavior is that only the item that contains the mouse location (hover) should change the background highlight color. If you are familiar with the Logseq codebase and are willing to submit a PR to fix this issue, please do so.
To fix this bug, the following possible solutions can be explored:
- Review the code: Review the code that handles the dropdown picker for the '/Add new property' command to identify the root cause of the issue.
- Update the logic: Update the logic that determines which item to highlight when hovering over a property item.
- Add a check: Add a check to ensure that only the item that contains the mouse location (hover) is highlighted.
By exploring these possible solutions, the bug can be fixed, and the dropdown picker for the '/Add new property' command will function as expected.
In the future, it would be beneficial to:
- Improve testing: Improve testing to catch bugs like this one before they reach production.
- Enhance documentation: Enhance documentation to provide clear instructions on how to reproduce and fix bugs like this one.
- Encourage community involvement: Encourage community involvement by providing a clear process for submitting PRs to fix bugs.
By following these best practices, the Logseq community can work together to create a more stable and user-friendly application.
Bug: Dropdown Picker for '/Add new property' Highlights Index of Both Property and Tag Option - Q&A
In our previous article, we discussed a bug in the dropdown picker for the '/Add new property' command in Logseq, where the index of both property and tag options are highlighted. In this article, we will answer some frequently asked questions (FAQs) related to this bug.
A: The bug in the dropdown picker for the '/Add new property' command is that when hovering over a property item, the corresponding tag item is also highlighted.
A: To reproduce the bug, follow these steps:
- Create 2 properties and 2 tags with similar names.
- Add a row to the tag database table.
- Navigate to the Event item "node".
- Use the '/Add new property' command from within a text segment.
A: The expected behavior is that only the item that contains the mouse location (hover) should change the background highlight color.
A: This bug is a problem because it can lead to confusion among users. When hovering over a property item, users expect only that item to be highlighted, not the corresponding tag item.
A: Yes, if you are familiar with the Logseq codebase, you can try to fix this bug yourself. However, please note that making changes to the codebase can have unintended consequences, so proceed with caution.
A: If you are willing to submit a PR to fix this bug, please follow these steps:
- Review the code that handles the dropdown picker for the '/Add new property' command.
- Identify the root cause of the issue.
- Update the logic that determines which item to highlight when hovering over a property item.
- Add a check to ensure that only the item that contains the mouse location (hover) is highlighted.
- Submit a PR with your changes.
A: Unfortunately, the user who reported this bug is not willing to submit a PR to fix the issue.
A: To stay up-to-date with the latest developments on this bug, please follow the Logseq repository on GitHub and check for updates on the issue tracker.
A: Yes, the Logseq community is always happy to help. You can reach out to the community through the Logseq forum or by submitting a PR with your changes.
In conclusion, the bug in the dropdown picker for the '/Add new property' command highlights the index of both property and tag options. This behavior is unexpected and can lead to confusion among users. We hope that this Q&A article has provided you with the information you need to understand and potentially fix this bug. If you have any further questions, please don't hesitate to ask.