Fix History view not honoring sidebar width (#292)

* Fix History view not honoring sidebar width

* update comment
This commit is contained in:
Evan Simkowitz 2024-02-12 22:34:49 -08:00 committed by GitHub
parent 532e65c8ab
commit 2839179ced
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -419,8 +419,16 @@ class HistoryView extends React.Component<{}, {}> {
let sessionId: string = null;
let remoteIds = Object.keys(rnames);
let remoteId: string = null;
// TODO: something is weird with how we calculate width for views. Before, history view was not honoring tab width. This fix is copied from workspaceview.tsx, which had a similar issue.
const width = window.innerWidth - 6 - GlobalModel.mainSidebarModel.getWidth();
return (
<div className={cn("history-view", { "is-hidden": isHidden })}>
<div
className={cn("history-view", "view", { "is-hidden": isHidden })}
style={{
width: `${width}px`,
}}
>
<div className="header">
<div className="history-title">History</div>
<div className="history-search">