Skip to content

Notify users with large numbers of TODO diagnostics that they can turn them off #5060

Closed

Description

@DanTup

The default setting is to show TODOs in the Problem list. Some projects (like Dart and Flutter!) use TODOs a lot and showing them here is inconvenient.

If we detect a project has a large number (>50? >100?) of TODOs after initial analysis, we could prompt the user:

Your project has a large number of TODOs. Would you like to prevent them from creating diagnostics?
[Disable TODOs Globally] [Disable TODOs for Project] [Don't Ask Again]

Where:

  • Disable globally = set doNotShow and change the setting in User Settings
  • Disable for project = set for project, but keep prompt enabled for future projects
  • Don't ask again = set doNotShow

It's probably not worth having a "Do not show for this project" because once the user has dismissed the prompt, they will be aware of the setting (and it avoids having too many options). But we should also skip the prompt if the user has an explicit setting set (regardless of what it is) because it's clear they're aware of the setting and have set it.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in editorRelates to code editing or language features
    on Apr 5, 2024
  2. added this to the v3.88.0 milestone on Apr 5, 2024
  3. changed the title [-]Notify users with large numbers of TODO diagnostics tthat they can turn them off[/-] [+]Notify users with large numbers of TODO diagnostics that they can turn them off[/+] on Apr 5, 2024
  4. modified the milestones: v3.88.0, v3.90.0 on Apr 18, 2024
  5. DanTup commented on Apr 18, 2024

    @DanTup
    MemberAuthor

    We do a single count of TODOs after the first analysis completes and if there are over the threshold (currently set to 100), show a prompt like:

    Workspace has over ${threshold} TODO comments. Disable showing TODOs as diagnostics?
    [ Disable for Workspace ] [ Disable Everywhere ] [ Keep Enabled ]

    The first button writes dart.showTodos: false for the workspace, and the other two write false/true into the global settings (writing true for "Keep Enabled" is used as the signal to not prompt again - we never prompt if there is an explicit setting recorded).

    todo.mp4

    @jacob314 FYI in case you have any opinions on the text or threshold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions