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: state icon color on group titles #1435

Merged
merged 1 commit into from
Jul 4, 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
15 changes: 2 additions & 13 deletions apps/app/components/core/board-view/board-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ export const BoardHeader: React.FC<Props> = ({
: null
);

let bgColor = "#000000";
if (selectedGroup === "state") bgColor = currentState?.color ?? "#000000";

if (selectedGroup === "priority")
groupTitle === "high"
? (bgColor = "#dc2626")
: groupTitle === "medium"
? (bgColor = "#f97316")
: groupTitle === "low"
? (bgColor = "#22c55e")
: (bgColor = "#ff0000");

const getGroupTitle = () => {
let title = addSpaceIfCamelCase(groupTitle);

Expand Down Expand Up @@ -96,7 +84,8 @@ export const BoardHeader: React.FC<Props> = ({

switch (selectedGroup) {
case "state":
icon = currentState && getStateGroupIcon(currentState.group, "16", "16", bgColor);
icon =
currentState && getStateGroupIcon(currentState.group, "16", "16", currentState.color);
break;
case "priority":
icon = getPriorityIcon(groupTitle, "text-lg");
Expand Down
5 changes: 2 additions & 3 deletions apps/app/components/core/list-view/single-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { PROJECT_ISSUE_LABELS, PROJECT_MEMBERS } from "constants/fetch-keys";
type Props = {
type?: "issue" | "cycle" | "module";
currentState?: IState | null;
bgColor?: string;
groupTitle: string;
groupedByIssues: {
[key: string]: IIssue[];
Expand All @@ -53,7 +52,6 @@ type Props = {
export const SingleList: React.FC<Props> = ({
type,
currentState,
bgColor,
groupTitle,
groupedByIssues,
selectedGroup,
Expand Down Expand Up @@ -113,7 +111,8 @@ export const SingleList: React.FC<Props> = ({

switch (selectedGroup) {
case "state":
icon = currentState && getStateGroupIcon(currentState.group, "16", "16", bgColor);
icon =
currentState && getStateGroupIcon(currentState.group, "16", "16", currentState.color);
break;
case "priority":
icon = getPriorityIcon(groupTitle, "text-lg");
Expand Down