Closed Bug 1601533 Opened 5 years ago Closed 4 years ago

Indicate that function references in tooltips can be clicked to jump

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: Harald, Assigned: stepan)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [dt-q])

User Story

When hovering a function, I want to clearly see that its a function I can jump to, so I know to click.

Attachments

(3 files)

Attached image image.png
No description provided.
Attached image Console as reference
Blocks: dbg-frontend
Whiteboard: [dt-q]

Hi Harald, I'd like to take this one if it's still available.

I was wondering wouldn't it be more helpful to display part of or the whole URL combined with the line number as a title of the button instead of 'Jump to definition'?

Something like this:
https://www.loom.com/share/45412e0e7f414b0eb95144fda8a4b519

Flags: needinfo?(hkirschner)

Stepan, sorry for the delay. This week was catching up on emails and pings.

Showing the target source + location on the tooltip is actually a really good idea! I now wonder why it didn't come up before :D

In the case of the tooltip, the whole element could also be clickable as there doesn't seem any other interaction on it (vs Console where logged functions can be expanded)

Assignee: nobody → obdelnik
Flags: needinfo?(hkirschner)
Keywords: good-first-bug

Added 'jumpToDefinitionButton' to the function preview with a title containing target source + location.
The button is not rendered for ignored source urls similarly like in the console.

Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b2a188c4998c
Indicate that function references in tooltips can be clicked to jump r=jlast

Backed out changeset b2a188c4998c for debugger failures on PreviewFunction.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=289959885&resultStatus=testfailed%2Cbusted%2Cexception&revision=b2a188c4998cb7c005d37372a3682ce284d2f5b4

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=289959885&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/bbb252e1c49399dd6c40b762c34e042801722ebd

[task 2020-02-21T21:43:49.608Z] TEST START | Flow
[task 2020-02-21T21:44:09.106Z] Error --------------------------------------------------------------------- src/components/Editor/Preview/Popup.js:122:9
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z] Cannot create `PreviewFunction` element because object type [1] is incompatible with undefined [2] in property
[task 2020-02-21T21:44:09.106Z] `func.location`.
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z]    src/components/Editor/Preview/Popup.js:122:9
[task 2020-02-21T21:44:09.106Z]    122|         <PreviewFunction func={resultGrip} />
[task 2020-02-21T21:44:09.106Z]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z] References:
[task 2020-02-21T21:44:09.106Z]    packages/devtools-reps/src/object-inspector/types.js:16:13
[task 2020-02-21T21:44:09.106Z]                     v
[task 2020-02-21T21:44:09.106Z]     16|   location: {
[task 2020-02-21T21:44:09.106Z]     17|     url: string,
[task 2020-02-21T21:44:09.106Z]     18|     line: number,
[task 2020-02-21T21:44:09.106Z]     19|     column: number,
[task 2020-02-21T21:44:09.106Z]     20|   },
[task 2020-02-21T21:44:09.106Z]           ^ [1]
[task 2020-02-21T21:44:09.106Z]    src/components/shared/PreviewFunction.js:21:14
[task 2020-02-21T21:44:09.106Z]                      v
[task 2020-02-21T21:44:09.106Z]     21|   location?: {
[task 2020-02-21T21:44:09.106Z]     22|     url: string,
[task 2020-02-21T21:44:09.106Z]     23|     line: number,
[task 2020-02-21T21:44:09.106Z]     24|     column: number,
[task 2020-02-21T21:44:09.106Z]     25|   },
[task 2020-02-21T21:44:09.106Z]           ^ [2]
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:09.106Z] Found 1 error
[task 2020-02-21T21:44:09.106Z] 
[task 2020-02-21T21:44:28.362Z] TEST-UNEXPECTED-FAIL flow | Cannot create `PreviewFunction` element because object type [1] is incompatible with undefined [2] in property `func.location`.
[task 2020-02-21T21:44:28.363Z] TEST START | Eslint
[task 2020-02-21T21:44:29.875Z] Error: ESLint configuration in /builds/worker/checkouts/gecko/.eslintrc.js is invalid:
[task 2020-02-21T21:44:29.875Z] 	- Unexpected top-level property "ignorePatterns".
[task 2020-02-21T21:44:29.875Z] 
[task 2020-02-21T21:44:29.875Z]     at validateConfigSchema (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config/config-validator.js:235:15)
[task 2020-02-21T21:44:29.876Z]     at Object.validate (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config/config-validator.js:261:5)
[task 2020-02-21T21:44:29.876Z]     at loadFromDisk (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config/config-file.js:521:19)
[task 2020-02-21T21:44:29.876Z]     at Object.load (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config/config-file.js:564:20)
[task 2020-02-21T21:44:29.876Z]     at Config.getLocalConfigHierarchy (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config.js:227:44)
[task 2020-02-21T21:44:29.876Z]     at Config.getConfigHierarchy (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config.js:179:43)
[task 2020-02-21T21:44:29.876Z]     at Config.getConfigVector (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config.js:286:21)
[task 2020-02-21T21:44:29.876Z]     at Config.getConfig (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/config.js:329:29)
[task 2020-02-21T21:44:29.876Z]     at processText (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/cli-engine.js:180:33)
[task 2020-02-21T21:44:29.876Z]     at processFile (/builds/worker/checkouts/gecko/devtools/client/debugger/node_modules/eslint/lib/cli-engine.js:240:12)
[task 2020-02-21T21:44:29.876Z] error Command failed with exit code 2.
[task 2020-02-21T21:44:29.876Z] yarn run v1.9.4
[task 2020-02-21T21:44:29.876Z] $ eslint *.js "src/**/*.js" "packages/*/src/**/*.js" --fix
[task 2020-02-21T21:44:29.876Z] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Flags: needinfo?(obdelnik)
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4459881f26b0
Indicate that function references in tooltips can be clicked to jump r=jlast
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
Flags: needinfo?(obdelnik)
Blocks: 1617277
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: