This is mainly changing the props we pass to the ObjectInspector,
and removing actions, state properties and reducers that we used to
handle in the console but are now managed by the ObjectInspector
itself.
MozReview-Commit-ID: F2GabDqDjPe
This adds a "filteredMessagesCount" property to the messages store,
which is updated at the same time as we update the "visibleMessages"
property.
The global number of hidden messages is then shown next to the text search
input, and a button can be clicked to Reset the filters to their original
values.
This only takes into account messages that are filtered-out because
the default filters changes. Which means that non-default filters, like
CSS, Network and XHR don't impact filteredMessagesCount.
We take this as an opportunity to rename the match*Filter functions to
pass*Filter, since it better represents what the function does (a network
message is not impacted by a level filter, but it can be misleading to say
that it matches level filters).
MozReview-Commit-ID: BLPmCFNtzEl
This ensures that we scroll to the bottom when the user evaluate
something in the console.
A test is added to make sure this works as expected.
MozReview-Commit-ID: Arh6rftQeKo
A loose checking was causing 0 and undefined values to be rendered as Object.
We fix this by checking explicitely if the grip has a value property.
A test is added to make sure we handle those cases as expected.
MozReview-Commit-ID: 1wdBVs7bF61
This required some changes in the ConsoleTable component. Since
it uses GripMessageBody, we need to pass it props that it might
need.
MozReview-Commit-ID: DNeBsmJqCFI
Add getObjectEntries and loadObjectEntries as props for the ObjectInspector so
we can display entries on Maps and Sets.
MozReview-Commit-ID: Cy6SjxwclHI
Add getObjectEntries and loadObjectEntries as props for the ObjectInspector so
we can display entries on Maps and Sets.
MozReview-Commit-ID: Cy6SjxwclHI
We don't retrieve the indent from the MessageContainer anymore, but from the lowest-level
component where we have access to the full message data, i.e. the messages types components (e.g.
ConsoleApi, EvaluationResult, … ).
MozReview-Commit-ID: JkaIcxnyt3W
Prior to this patch, we were retrieving the message data in the ConsoleOutput
render, for each message. This means that for each message addition, we were
retrieving the data for each message in the store.
This doesn't impact performance if there are not many messages in the store, but
if the store is "full", we might end up calling the function to get those messages
a lot. And since the messages are in an Immutable.OrderedMap, it can be very costly.
Moving the retrieval of the message data in ConsoleOutput allow us to only call this
function when a message is added or updated, which allow us to save some time on
the rendering path.
MozReview-Commit-ID: S4NSSW5Mvw
This moves network update messages to their own property on the store.
We take this as an opportunity to only dispatch the last network update,
i.e. `eventTimings` since it has all we need and saves us some time (there
are 8 network update per network messages, which can be costly).
MozReview-Commit-ID: 2AQN3IlgHg7
We used to do the filtering on the selector, which can be costly because
we're looping through all the messages of the store on each new message.
Moving the logic to the reducer allow us to be more thoughtful about which
messages to evaluate and when.
In order to make this change, we need to pass the filter state to the message
reducer. This is done by ditching the combineReducers helper function and do
the plumbing by ourselves, which isn't complex.
MozReview-Commit-ID: Lw37XgEFf7e