forked from github/plane
fix: onboarding screen design issues (#1517)
* fix: projects empty state flicker * fix: tour images padding * chore: add greeting icon on the dashboard * chore: update email id font weight * fix: placeholder color
This commit is contained in:
parent
411a661abd
commit
864e592bc5
@ -200,7 +200,7 @@ export const InviteMembers: React.FC<Props> = ({ workspace, user, stepChange })
|
|||||||
onClick={appendField}
|
onClick={appendField}
|
||||||
>
|
>
|
||||||
<PlusIcon className="h-3 w-3" />
|
<PlusIcon className="h-3 w-3" />
|
||||||
Add more
|
Add another
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
|
@ -82,7 +82,8 @@ export const TourRoot: React.FC<Props> = ({ onComplete }) => {
|
|||||||
|
|
||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
|
|
||||||
const currentStep = TOUR_STEPS.find((tourStep) => tourStep.key === step);
|
const currentStepIndex = TOUR_STEPS.findIndex((tourStep) => tourStep.key === step);
|
||||||
|
const currentStep = TOUR_STEPS[currentStepIndex];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -124,7 +125,11 @@ export const TourRoot: React.FC<Props> = ({ onComplete }) => {
|
|||||||
</button>
|
</button>
|
||||||
<TourSidebar step={step} setStep={setStep} />
|
<TourSidebar step={step} setStep={setStep} />
|
||||||
<div className="col-span-10 lg:col-span-7 h-full overflow-hidden">
|
<div className="col-span-10 lg:col-span-7 h-full overflow-hidden">
|
||||||
<div className="flex justify-end items-end h-1/2 sm:h-3/5 overflow-hidden bg-custom-primary-100">
|
<div
|
||||||
|
className={`flex items-end h-1/2 sm:h-3/5 overflow-hidden bg-custom-primary-100 ${
|
||||||
|
currentStepIndex % 2 === 0 ? "justify-end" : "justify-start"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Image src={currentStep?.image} alt={currentStep?.title} />
|
<Image src={currentStep?.image} alt={currentStep?.title} />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col h-1/2 sm:h-2/5 p-4 overflow-y-auto">
|
<div className="flex flex-col h-1/2 sm:h-2/5 p-4 overflow-y-auto">
|
||||||
|
@ -144,7 +144,7 @@ export const UserDetails: React.FC<Props> = ({ user }) => {
|
|||||||
value ? (
|
value ? (
|
||||||
value.toString()
|
value.toString()
|
||||||
) : (
|
) : (
|
||||||
<span className="text-gray-400">Select your role...</span>
|
<span className="text-custom-text-400">Select your role...</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
input
|
input
|
||||||
|
@ -34,7 +34,7 @@ export const Input: React.FC<Props> = ({
|
|||||||
register && register(name).onChange(e);
|
register && register(name).onChange(e);
|
||||||
onChange && onChange(e);
|
onChange && onChange(e);
|
||||||
}}
|
}}
|
||||||
className={`block rounded-md bg-transparent text-sm focus:outline-none ${
|
className={`block rounded-md bg-transparent text-sm focus:outline-none placeholder-custom-text-400 ${
|
||||||
mode === "primary"
|
mode === "primary"
|
||||||
? "rounded-md border border-custom-border-100"
|
? "rounded-md border border-custom-border-100"
|
||||||
: mode === "transparent"
|
: mode === "transparent"
|
||||||
|
@ -66,7 +66,7 @@ export const TextArea: React.FC<Props> = ({
|
|||||||
onChange && onChange(e);
|
onChange && onChange(e);
|
||||||
setTextareaValue(e.target.value);
|
setTextareaValue(e.target.value);
|
||||||
}}
|
}}
|
||||||
className={`no-scrollbar w-full bg-transparent ${
|
className={`no-scrollbar w-full bg-transparent placeholder-custom-text-400 ${
|
||||||
noPadding ? "" : "px-3 py-2"
|
noPadding ? "" : "px-3 py-2"
|
||||||
} outline-none ${
|
} outline-none ${
|
||||||
mode === "primary"
|
mode === "primary"
|
||||||
|
@ -12,9 +12,9 @@ export const orderArrayBy = (
|
|||||||
key: string,
|
key: string,
|
||||||
ordering: "ascending" | "descending" = "ascending"
|
ordering: "ascending" | "descending" = "ascending"
|
||||||
) => {
|
) => {
|
||||||
const array = [...orgArray];
|
if (!orgArray || !Array.isArray(orgArray) || orgArray.length === 0) return [];
|
||||||
|
|
||||||
if (!array || !Array.isArray(array) || array.length === 0) return [];
|
const array = [...orgArray];
|
||||||
|
|
||||||
if (key[0] === "-") {
|
if (key[0] === "-") {
|
||||||
ordering = "descending";
|
ordering = "descending";
|
||||||
|
@ -26,7 +26,9 @@ const useProjects = () => {
|
|||||||
?.slice(0, 3);
|
?.slice(0, 3);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
projects: orderArrayBy(projects ?? [], "is_favorite", "descending") as IProject[] | undefined,
|
projects: projects
|
||||||
|
? (orderArrayBy(projects, "is_favorite", "descending") as IProject[])
|
||||||
|
: undefined,
|
||||||
recentProjects: recentProjects || [],
|
recentProjects: recentProjects || [],
|
||||||
mutateProjects,
|
mutateProjects,
|
||||||
};
|
};
|
||||||
|
@ -133,6 +133,7 @@ const WorkspacePage: NextPage = () => {
|
|||||||
Good {greeting}, {user?.first_name} {user?.last_name}
|
Good {greeting}, {user?.first_name} {user?.last_name}
|
||||||
</h3>
|
</h3>
|
||||||
<h6 className="text-custom-text-400 font-medium">
|
<h6 className="text-custom-text-400 font-medium">
|
||||||
|
{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙️"}
|
||||||
{DAYS[today.getDay()]}, {renderShortDate(today)} {render12HourFormatTime(today)}
|
{DAYS[today.getDay()]}, {renderShortDate(today)} {render12HourFormatTime(today)}
|
||||||
</h6>
|
</h6>
|
||||||
<div className="mt-7 bg-custom-primary-100/5 flex justify-between gap-5 md:gap-8">
|
<div className="mt-7 bg-custom-primary-100/5 flex justify-between gap-5 md:gap-8">
|
||||||
|
@ -158,7 +158,7 @@ const Onboarding: NextPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="absolute sm:fixed text-custom-text-100 text-sm right-4 top-1/4 sm:top-12 -translate-y-1/2 sm:translate-y-0 sm:right-16 sm:py-5">
|
<div className="absolute sm:fixed text-custom-text-100 text-sm font-medium right-4 top-1/4 sm:top-12 -translate-y-1/2 sm:translate-y-0 sm:right-16 sm:py-5">
|
||||||
{user?.email}
|
{user?.email}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.empty-node::after {
|
.empty-node::after {
|
||||||
content: attr(data-placeholder);
|
content: attr(data-placeholder);
|
||||||
color: #9ca3af;
|
color: rgb(var(--color-text-400));
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user