Skip to content

Commit

Permalink
changing align to start in typography
Browse files Browse the repository at this point in the history
  • Loading branch information
rosannamilner committed Aug 13, 2024
1 parent 4e32d11 commit 7e2c787
Showing 1 changed file with 64 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ const renderCollapsePrevFactChecks = (
<Box mb={1.5}>
<Divider />
<Grid container>
<Grid item xs={4} align={"left"}>
<Grid item xs={4} align={"start"}>
<></>
</Grid>
<Grid item xs={6} align={"left"}>
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Grid item xs={6} align={"start"}>
<Typography sx={{ color: "text.secondary", align: "start" }}>
<p></p>
{keyword("more_details")}{" "}
<Link
Expand All @@ -189,7 +189,7 @@ const renderCollapsePrevFactChecks = (
</Link>
</Typography>
</Grid>
<Grid item xs={2} align={"right"}>
<Grid item xs={2} align={"start"}>
{displayExpander ? (
expanded ? (
<ExpandLessOutlined
Expand Down Expand Up @@ -405,25 +405,29 @@ const AssistantCredSignals = () => {
expandIcon={getExpandIcon(newsFramingLoading, newsFramingFail)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Grid item xs={4} align="start">
<Typography
display="inline"
sx={{ flexShrink: 0, align: "left" }}
sx={{ flexShrink: 0, align: "start" }}
>
{newsFramingTitle}
</Typography>
</Grid>
<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{newsFramingLoading && (
<CircularProgress color={"secondary"} />
)}
{newsFramingFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{newsFramingDone && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{renderEntityKeys(newsFramingResult.entities)}
</Typography>
)}
Expand Down Expand Up @@ -476,23 +480,27 @@ const AssistantCredSignals = () => {
expandIcon={getExpandIcon(newsGenreLoading, newsGenreFail)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Grid item xs={4} align="start">
<Typography
display="inline"
sx={{ flexShrink: 0, align: "left" }}
sx={{ flexShrink: 0, align: "start" }}
>
{newsGenreTitle}
</Typography>
</Grid>
<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{newsGenreLoading && <CircularProgress color={"secondary"} />}
{newsGenreFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{newsGenreDone && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{renderEntityKeys(newsGenreResult.entities)}
</Typography>
)}
Expand Down Expand Up @@ -556,32 +564,36 @@ const AssistantCredSignals = () => {
)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Grid item xs={4} align="start">
<Typography
display="inline"
sx={{ flexShrink: 0, align: "left" }}
sx={{ flexShrink: 0, align: "start" }}
>
{persuasionTitle}
</Typography>
</Grid>
<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{persuasionLoading && (
<CircularProgress color={"secondary"} />
)}
{persuasionFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{persuasionDone && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{renderEntityKeys(persuasionResult.entities)}
</Typography>
)}
{persuasionDone &&
Object.keys(persuasionResult.entities).length < 1 && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("none_detected")}
</Typography>
Expand Down Expand Up @@ -645,30 +657,34 @@ const AssistantCredSignals = () => {
)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Typography sx={{ flexShrink: 0, align: "left" }}>
<Grid item xs={4} align="start">
<Typography sx={{ flexShrink: 0, align: "start" }}>
{subjectivityTitle}
</Typography>
</Grid>
<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{subjectivityLoading && (
<CircularProgress color={"secondary"} />
)}
{subjectivityFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{subjectivityDone && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("subjective_sentences_detected")}{" "}
{calculateSubjectivity(subjectivityResult.sentences)}
</Typography>
)}
{subjectivityDone &&
Object.keys(subjectivityResult.entities).length < 1 && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("none_detected")}
</Typography>
Expand Down Expand Up @@ -735,29 +751,31 @@ const AssistantCredSignals = () => {
)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Grid item xs={4} align="start">
<Typography
display="inline"
sx={{ flexShrink: 0, align: "left" }}
sx={{ flexShrink: 0, align: "start" }}
>
{prevFactChecksTitle}
</Typography>
</Grid>

<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{role.includes("BETA_TESTER") && prevFactChecksLoading && (
<CircularProgress color={"secondary"} />
)}
{role.includes("BETA_TESTER") && prevFactChecksFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{role.includes("BETA_TESTER") &&
prevFactChecksDone &&
prevFactChecksResult && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("previous_fact_checks_found")}
</Typography>
Expand All @@ -768,14 +786,16 @@ const AssistantCredSignals = () => {
!prevFactChecksFail &&
!prevFactChecksResult && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("reanalyse_url")}
{/* should now be obselete as saga is re run */}
</Typography>
)}
{!role.includes("BETA_TESTER") && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("login_required")}
</Typography>
)}
Expand Down Expand Up @@ -857,30 +877,32 @@ const AssistantCredSignals = () => {
)}
>
<Grid container wrap="wrap">
<Grid item xs={4} align="left">
<Grid item xs={4} align="start">
<Typography
display="inline"
sx={{ flexShrink: 0, align: "left" }}
sx={{ flexShrink: 0, align: "start" }}
>
{machineGeneratedTextTitle}
</Typography>
</Grid>

<Grid item xs={8} align="left">
<Grid item xs={8} align="start">
{role.includes("BETA_TESTER") &&
machineGeneratedTextLoading && (
<CircularProgress color={"secondary"} />
)}
{role.includes("BETA_TESTER") && machineGeneratedTextFail && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("failed_to_load")}
</Typography>
)}
{role.includes("BETA_TESTER") &&
machineGeneratedTextDone &&
machineGeneratedTextResult && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword(machineGeneratedTextResult.pred)}
{round(machineGeneratedTextResult.score, 4)}
Expand All @@ -892,14 +914,16 @@ const AssistantCredSignals = () => {
!machineGeneratedTextFail &&
!machineGeneratedTextResult && (
<Typography
sx={{ color: "text.secondary", align: "left" }}
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("reanalyse_url")}
{/* should now be obselete as saga is re run */}
</Typography>
)}
{!role.includes("BETA_TESTER") && (
<Typography sx={{ color: "text.secondary", align: "left" }}>
<Typography
sx={{ color: "text.secondary", align: "start" }}
>
{keyword("login_required")}
</Typography>
)}
Expand Down

0 comments on commit 7e2c787

Please sign in to comment.