provider icon indicating copy to clipboard operation
provider copied to clipboard

Wrap dev tools extension screen with SelectionArea

Open guenth39 opened this issue 3 months ago • 8 comments

By wrapping the dev tools screen with SelectionArea it's now possible to select text and that way copy the current values or names of providers.

@rrousselGit There is no guidance on what I have to do if I want to contribute. Please let me know if there is anything more to do to ship this or just do it by yourself, that's fine for me as well.

Closes #868

guenth39 avatar Mar 08 '24 11:03 guenth39

⚠️ No Changeset found

Latest commit: b7d5ab7643c4929ce26100d5ccf34834a03202c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Mar 08 '24 11:03 changeset-bot[bot]

Please make sure to add tests :)

rrousselGit avatar Mar 08 '24 11:03 rrousselGit

Please make sure to add tests :)

What kind of tests would you expect? It's just a change in the UI. It does not look like there are currently UI Tests 🤔

guenth39 avatar Mar 08 '24 11:03 guenth39

There are tests for everything.

All changes need a test

rrousselGit avatar Mar 08 '24 11:03 rrousselGit

Wow, thank you for that clear guidance 😅

So you mean widget test in that case? I have found nothing regarding how to test SelectionArea in a widget test except this question on stack overflow. Do you have any idea? Or is it enough to ensure SelectionArea can be found?

https://stackoverflow.com/questions/76630379/widget-test-for-selectionarea

guenth39 avatar Mar 08 '24 11:03 guenth39

You could use tester with gestures such as tap / drag to select a portion of the UI. Then use a golden test to show that visually the test was selected.

rrousselGit avatar Mar 08 '24 11:03 rrousselGit

Unfortunately, I'm unable to run the tests and there are currently no working golden tests in the repo. So I'm not willed to continue with that.

This is a part of the output when I try to run flutter test in provider_devtools_extension folder:

Details


../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw.dart:45:5: Error: 'JSObject' isn't a type.
    JSObject countsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw.dart:48:5: Error: 'JSObject' isn't a type.
    JSObject offsetsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw.dart:50:5: Error: 'JSObject' isn't a type.
    JSObject instanceCountsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:19:5: Error: 'JSObject' isn't a type.
    JSObject firstsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:21:5: Error: 'JSObject' isn't a type.
    JSObject countsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:23:5: Error: 'JSObject' isn't a type.
    JSObject instanceCountsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:25:5: Error: 'JSObject' isn't a type.
    JSObject baseInstancesList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:31:5: Error: 'JSObject' isn't a type.
    JSObject countsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:34:5: Error: 'JSObject' isn't a type.
    JSObject offsetsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:36:5: Error: 'JSObject' isn't a type.
    JSObject instanceCountsList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:38:5: Error: 'JSObject' isn't a type.
    JSObject baseVerticesList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart:40:5: Error: 'JSObject' isn't a type.
    JSObject baseInstancesList,
    ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:179:42: Error: 'JSArray' isn't a type.
  external JSPromise requestAdapterInfo([JSArray unmaskHints]);
                                         ^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:190:5: Error: 'JSArray' isn't a type.
    JSArray requiredFeatures,
    ^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:191:5: Error: 'JSAny' isn't a type.
    JSAny requiredLimits,
    ^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:197:33: Error: 'JSArray' isn't a type.
  external set requiredFeatures(JSArray value);
                                ^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:199:31: Error: 'JSAny' isn't a type.
  external set requiredLimits(JSAny value);
                              ^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:349:5: Error: 'JSArray' isn't a type.
    JSArray viewFormats,
    ^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:366:28: Error: 'JSArray' isn't a type.
  external set viewFormats(JSArray value);
                           ^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:438:14: Error: 'JSObject' isn't a type.
    required JSObject source,
             ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:445:23: Error: 'JSObject' isn't a type.
  external set source(JSObject value);
                      ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/webgpu.dart:514:59: Error: 'JSArray' isn't a type.
  external factory GPUBindGroupLayoutDescriptor({required JSArray entries});

                                                             ^^^^^
../../../../.pub-cache/hosted/pub.dev/devtools_app_shared-0.0.9/lib/src/utils/web_utils.dart:14:16: Error: 'JSObject' isn't a type.
      (this as JSObject).instanceOfString('MessageEvent');
               ^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/devtools_app_shared-0.0.9/lib/src/utils/web_utils.dart:18:25: Error: 'JSFunction' isn't a type.
  external void forEach(JSFunction callback);

guenth39 avatar Mar 08 '24 12:03 guenth39

devtools_app_shared seems to be out of date at moment.

rrousselGit avatar Mar 08 '24 12:03 rrousselGit