Thanks to visit codestin.com
Credit goes to github.com

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

Conversation

@svitlana-galianova
Copy link

Associated Issue: #4259

Summary of Changes

  • added new svg style for domain icon
  • wrote code to highlight debuggee domain in light green

Test Plan

Tell us a little a bit about how you tested your patch.

Example test plan:

  • start debugger
  • start debugging a web page
  • observe the main domain being light green

Screenshots/Videos (OPTIONAL)

1

@James300
Copy link
Contributor

That's really cool, looks good!

}

.domain.debuggee {
fill: lightgreen;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: Maybe there's a green defined in the themes we can use here @jasonLaster?

Copy link
Contributor

Choose a reason for hiding this comment

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

var(--theme-toolbar-highlighted-color) ?

Copy link
Author

Choose a reason for hiding this comment

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

@nt1m I tried your suggestion and here is a screenshot of what I got:

screenshot

To tell you the truth, I like green color more.

Copy link
Contributor

@wldcordeiro wldcordeiro left a comment

Choose a reason for hiding this comment

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

Nice job @svitlana-galianova I like the result of this. Just a note on the color choice but I think it looks great.

@svitlana-galianova
Copy link
Author

@wldcordeiro thanks! It won't be a problem to change a color to whatever you think is the most suitable.

return <Svg name="domain" />;
return <Svg name="domain"
className={classnames({
debuggee: (this.props.debuggeeUrl != null && item.name != null && this.props.debuggeeUrl.indexOf(item.name) !== -1) ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified to:

debuggee: this.props.debuggeeUrl && item.name && this.props.debuggeeUrl.includes(item.name),

You don't need the ternary that does true : false since your condition is already a boolean.

Copy link
Contributor

Choose a reason for hiding this comment

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

You do need the != null checks to avoid Flow complaining about sketchy existence checks.

Copy link
Author

Choose a reason for hiding this comment

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

@nt1m Thanks for your comment, I thought it would be smarter to use indexOf since it's supported in all the browsers and includes is only supported in the following browsers (according to w3school):
browser support

Copy link
Contributor

@codehag codehag Oct 23, 2017

Choose a reason for hiding this comment

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

Don't worry about browser support, we use includes in other areas of the code base, you can feel safe using it :). For most cases, we have Babel, which transpiles es6 where necessary (so you will see things like spread operators which are not available everywhere being used already!) so feel free to explore modern JS as much as you like! our primary targets are modern chrome and firefox.

Copy link
Author

Choose a reason for hiding this comment

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

@codehag Thanks for your clarification!

}

.domain.debuggee {
fill: lightgreen;
Copy link
Contributor

Choose a reason for hiding this comment

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

var(--theme-toolbar-highlighted-color) ?

wldcordeiro and others added 10 commits October 25, 2017 08:23
* Add gitattributes

* fix: Multi-platform and configuration issues

This configures all systems to checkout and use LF line endings.

The jest test system also runs without colors by default now.
This allows the tests to pass in any environment regardless of color
scheme.

* tweaks
…nel_weirdness

Close ConditionalPanel on blur
@wldcordeiro
Copy link
Contributor

Uh oh, this looks like it needs a rebase. It's gotten a lot of additional commits on it that aren't part of the PR.

@jasonLaster
Copy link
Contributor

I feel like this pr got stuck in the proverbial git mud, so i cherrypicked the good stuff and put it in a new PR #4536

@svitlana-galianova you're still the author of the new PR's commit. Thanks for the hard work while we figured out what to do here.

@flodolo
Copy link

flodolo commented Oct 30, 2017

Passing by comment: it looks like you have worked directly on the master branch of your fork. Sadly, when using a fork, things will become unmanageable really fast, especially on a repository with a lot of changes like Debugger.

The safest workflow is to keep your master in sync with the original repository's master, and create a branch to work on pull requests. At that point, if needed, you'd only need to rebase your branch against master.

Once you have completed all the pending work, my personal suggestion would be to "reset" your master and sync it with this repository's master, so you have a clean starting point for future work.

git checkout master
git remote add upstream https://github.com/devtools-html/debugger.html
git fetch upstream
git reset --hard origin/upstream
git push -f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.