Skip to content
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
5 changes: 4 additions & 1 deletion web/core/components/dropdowns/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ export const DateDropdown: React.FC<Props> = (props) => {
createPortal(
<Combobox.Options data-prevent-outside-click static>
<div
className="my-1 bg-custom-background-100 shadow-custom-shadow-rg rounded-md overflow-hidden p-3 z-20"
className={cn(
"my-1 bg-custom-background-100 shadow-custom-shadow-rg rounded-md overflow-hidden p-3 z-20",
className
)}
Comment on lines +164 to +167
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor suggestion: Simplify dynamic class name assignment.

The dynamic class name assignment using the cn function is correctly implemented to allow for external styling through the className prop. However, the className is being applied twice (lines 160 and 162), which might be redundant or cause confusion.

Consider simplifying the class name assignment to ensure that className is only included once in the final class string. This will make the code cleaner and prevent potential styling conflicts or duplications.

Here's a proposed change to ensure className is applied only once:

              className={cn(
                "my-1 bg-custom-background-100 shadow-custom-shadow-rg rounded-md overflow-hidden p-3 z-20",
-               className
              )}

Committable suggestion was skipped due to low confidence.

ref={setPopperElement}
style={styles.popper}
{...attributes.popper}
Expand Down
1 change: 1 addition & 0 deletions web/core/components/dropdowns/member/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export const MemberDropdown: React.FC<Props> = observer((props) => {
>
{isOpen && (
<MemberOptions
className={className}
isOpen={isOpen}
projectId={projectId}
placement={placement}
Expand Down
7 changes: 5 additions & 2 deletions web/core/components/dropdowns/member/member-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ import { usePopper } from "react-popper";
import { Check, Search } from "lucide-react";
import { Combobox } from "@headlessui/react";
//components
import { cn } from "@plane/editor";
import { Avatar } from "@plane/ui";
//store
import { useUser, useMember } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";

interface Props {
className? : string;
projectId?: string;
referenceElement: HTMLButtonElement | null;
placement: Placement | undefined;
isOpen: boolean;
}

export const MemberOptions = observer((props: Props) => {
const { projectId, referenceElement, placement, isOpen } = props;
const { projectId, referenceElement, placement, isOpen, className="" } = props;
// states
const [query, setQuery] = useState("");
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
Expand Down Expand Up @@ -92,7 +94,8 @@ export const MemberOptions = observer((props: Props) => {
return createPortal(
<Combobox.Options data-prevent-outside-click static>
<div
className="my-1 w-48 rounded border-[0.5px] border-custom-border-300 bg-custom-background-100 px-2 py-2.5 text-xs shadow-custom-shadow-rg focus:outline-none z-20"
className={cn("my-1 w-48 rounded border-[0.5px] border-custom-border-300 bg-custom-background-100 px-2 py-2.5 text-xs shadow-custom-shadow-rg focus:outline-none z-20",
className)}
ref={setPopperElement}
style={{
...styles.popper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
icon={<CalendarClock className="h-3 w-3 flex-shrink-0" />}
buttonVariant={issue.start_date ? "border-with-text" : "border-without-text"}
disabled={isReadOnly}
className="z-10"
renderByDefault={isMobile}
showTooltip
/>
Expand All @@ -350,6 +351,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
buttonClassName={shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group) ? "text-red-500" : ""}
clearIconClassName="!text-custom-text-100"
disabled={isReadOnly}
className="z-10"
renderByDefault={isMobile}
showTooltip
/>
Expand All @@ -369,6 +371,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""}
showTooltip={issue?.assignee_ids?.length === 0}
placeholder="Assignees"
className="z-10"
tooltipContent=""
renderByDefault={isMobile}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const SpreadsheetAssigneeColumn: React.FC<Props> = observer((props: Props
}
buttonClassName="text-left rounded-none group-[.selected-issue-row]:bg-custom-primary-100/5 group-[.selected-issue-row]:hover:bg-custom-primary-100/10 px-page-x"
buttonContainerClassName="w-full"
className="z-9"
onClose={onClose}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const SpreadsheetDueDateColumn: React.FC<Props> = observer((props: Props)
"text-red-500": shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group),
}
)}
className="z-9"
clearIconClassName="!text-custom-text-100"
onClose={onClose}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const SpreadsheetStartDateColumn: React.FC<Props> = observer((props: Prop
buttonVariant="transparent-with-text"
buttonClassName="text-left rounded-none group-[.selected-issue-row]:bg-custom-primary-100/5 group-[.selected-issue-row]:hover:bg-custom-primary-100/10 px-page-x"
buttonContainerClassName="w-full"
className="z-9"
onClose={onClose}
/>
</div>
Expand Down