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

Inconsistent behavior of @Folder and custom annotations in all Explorers #6233

Open
Rovo1211 opened this issue Dec 15, 2024 · 1 comment
Open
Labels
bug Identifies work items for known bugs

Comments

@Rovo1211
Copy link

Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Rubberduck version 2.5.9.6321
Operating System: Windows 11 Home 23H2
Host Product: MS Excel
Host Version: Office365
Host Executable: Excel.exe

Description
In the current implementation of Rubberduck's ToDo Explorer, only the @folder annotation works when prefixed with @, while all other annotations (such as Note or custom annotations like Declaraties("...")) are only recognized without the @ prefix.

This inconsistency causes confusion, as users expect a uniform approach for all annotations. Ideally, all annotations should either require the @ prefix or not, to ensure clarity and predictability.

To Reproduce
Steps to reproduce the behavior:

  1. Add '@folder ("SomeFolder") to your code — it works as expected and is recognized by ToDo Explorer.
  2. Add' @note ("Some note") — this is not recognized unless you remove the @.
  3. Create a custom annotation, e.g., 'Declaraties("...") — this also only works without the @.

Expected behavior
Annotations should follow a consistent rule:

Either all annotations require the '@ prefix (preferred for consistency with '@Folder),
Or none of them require it.

Actual behavior:
Only @folder works with the @ prefix, while other annotations fail unless the @ is omitted.

Screenshots
If applicable, add screenshots to help explain your problem.
Annotations with and without at-sign

Logfile
Rubberduck generates extensive logging in TRACE-Level. If no log was created at %APPDATA%\Rubberduck\Logs, check your settings. Include this log for bug reports about the behavior of Rubberduck.
RubberduckLog.txt

Additional context
This inconsistency can be frustrating for users trying to maintain a uniform annotation style. It would also improve usability and documentation clarity if all annotations followed the same rules.
Add any other context about the problem here.

@Rovo1211 Rovo1211 added the bug Identifies work items for known bugs label Dec 15, 2024
@IvenBach
Copy link
Member

The default Todo comments, and any others added like Declaraties in your example, are part of the Todo Settings, found under Rubberduck>Settings>Todo Settings. These are different and distinct from annotations.

https://rubberduckvba.com/Features/summary?name=ToDoExplorer: I view the Todo settings are more of a "This is what I'm working on and will get back to it." or something like HeadsUp as a marker to add an explanation "HeadsUp: This is done this way because: XYZ".

https://rubberduckvba.com/Features/Summary?name=CommentAnnotations: I think of Annotations as a specialized and more robust comment. They are there to make it easier to update the attributes on modules. Without them modules would need to be exported, edited, saved, and imported. This additional burden knocks you out of the flow while coding. They also aid in discovering their existence. I myself had no idea about them until I exported a module and viewed the file. After doing so I wondered why there wasn't any way to modify it from within the IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies work items for known bugs
Projects
None yet
Development

No branches or pull requests

2 participants