Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proposition-in-context display by making appearance connections neutral #611

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion howdju-common/lib/contextTrails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export function contextTrailItemPolarity(
break;
}
case "APPEARANCE":
return "POSITIVE";
return "NEUTRAL";
}
}

Expand Down
2 changes: 1 addition & 1 deletion howdju-service-common/lib/services/ContextTrailsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class ContextTrailsService {
{ userId },
info.connectingEntityId
),
polarity: "POSITIVE" as const,
polarity: "NEUTRAL" as const,
};
}
})
Expand Down
2 changes: 1 addition & 1 deletion howdju-text-fragments/dist/rangeToFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -32948,7 +32948,7 @@
break;
}
case "APPEARANCE":
return "POSITIVE";
return "NEUTRAL";
}
}
function negateRelationPolarity(polarity) {
Expand Down
17 changes: 10 additions & 7 deletions premiser-ui/src/components/contextTrail/ContextTrail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@ function appearanceToCard(
trailItems: ContextTrailItem[]
) {
return (
<AppearanceCard
id={combineIds(id, "appearance", appearance.id)}
style={{ width: "100%" }}
appearance={appearance}
contextTrailItems={trailItems}
mode="CONTEXT_TRAIL"
/>
<>
<AppearanceCard
id={combineIds(id, "appearance", appearance.id)}
style={{ width: "100%" }}
appearance={appearance}
contextTrailItems={trailItems}
mode="CONTEXT_TRAIL"
/>
<p>Presents:</p>
</>
);
}

Expand Down
1 change: 0 additions & 1 deletion premiser-ui/src/pages/appearances/AppearanceViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function AppearanceViewer({
created={appearance.created}
creator={appearance.creator}
/>
<p>Presents:</p>
</div>
);
}
Expand Down
5 changes: 3 additions & 2 deletions premiser-ui/src/pages/justifications/JustificationsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import FocusValidatingContextTrail from "@/components/contextTrail/FocusValidati
import { RootTargetProps } from "@/JustificationRootTargetViewer";
import TextButton from "@/components/button/TextButton";
import { MenuItem } from "@/components/menu/Menu";
import { Page } from "@/components/layout/Page";

const justificationsPageId = "justifications-page";

Expand Down Expand Up @@ -171,7 +172,7 @@ class JustificationsPage extends Component<Props> {
} as RootTargetProps;

return (
<div id="justifications-page">
<Page id="justifications-page">
<Helmet>
<title>
{rootTarget
Expand Down Expand Up @@ -239,7 +240,7 @@ class JustificationsPage extends Component<Props> {
onHide={this.cancelNewJustificationDialog}
/>
)}
</div>
</Page>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`JustificationsPage Shows a justified proposition 1`] = `
<div>
<div
class="page"
id="justifications-page"
>
<div />
Expand Down Expand Up @@ -184,6 +185,7 @@ exports[`JustificationsPage Shows a justified proposition 1`] = `
exports[`JustificationsPage can add a compound-based justification 1`] = `
<div>
<div
class="page"
id="justifications-page"
>
<div />
Expand Down