-
Notifications
You must be signed in to change notification settings - Fork 1
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
KLO-152 : fix(web) update ui changes in router screen #95
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
import {ReactNode, useState} from 'react'; | ||
import Tooltip from '~/components/atoms/tooltip'; | ||
import {cn, titleCase} from '~/components/utils'; | ||
import {CopyrightFill, CopySimple} from "@jengaicons/react"; | ||
import useClipboard from "~/lib/client/hooks/use-clipboard"; | ||
import {toast} from "~/components/molecule/toast"; | ||
import {cn} from '~/components/utils'; | ||
|
||
interface IBase { | ||
className?: string; | ||
|
@@ -134,41 +131,27 @@ const ListTitle = ({ | |
}; | ||
|
||
const ListDomainItem = ({ | ||
data, | ||
value, | ||
}: { | ||
data, | ||
value, | ||
}: { | ||
data: ReactNode; | ||
value: string; | ||
}) => { | ||
const [_, setCopyIcon] = useState(<CopySimple/>); | ||
const {copy} = useClipboard({ | ||
onSuccess: () => { | ||
setTimeout(() => { | ||
setCopyIcon(<CopyrightFill/>); | ||
toast.success(`${titleCase("domain name")} copied successfully`); | ||
}, 1000); | ||
// toast.success('Copied to clipboard'); | ||
}, | ||
}); | ||
|
||
return ( | ||
<div | ||
onClick={(event) => { | ||
event.preventDefault() | ||
copy(value); | ||
window.open(`https://${value}`, "_blank") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (llm): Changing the action from copying to clipboard to opening the domain in a new tab is a significant UX change. This should be clearly communicated to users, possibly through UI hints or documentation, to set the correct expectations. |
||
}} | ||
className="flex flex-row gap-md items-center select-none group cursor-pointer" | ||
className="flex flex-row gap-md items-center" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (llm): The removal of the |
||
> | ||
<div className="flex flex-col flex-1"> | ||
{data && ( | ||
<div className="bodyMd-medium text-text-soft truncate pulsable"> | ||
<div className="bodyMd-medium text-border-focus underline underline-offset-2 truncate pulsable"> | ||
{data} | ||
</div> | ||
)} | ||
</div> | ||
<span className="invisible group-hover:visible"> | ||
<CopySimple size={10}/> | ||
</span> | ||
</div> | ||
); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): Removing the toast notification for successful clipboard actions changes the user feedback mechanism. Ensure that this aligns with the UX design principles adopted for the application, as users might expect some form of acknowledgment when they perform actions.