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

clue/FEE: Implement User and Admin Menu Dropdowns #392 #487

Merged
merged 46 commits into from
Nov 19, 2024

Conversation

Clue355
Copy link
Contributor

@Clue355 Clue355 commented Aug 28, 2024

Feat:

  • added a menu for the user settings in the /admin route that includes edit profile and sign out buttons
  • the sign out button logs a user out and redirects to /login page
  • the edit profile button directs user to /admin/edit-profile page

Copy link

appwrite bot commented Aug 28, 2024

Gridiron Survivor Application 6616ea581ef9f5521c7d

Function ID Status Action
Your function has been successfully deployed.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
userAuth 6626fef885a9f630442b ready Ready View Logs

Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.

💡 Did you know?
Cursor pagination performs better than offset pagination when loading further pages

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gridiron-survivor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 4:33pm
gridiron-survivor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 4:33pm

Copy link
Member

@ryandotfurrer ryandotfurrer left a comment

Choose a reason for hiding this comment

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

Looks like you're having some test failures. Run pnpm build locally to see what the errors are and then resubmit please :)

await logoutAccount();
router.push('/login');
} catch (error) {
throw new Error('Logout failed');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update to this code so it will throw the actual error and not a made up string.

Suggested change
throw new Error('Logout failed');
throw error;

</DropdownMenuItem>
<DropdownMenuItem className="cursor-pointer rounded-none focus:bg-muted">
<Button
className="w-full text-base no-underline py-2 px-0 h-auto text-muted-foreground hover:text-foreground font-normal justify-normal hover:underline"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a special button that it needs all these different class names? @ryandotfurrer Can we create a new variant for this type of button so we're not setting these classes over again?

Copy link
Member

@ryandotfurrer ryandotfurrer Nov 15, 2024

Choose a reason for hiding this comment

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

Hey @shashilo, By default, shadcn uses a different look that I needed to change to match our design (first screenshot). Shadcn's does not take up the full width (second screenshot).

I reckon we could call this variant something like "DropdownMenuToggleButton" or something along those lines to describe what it should be used for.

Figma design

CleanShot 2024-11-14 at 20 57 33@2x

shadcn default

CleanShot 2024-11-14 at 20 53 30@2x

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's do that, but in another ticket.

@kepsteen kepsteen merged commit f92114f into develop Nov 19, 2024
5 checks passed
@kepsteen kepsteen deleted the clue355/implement-menu-dropdown branch November 19, 2024 20:39
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.

10 participants