Skip to content

Show color previews in code completion #3941

Closed

Description

@DanTup

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
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    on Apr 26, 2022
  2. added this to the v3.42.0 milestone on Apr 26, 2022
  3. modified the milestones: v3.42.0, v3.44.0 on May 25, 2022
  4. modified the milestones: v3.44.0, v3.46.0 on Jun 22, 2022
  5. modified the milestones: v3.46.0, v3.48.0 on Jul 25, 2022
  6. modified the milestones: v3.48.0, v3.50.0 on Aug 25, 2022
  7. modified the milestones: v3.50.0, v3.52.0 on Oct 3, 2022
  8. removed this from the v3.52.0 milestone on Oct 31, 2022
  9. 11 remaining items

  10. DanTup commented on Mar 14, 2024

    @DanTup
    MemberAuthor

    Actually, I took another look, and although the regex is more relaxed, it still checks for start/end:

    if (match && (match.index === 0 || match.index + match[0].length === value.length)) {

    So I think we're still in the same position - we can only currently do this by replacing an existing field that currently contains useful info. The detail field currently contains the type which can be useful to know if you can access shades of a color:

    image

    It could be argued that the preview might be more useful than this, but since this comes from shared code and is consistent for all completion items, I'm not sure removing it and showing a hex code is ideal.

  11. RedCMD commented on Mar 14, 2024

    @RedCMD

    regex is more relaxed, it still checks for start/end

    it checks if the hex code is at the very beginning or the very end
    so you can still put documentation there

    The detail field currently contains the type which can be useful to know

    the 1st detail field doesn't work
    only the 2nd one in the expandable documentation section does

  12. DanTup commented on Mar 18, 2024

    @DanTup
    MemberAuthor

    it checks if the hex code is at the very beginning or the very end

    Oops, I didn't read the condition correctly. I'll take a look, thanks :)

  13. DanTup commented on Aug 28, 2024

    @DanTup
    MemberAuthor

    Looks like this works, thank you!

    image

  14. modified the milestones: Backlog, v3.98.0 on Aug 28, 2024
  15. DanTup commented on Aug 29, 2024

    @DanTup
    MemberAuthor

    This was implemented in dart-lang/sdk@d8376f1. It's a change in the analysis server so it'll show up in a future SDK release (not a Dart-Code release).

  16. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Sep 30, 2024
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 featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions