Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Copy function #3970

Merged
merged 1 commit into from
Sep 14, 2017
Merged

Copy function #3970

merged 1 commit into from
Sep 14, 2017

Conversation

jasonLaster
Copy link
Contributor

Summary of Changes

Small fun feature for copying a function.

Test Plan

unit tests

Screenshots/Videos (OPTIONAL)

@@ -24,6 +24,11 @@ copySource.accesskey=y
copySourceUrl=Copy Source Url
copySourceUrl.accesskey=u

# LOCALIZATION NOTE (copyFunctionUrl): This is the text that appears in the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong string reference and comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this was not fixed before merging @jasonLaster

# LOCALIZATION NOTE (copyFunctionUrl): This is the text that appears in the
# context menu to copy the source URL of file open.
copyFunction=Copy Function
copyFunction.accesskey=f
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F

@codecov
Copy link

codecov bot commented Sep 11, 2017

Codecov Report

Merging #3970 into master will increase coverage by 0.12%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3970      +/-   ##
==========================================
+ Coverage   54.91%   55.03%   +0.12%     
==========================================
  Files         131      132       +1     
  Lines        5084     5111      +27     
  Branches     1048     1050       +2     
==========================================
+ Hits         2792     2813      +21     
- Misses       2292     2298       +6
Impacted Files Coverage Δ
src/components/Editor/EditorMenu.js 0% <0%> (ø) ⬆️
src/components/Editor/index.js 23.45% <0%> (-0.08%) ⬇️
src/utils/breakpoint/astBreakpointLocation.js 88.88% <100%> (ø) ⬆️
src/utils/function.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca37e46...18d3748. Read the comment docs.

@bomsy
Copy link
Contributor

bomsy commented Sep 11, 2017

LGTM! will test!

@@ -1,6 +1,7 @@
import { showMenu } from "devtools-launchpad";
import { isOriginalId } from "devtools-source-map";
import { copyToTheClipboard } from "../../utils/clipboard";
import { getClosestFunction } from "../../utils/breakpoint";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be used

export {
getASTLocation,
findScopeByName,
getClosestFunction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not used any where

Copy link
Contributor

@bomsy bomsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jasonLaster jasonLaster dismissed flodolo’s stale review September 11, 2017 22:09

the issues are fixed

@@ -24,6 +24,11 @@ copySource.accesskey=y
copySourceUrl=Copy Source Url
copySourceUrl.accesskey=u

# LOCALIZATION NOTE (copyFunction): This is the text that appears in the
# context menu to copy the source URL of file open.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is still wrong…

@@ -24,6 +24,11 @@ copySource.accesskey=y
copySourceUrl=Copy Source Url
copySourceUrl.accesskey=u

# LOCALIZATION NOTE (copyFunction): This is the text that appears in the
# context menu to copy the source URL of file open.
copyFunction=Copy Function
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copyFunction -> copyFunction.label

@darkwing
Copy link
Contributor

Small suggestion: "flash" the entire function as a way to signal to the user the function was copied? Some sort of feedback would be awesome.

@jasonLaster
Copy link
Contributor Author

@darkwing lets do that as a follow up. We have some great flash technology :P

@@ -24,6 +24,11 @@ copySource.accesskey=y
copySourceUrl=Copy Source URL
copySourceUrl.accesskey=u

# LOCALIZATION NOTE (copyFunction): This is the text that appears in the
# context menu to copy the function the user selected
copyFunction.label=Copy Function
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flodolo sorry, that's embarrassing :/

Copy link

@flodolo flodolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, and it happens ;-)

@jasonLaster
Copy link
Contributor Author

jasonLaster commented Sep 13, 2017

i guess this will need some more love...

@darkwing
Copy link
Contributor

This is good to go IMO. I agree the flash can come later.

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

Successfully merging this pull request may close these issues.

5 participants