Skip to content

Switch to the DTD sidebar when using a new enough SDK #5225

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 flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevTools
    on Aug 19, 2024
  2. added this to the v3.96.0 milestone on Aug 19, 2024
  3. DanTup commented on Aug 21, 2024

    @DanTup
    MemberAuthor

    The latest Flutter master version includes Dart 3.6.0-164.0.dev which includes the DTD sidebar, so this is now testable using Flutter master and the pre-release version of Dart-Code published today. Currently, this is behind a preview flag.

    To test:

    • Upgrade to latest Flutter master
    • Open a Flutter project and open your workspace settings
    • Add the following:
        "dart.previewDtdSidebar": true, // Enables the DTD version of sidebar
        "dart.toolingDaemonLogFile": "logs/dtd.txt", // Enables DTD log to verify it's the DTD version
      
    • Run the Developer: Reload Window command to restart
    • Open the Flutter sidebar

    The sidebar should function the same as before, but looking in logs/dtd.txt you should see entries when interacting with the sidebar, such as when changing the selected device:

    // The incoming request from the sidebar
    [2:25:30 PM] [DartToolingDaemon] [Info] <== {"jsonrpc":"2.0","method":"Editor.selectDevice","id":3,"params":{"deviceId":"chrome"}}
    // The event Dart-Code broadcasts because the device changed
    [2:25:30 PM] [DartToolingDaemon] [Info] ==> {"jsonrpc":"2.0","method":"postEvent","params":{"eventData":{"deviceId":"chrome"},"eventKind":"deviceSelected","streamId":"Editor"}}
    // Dart-Code's response to the original selectDevice request
    [2:25:30 PM] [DartToolingDaemon] [Info] ==> {"id":3,"jsonrpc":"2.0","result":{"type":"Success"}}
    

    @kenzieschmoll I've done some testing of this and it all looks good. I will probably remove the preview flag closer to the end of the month (so that those using Flutter master will automatically be using this version). If you get chance to test before then, another set of eyes would be appreciated :-)

    @jwren @helin24 FYI - if the goal is to also embed this in IntelliJ, this also means that work could start against latest Flutter master (IntelliJ would need to provide the services listed in https://github.com/dart-lang/sdk/blob/main/pkg/dtd_impl/dtd_common_services_editor.md over DTD).

  4. kenzieschmoll commented on Aug 22, 2024

    @kenzieschmoll

    I tested this out today and did not see any issues.

  5. jwren commented on Aug 22, 2024

    @jwren
    Member

    Ditto -- LGTM @DanTup

  6. DanTup commented on Aug 24, 2024

    @DanTup
    MemberAuthor

    Great, thanks for testing! I'll remove the flag so from the next release, it'll use the DTD version by default for new-enough SDKs.

  7. DanTup commented on Aug 24, 2024

    @DanTup
    MemberAuthor

    I've also pushed a new pre-release (3.95.20240824) so once you're on that, you can remove the flag and still get the DTD version (mainly to get some additional coverage for pre-release users on Flutter master before the end of month release).

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 flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevToolsis 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