Skip to content

Commit

Permalink
Tweak layout of CM activity charts
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAsJade committed Mar 22, 2024
1 parent dab9f2d commit 07ec965
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
20 changes: 11 additions & 9 deletions src/views/User/ActivityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,21 @@ export function ActivityCard({
),
)
.map(([report_type, _flag]) => (
<div className="mod-graph-header" key={report_type}>
{interpolate(
pgettext(
"header for a graph showing breakdown of moderator's vote outcomes",
"vote outcomes: {{report_type}}",
),
{ report_type },
)}
<>
<div className="mod-graph-header" key={report_type}>
{interpolate(
pgettext(
"header for a graph showing breakdown of moderator's vote outcomes",
"vote outcomes: {{report_type}}",
),
{ report_type },
)}
</div>
<UserVoteActionSummary
user_id={user.id}
report_type={report_type as ReportType}
/>
</div>
</>
))}
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/views/User/User.styl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}

.mod-graph-header {
margin: 0.5rem 0 5px 0.5rem !important;
margin: 0.5rem 0 0.5rem 0.5rem !important;
}

.vote-activity-graph {
Expand Down
6 changes: 3 additions & 3 deletions src/views/User/UserVoteActionSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ const VoteSummaryPie = ({ summary_data }: VoteSummaryPieProps) => {
const chart_theme =
data.get("theme") === "light" // (Accessible theme TBD - this assumes accessible is dark for now)
? {
/* nivo defaults work well with our light theme */
grid: { line: { stroke: "#bbbbbb" } },
}
: {
text: { fill: "#FFFFFF" },
text: { fill: "#bbbbbb" },
tooltip: { container: { color: "#111111" } },
grid: { line: { stroke: "#444444" } },
};
Expand All @@ -68,7 +68,7 @@ const VoteSummaryPie = ({ summary_data }: VoteSummaryPieProps) => {
data={chart_data}
animate
enableArcLabels={false}
margin={{ top: 5, right: 100, bottom: 30, left: 100 }}
margin={{ top: 20, right: 100, bottom: 30, left: 120 }}
theme={chart_theme}
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/views/User/VoteActivityGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const VoteActivityGraph = ({ vote_data }: VoteActivityGraphProps) => {
const chart_theme =
data.get("theme") === "light" // (Accessible theme TBD - this assumes accessible is dark for now)
? {
/* nivo defaults work well with our light theme */
grid: { line: { stroke: "#bbbbbb" } },
}
: {
text: { fill: "#FFFFFF" },
text: { fill: "#bbbbbb" },
tooltip: { container: { color: "#111111" } },
grid: { line: { stroke: "#444444" } },
};
Expand Down Expand Up @@ -88,6 +88,7 @@ const VoteActivityGraph = ({ vote_data }: VoteActivityGraphProps) => {
type: "time",
useUTC: false,
}}
enableGridX={false}
axisLeft={{
tickValues: 6,
}}
Expand Down

0 comments on commit 07ec965

Please sign in to comment.