Ver código fonte

Fixes lack of remote button from breaking layout

Adds protection for undefined rows (seen in logs)
main
Eric Amodio 1 ano atrás
pai
commit
73b07c4253
4 arquivos alterados com 11 adições e 3 exclusões
  1. +1
    -1
      src/plus/webviews/graph/graphWebview.ts
  2. +5
    -1
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  3. +4
    -0
      src/webviews/apps/plus/graph/graph.scss
  4. +1
    -1
      src/webviews/apps/plus/graph/graph.tsx

+ 1
- 1
src/plus/webviews/graph/graphWebview.ts Ver arquivo

@ -1385,7 +1385,7 @@ export class GraphWebviewProvider implements WebviewProvider {
);
}
@debug()
@debug({ args: false })
private async notifyDidChangeRowsStats(graph: GitGraph) {
if (graph.rowsStats == null) return;

+ 5
- 1
src/webviews/apps/plus/graph/GraphWrapper.tsx Ver arquivo

@ -1048,7 +1048,11 @@ export function GraphWrapper({
return (
<>
<header className="titlebar graph-app__header">
<div className={`titlebar__row titlebar__row--wrap${allowed ? '' : ' disallowed'}`}>
<div
className={`titlebar__row titlebar__row--wrap${
!allowed ? ' disallowed' : repo && branchState?.provider?.url ? '' : ' no-remote-provider'
}`}
>
{repo && branchState?.provider?.url && (
<a
href={branchState.provider.url}

+ 4
- 0
src/webviews/apps/plus/graph/graph.scss Ver arquivo

@ -820,6 +820,10 @@ button:not([disabled]),
justify-content: start;
grid-template-columns: repeat(5, min-content) minmax(min-content, 1fr);
&.no-remote-provider {
grid-template-columns: repeat(4, min-content) minmax(min-content, 1fr);
}
&.disallowed {
grid-template-columns: repeat(1, min-content) minmax(min-content, 1fr);
}

+ 1
- 1
src/webviews/apps/plus/graph/graph.tsx Ver arquivo

@ -682,7 +682,7 @@ export class GraphApp extends App {
}
private onSelectionChanged(rows: GraphRow[]) {
const selection = rows.map(r => ({ id: r.sha, type: r.type as GitGraphRowType }));
const selection = rows.filter(r => r != null).map(r => ({ id: r.sha, type: r.type as GitGraphRowType }));
this.sendCommand(UpdateSelectionCommandType, {
selection: selection,
});

Carregando…
Cancelar
Salvar