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

KLO-152 : fix(web) update ui changes in router screen #95

Merged
merged 1 commit into from
Feb 20, 2024
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
31 changes: 7 additions & 24 deletions src/apps/console/components/console-list-components.tsx
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";
Copy link

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.

import {cn} from '~/components/utils';

interface IBase {
className?: string;
Expand Down Expand Up @@ -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")
Copy link

Choose a reason for hiding this comment

The 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"
Copy link

Choose a reason for hiding this comment

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

suggestion (llm): The removal of the cursor-pointer class along with the copy functionality might reduce the discoverability of the new 'open in new tab' feature. Consider keeping visual cues that suggest interactivity to the user.

>
<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>
);
};
Expand Down
Loading
Loading