Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/trace-viewer/src/ui/networkFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ export const NetworkFilters = ({ filterState, onFilterStateChange }: {
onChange={e => onFilterStateChange({ ...filterState, searchValue: e.target.value })}
/>

<div className='network-filters-resource-types'>
<div className='network-filters-resource-types' role='tablist'>
{resourceTypes.map(resourceType => (
<div
key={resourceType}
title={resourceType}
onClick={() => onFilterStateChange({ ...filterState, resourceType })}
className={`network-filters-resource-type ${filterState.resourceType === resourceType ? 'selected' : ''}`}
role='tab'
aria-selected={filterState.resourceType === resourceType}
>
{resourceType}
</div>
Expand Down
5 changes: 5 additions & 0 deletions packages/trace-viewer/src/ui/snapshotTab.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
limitations under the License.
*/

.snapshot-tabs {
display: flex;
Copy link
Member

Choose a reason for hiding this comment

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

We only use vbox and hbox for flex containers. What do you mean by height: 100% in a flex parent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what you're questioning about height: 100%. flex does not fill the off dimension by default; you have to tell the element to expand to fit.

Copy link
Member

Choose a reason for hiding this comment

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

Right, that's why we use vbox and hbox.

height: 100%;
}

.snapshot-tab {
align-items: stretch;
outline: none;
Expand Down
20 changes: 11 additions & 9 deletions packages/trace-viewer/src/ui/snapshotTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@ export const SnapshotTabsView: React.FunctionComponent<{
return <div className='snapshot-tab vbox'>
<Toolbar>
<ToolbarButton className='pick-locator' title='Pick locator' icon='target' toggled={isInspecting} onClick={() => setIsInspecting(!isInspecting)} />
{['action', 'before', 'after'].map(tab => {
return <TabbedPaneTab
key={tab}
id={tab}
title={renderTitle(tab)}
selected={snapshotTab === tab}
onSelect={() => setSnapshotTab(tab as 'action' | 'before' | 'after')}
></TabbedPaneTab>;
})}
<div className='snapshot-tabs' role='tablist'>
{(['action', 'before', 'after'] as const).map(tab => {
return <TabbedPaneTab
key={tab}
id={tab}
title={renderTitle(tab)}
selected={snapshotTab === tab}
onSelect={() => setSnapshotTab(tab)}
></TabbedPaneTab>;
})}
</div>
<div style={{ flex: 'auto' }}></div>
<ToolbarButton icon='link-external' title='Open snapshot in a new tab' disabled={!snapshotUrls?.popoutUrl} onClick={() => {
const win = window.open(snapshotUrls?.popoutUrl || '', '_blank');
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/components/tabbedPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export const TabbedPaneTab: React.FunctionComponent<{
onClick={() => onSelect?.(id)}
role='tab'
title={title}
aria-controls={ariaControls}>
aria-controls={ariaControls}
aria-selected={selected}>
<div className='tabbed-pane-tab-label'>{title}</div>
{!!count && <div className='tabbed-pane-tab-counter'>{count}</div>}
{!!errorCount && <div className='tabbed-pane-tab-counter error'>{errorCount}</div>}
Expand Down
Loading