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

Render a toggle for original/generated scopes when available.#5702

Merged
jasonLaster merged 6 commits into
firefox-devtools:masterfrom
loganfsmyth:original-scope-toggle
Mar 19, 2018
Merged

Render a toggle for original/generated scopes when available.#5702
jasonLaster merged 6 commits into
firefox-devtools:masterfrom
loganfsmyth:original-scope-toggle

Conversation

@loganfsmyth

Copy link
Copy Markdown
Contributor

Refs Issue: #5561

Summary of Changes

  • Renders "Show generated/original scope" toggle in scope list

Screenshots/Videos (OPTIONAL)

original-toggle

@loganfsmyth loganfsmyth force-pushed the original-scope-toggle branch from abab84b to df78803 Compare March 16, 2018 22:21
Comment thread src/components/SecondaryPanes/Scopes.js Outdated
this.setState({ showOriginal: !showOriginal });
}}
>
Show {showOriginal ? "generated" : "original"} scope

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, i think we should have two strings in assets/panel/debugger.properties not a big deal... See 115 for the L10.getStr api

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good.

Comment thread src/components/SecondaryPanes/Scopes.js Outdated
hasOriginalScopes:
isLoading || !generatedFrameScopes || !frameScopes
? false
: generatedFrameScopes.actor !== frameScopes.actor

@jasonLaster jasonLaster Mar 16, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, this seems like something that we should have in reducers/pause so that the mochitests can also listen for it to. Also hides some complexity.

If the state doesnt all come from reducers/pause, it can go in selectors/hasOriginalScopes.js

@darkwing

Copy link
Copy Markdown
Contributor

@jasonLaster Do we want to hide this behind a pref? Is this something most users will want?

@jasonLaster

Copy link
Copy Markdown
Contributor

@darkwing good point. this should use the mapScopes feature flag

@loganfsmyth

Copy link
Copy Markdown
Contributor Author

@darkwing @jasonLaster The toggle only shows up if there are original scopes, so it should already be hidden based on that flag since there aren't original scopes when the flag is off.

Comment thread assets/panel/debugger.properties Outdated
scopes.notPaused=Not paused

# LOCALIZATION NOTE (scopes.toggleToGenerated): Scopes right sidebar pane label
# for link to change scope list to show scopes for generated code.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think both comments need some rewording, but I'm not sure I can help a lot, not being familiar with the matter. E.g. "Link displayed in the right sidebar to display scopes for generated code" makes sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Haha, yeah that's what I get for copy/pasting half the text from the one above this :P

@jasonLaster jasonLaster merged commit a0b275e into firefox-devtools:master Mar 19, 2018
@loganfsmyth loganfsmyth deleted the original-scope-toggle branch March 19, 2018 23:03
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.

4 participants