Commit ec9f6770 authored by Ciure Andrei's avatar Ciure Andrei
Browse files

Backed out 5 changesets (bug 1520957) failing browser_webconsole... tests CLOSED TREE

Backed out changeset 6371d4b4ff1e (bug 1520957)
Backed out changeset 862c4fc3b6ab (bug 1520957)
Backed out changeset 86defe96c1bb (bug 1520957)
Backed out changeset 4655b2d86e56 (bug 1520957)
Backed out changeset 67db08315e4b (bug 1520957)
parent a3916a4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2380,7 +2380,7 @@ menuseparator {
.source-footer .mapped-source,
.source-footer .cursor-position {
  color: var(--theme-body-color);
  padding-right: 2.5px;
  padding-left: 2.5px;
}

.source-footer .mapped-source {
+1 −1
Original line number Diff line number Diff line
@@ -5026,7 +5026,7 @@ class Tree extends Component {
          // it should be scrolled into view.
          this._focus(item, { preventAutoScroll: true });
          if (this.props.isExpanded(item)) {
            this.props.onCollapse(item, e.altKey);
            this.props.onCollapse(item);
          } else {
            this.props.onExpand(item, e.altKey);
          }
+0 −26
Original line number Diff line number Diff line
## Actions

### Best Practices

#### Scheduling Async Actions

There are several use-cases with async actions that involve scheduling:

* we do one action and cancel subsequent actions
* we do one action and subsequent calls wait on the initial call
* we start an action and show a loading state

If you want to wait on subsequent calls you need to store action promises.
[ex][req]

If you just want to cancel subsequent calls, you can keep track of a pending
state in the store. [ex][state]

The advantage of adding the pending state to the store is that we can use that
in the UI:

* disable/hide the pretty print button
* show a progress ui

[req]: https://github.com/devtools-html/debugger.html/blob/master/src/actions/sources/loadSourceText.js
[state]: https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ export function addOngoingSearch(ongoingSearch: SearchOperation): Action {
  return { type: "ADD_ONGOING_SEARCH", ongoingSearch };
}

export function clearSearchQuery(): Action {
  return { type: "CLEAR_QUERY" };
}

export function addSearchResult(
  sourceId: string,
  filepath: string,
+1 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ function createOriginalSource(
    isPrettyPrinted: false,
    isWasm: false,
    isBlackBoxed: false,
    loadedState: "unloaded",
    introductionUrl: null
    loadedState: "unloaded"
  };
}

Loading