-
-
Notifications
You must be signed in to change notification settings - Fork 234
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: Feed page responsiveness #1490
Changes from all commits
d363f5f
c07d2c1
61907c3
84654b7
20644ee
c376ebf
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 |
---|---|---|
|
@@ -18,13 +18,13 @@ const UserCard = ({ username, name, meta, loading }: UserCardProps) => { | |
const avatarUrl = getAvatarByUsername(username); | ||
|
||
return ( | ||
<div className="w-full pb-6 border rounded-lg bg-light-slate-1 border-zinc-200"> | ||
<div className="pb-6 border bg-light-slate-1 w-max rounded-xl border-zinc-200"> | ||
{loading ? ( | ||
<div className="flex items-center justify-center h-32 w-72"> | ||
<Spinner className="mt-6 " /> | ||
</div> | ||
) : ( | ||
<div className="flex flex-col items-center gap-6 px-6 "> | ||
<div className="flex flex-col items-center gap-6 px-9"> | ||
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. I'm very curious to know why you thought to increase this padding!? |
||
<div className="flex flex-col items-center gap-2 -mt-10"> | ||
<Image | ||
className="border border-white rounded-full " | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,7 +8,9 @@ const ProfileLayout = ({ children }: { children: React.ReactNode }) => { | |||||
<div className="flex flex-col min-h-screen"> | ||||||
<TopNav /> | ||||||
<div className="page-container flex grow flex-col items-center"> | ||||||
<main className="flex pb-16 w-full flex-1 flex-col items-center bg-light-slate-2">{children}</main> | ||||||
<main className="container px-2 flex md:px-16 pb-16 w-full flex-1 flex-col items-center bg-light-slate-2"> | ||||||
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. REGRESSION!!!I see that the changes to the
This is due to the classes ( FIX!!
Suggested change
We will have to remove the classes ( |
||||||
{children} | ||||||
</main> | ||||||
</div> | ||||||
<Footer /> | ||||||
</div> | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -126,13 +126,10 @@ const Feeds: WithPageLayout<HighlightSSRProps> = (props: HighlightSSRProps) => { | |||||||||
image={ogImage} | ||||||||||
twitterCard="summary_large_image" | ||||||||||
/> | ||||||||||
<div | ||||||||||
className="container flex flex-col gap-16 px-2 pt-12 mx-auto md:px-16 lg:justify-end md:flex-row" | ||||||||||
ref={topRef} | ||||||||||
> | ||||||||||
<div className="flex-col flex-1 hidden gap-6 mt-12 md:flex"> | ||||||||||
<div className="w-full gap-[2rem] justify-center flex flex-col md:gap-6 xl:gap-16 pt-12 md:flex-row" ref={topRef}> | ||||||||||
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.
Suggested change
The responsive/prefixed So we can remove them. |
||||||||||
<div className="flex-col flex-1 xl:flex hidden gap-6 mt-12"> | ||||||||||
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.
Suggested change
You are missing a With In the absence of these we are have non equal width on the |
||||||||||
{user && ( | ||||||||||
<div> | ||||||||||
<div className="md:w-1/2 lg:w-1/3"> | ||||||||||
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.
Suggested change
This should only take full width of the parent |
||||||||||
<UserCard | ||||||||||
loading={loggedInUserLoading} | ||||||||||
username={loggedInUser?.login as string} | ||||||||||
|
@@ -222,7 +219,7 @@ const Feeds: WithPageLayout<HighlightSSRProps> = (props: HighlightSSRProps) => { | |||||||||
setActiveTab(value as activeTabType); | ||||||||||
}} | ||||||||||
defaultValue="home" | ||||||||||
className="md:flex-[2] " | ||||||||||
className="grow" | ||||||||||
> | ||||||||||
<TabsList className={clsx("justify-start w-full border-b", !user && "hidden")}> | ||||||||||
<TabsTrigger | ||||||||||
|
@@ -284,7 +281,7 @@ const Feeds: WithPageLayout<HighlightSSRProps> = (props: HighlightSSRProps) => { | |||||||||
<FollowingHighlightWrapper selectedFilter={selectedRepo} emojis={emojis} /> | ||||||||||
</TabsContent> | ||||||||||
</Tabs> | ||||||||||
<div className="hidden gap-6 mt-10 md:flex-1 md:flex md:flex-col"> | ||||||||||
<div className="md:hidden gap-6 mt-10 md:flex-1 lg:flex md:flex-col"> | ||||||||||
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.
Suggested change
You are also missing a responsive ...and
Suggested change
Tailwind uses a mobile-first breakpoint system. This means that unprefixed classes (like So So you needn't specify a responsive class of |
||||||||||
{repoList && repoList.length > 0 && ( | ||||||||||
<HighlightsFilterCard | ||||||||||
selectedFilter={selectedRepo} | ||||||||||
|
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.
Return the full width for the
user-card
and theborder-radius
component.Why though!?
w-full
for size inheritance reasonrounded-lg
for uniformity reason, looking at all other sibling components/divs on theRight (Filter) Div
andLeft (userCard) div
.