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

New Breakpoints UI: Group Breakpoints#5845

Merged
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
darkwing:group-breakpoints
Apr 3, 2018
Merged

New Breakpoints UI: Group Breakpoints#5845
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
darkwing:group-breakpoints

Conversation

@darkwing

@darkwing darkwing commented Apr 2, 2018

Copy link
Copy Markdown
Contributor

Fixes Issue: #5796

This is a WIP for the grouping of breakpoints for the new breakpoints UI.

ToDo

  • Remove the renderSourceLocation function once I'm confident all its contents are accounted for
  • Remove hardcoded breakpoint text once Get breakpoint text #5823 has been merged

I'm thinking that syntax highlighting via CodeMirror can be done as a separate PR since it will likely require more thought and, IMO, shouldn't block this.

Screenshots

goodalignment

hitCount,
generatedLocation: newGeneratedLocation
generatedLocation: newGeneratedLocation,
text: breakpoint.text

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.

This is temporary; should be removed once #5823 is merged.

cursor: default;
flex-grow: 1;
text-overflow: ellipsis;
overflow: hidden;

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.

This CSS ensures that the breakpoint code gets the most space but is also ellipsis'd

}

// THIS SHOULD BE DELETED
function renderSourceLocation(source, line, column) {

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.

This can probably go now.

Comment thread src/utils/breakpoint/index.js Outdated
hidden: hidden || false,
loading: false,
text: "",
text: condition ? condition : "NOT CONDITIONAL",

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.

This is obviously hardcoded and undesirable.

@darkwing
darkwing force-pushed the group-breakpoints branch from cdd33dc to 8361203 Compare April 2, 2018 21:54
@darkwing darkwing changed the title WIP: New Breakpoints UI: Group Breakpoints New Breakpoints UI: Group Breakpoints Apr 3, 2018

@jasonLaster jasonLaster left a comment

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.

Yes!!! Really exciting

);

return <div className="pane breakpoints-list">{children}</div>;
forOwn(groupedBreakpoints, (breakpointsInFile, filename) => {

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.

map is generally the preference here

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.

groupedBreakpoints is an object literal so I'd need to use Object.keys() and so on; I thought forOwn was simple enough.


return (
<div className="pane breakpoints-list">
{children.length ? (

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.

it might be nice to split it up and at the top do

 return <div className="pane breakpoints-list">
    {this.isEmpty() ? this.renderEmptyList() : this.renderBreakpointGroups() }
 </div>

then below

return groups.map(group => <div>{group.breakpoints.map(this.renderBreakpoint)}</div>))

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.

Updates made!

@darkwing
darkwing force-pushed the group-breakpoints branch from 4817bb1 to 81faad0 Compare April 3, 2018 20:16
@jasonLaster
jasonLaster merged commit 73f9560 into firefox-devtools:master Apr 3, 2018
@jasonLaster

jasonLaster commented Apr 3, 2018

Copy link
Copy Markdown
Contributor

jasonLaster pushed a commit that referenced this pull request Apr 9, 2018
jasonLaster pushed a commit to jasonLaster/debugger.html that referenced this pull request Apr 9, 2018
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.

2 participants