Skip to content

Improve sidebar and UI - #5

Merged
nassery318 merged 3 commits into
mainfrom
improve-sidebar-and-ui
Aug 25, 2025
Merged

nassery318 merged 3 commits into
mainfrom
improve-sidebar-and-ui

Conversation

@nassery318

@nassery318 nassery318 commented Aug 25, 2025

Copy link
Copy Markdown
Contributor
  • lucide-react library needed upgrade to the newest version (old version with issues 0.539.0). Run npm i
  • In this PR the connection flow and navigation to the dashboard is improved
  • A new sidebar is added instead of the previous sidebar
  • Next PR will make the sidebar extendable/dynamic

@nassery318
nassery318 requested a review from ravjotbrar August 25, 2025 15:12
<h1 className="text-xl font-bold text-gray-700">Connections</h1>
<button
onClick={() => setShowConnectionForm(!showConnectionForm)}
className="bg-[#6883fe] text-white px-2 rounded text-sm font-light py-1 cursor-pointer"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe worth creating a class or a variable or some sort of less hardcoded way to indicate bg-brand-accent or however we want to call it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since there are primary colors from Shadcn, I added a tw before the names of tailwindcss colors.

)}
{/* Connected DBs */}
<div className="border-t-1 mt-8">
<table className=" min-w-full table-auto divide-y divide-gray-200">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

extra space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cleared the space

<td>
<button
onClick={() => navigate("/dashboard")}
className="text-blue-600 hover:text-blue-800 underline cursor-pointer"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no need to change anything but this will have to be changed later once we add a dark theme, which we'll have to add

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

also, it seems, indigo is closer to our brand colour #6883fe than blue — the blue hue is 216, the indigo hue is 240 and our brand colour's hue is 229

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will adjust as we build dark mode.

}
const isActive = (path: string) => {
return location.pathname === path
? "bg-[#6883fe] text-white border border-white rounded"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same as above wrt a less hardcoded way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved using tw-primary color

</Sidebar>
)
}
const isActive = (path: string) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

naming is a bit unconventional — isX is expected to return a boolean, while here it returns classes conditionally — whether it's active or not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

replace with proper naming - getNavItemClasses

Comment thread apps/frontend/src/components/ui/app-sidebar.tsx
{isConnected && (
<button
onClick={handleDisconnect}
className="cursor-pointer p-1 rounded bg-[#6883fe] text-white hover:text-gray-200"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as earlier

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved using tw-primary colour globally available

@arseny-kostenko arseny-kostenko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@nassery318
nassery318 merged commit dfcd9a9 into main Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants