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

Wrap dev tools extension screen with SelectionArea #869

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guenth39
Copy link

@guenth39 guenth39 commented Mar 8, 2024

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

Copy link

changeset-bot bot commented Mar 8, 2024

⚠️ No Changeset found

Latest commit: b7d5ab7

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

@rrousselGit
Copy link
Owner

Please make sure to add tests :)

@guenth39
Copy link
Author

guenth39 commented Mar 8, 2024

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 🤔

@rrousselGit
Copy link
Owner

There are tests for everything.

All changes need a test

@guenth39
Copy link
Author

guenth39 commented Mar 8, 2024

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

@rrousselGit
Copy link
Owner

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.

@guenth39
Copy link
Author

guenth39 commented Mar 8, 2024

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);

@rrousselGit
Copy link
Owner

devtools_app_shared seems to be out of date at moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The values from the provider dev tools extension should be selectable & copyable
2 participants