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

feat(login): cleanup sso login buttons #256

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

danshilm
Copy link
Contributor

@danshilm danshilm commented Nov 26, 2024

The buttons to login with Google and GitHub (and also Discord) seemed a bit weirdly sized and positioned.
And they have been like this for a while, so I wanted to clean it up.

Also removed the "connect using" from the section above the button and made the button text clearer.

Before:

Screen Shot 2024-11-26 at 22 44 42
Screenshot 2024-11-26 at 22 45 29

After:
Screen Shot 2024-11-26 at 22 47 15
Screenshot 2024-11-26 at 22 47 00

Summary by CodeRabbit

  • New Features

    • Updated OAuth login buttons for clearer user guidance, now labeled "Continue with Google" and "Continue with Discord."
    • Enhanced visual feedback with cursor pointer on GitHub login element.
  • Bug Fixes

    • Disabled the Discord login button to indicate non-functionality.
  • Style

    • Improved layout of OAuth buttons from grid to vertical stack for better visual hierarchy.

Copy link
Contributor

coderabbitai bot commented Nov 26, 2024

Walkthrough

The changes involve modifications to the user interface of the OAuth login components in the frontend application. The LoginForm.vue component has been restructured to enhance the layout of OAuth options, including updated button texts for Google and Discord logins. The LoginWithGithub.vue component has also seen changes in its text and hover effects. Overall, these updates aim to improve the clarity and usability of the login process without altering the underlying logic.

Changes

File Change Summary
packages/frontendmu-nuxt/components/auth/LoginForm.vue - Restructured OAuth login section layout.
- Updated Google button text to "Continue with Google".
- Updated Discord button text to "Continue with Discord" and marked it as disabled.
- Adjusted class attributes for icons.
packages/frontendmu-nuxt/components/auth/LoginWithGithub.vue - Added hover:cursor-pointer class to AlertDialogTrigger child div.
- Changed button text from "GitHub" to "Continue with GitHub".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LoginForm
    participant OAuthService

    User->>LoginForm: Click "Continue with Google"
    LoginForm->>OAuthService: Initiate Google OAuth
    OAuthService-->>User: Redirect to Google login
Loading

Poem

🐰 In the meadow, bright and spry,
OAuth buttons reach for the sky.
"Continue with Google," they cheer,
While Discord waits, not yet here.
With a hover, the GitHub calls,
A friendly login, as the rabbit hops and sprawls! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
packages/frontendmu-nuxt/components/auth/LoginForm.vue (2)

105-108: Consider following Google's brand guidelines for the sign-in button

While the text improvement to "Continue with Google" is great, consider following Google's official brand guidelines for sign-in buttons. The current black background might affect brand recognition.

-class="flex w-full items-center justify-center gap-3 rounded-md bg-[#000000] hover:bg-black/50 transition-all duration-300 px-3 py-1.5 text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#1D9BF0]"
+class="flex w-full items-center justify-center gap-3 rounded-md bg-white hover:bg-gray-50 transition-all duration-300 px-3 py-1.5 text-gray-800 border border-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#4285F4]"

113-118: Consider removing or documenting the disabled Discord integration

The commented-out Discord integration code could be confusing for future developers. Consider either:

  1. Removing it completely if Discord integration isn't planned
  2. Adding a TODO comment explaining the plan for Discord integration
  3. Moving it to a separate feature branch until ready to implement

Also, when implemented, consider using Discord's brand colors instead of black background for better brand recognition.

Would you like me to help create a GitHub issue to track the Discord integration implementation?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 083b278 and 5b1ac0b.

📒 Files selected for processing (2)
  • packages/frontendmu-nuxt/components/auth/LoginForm.vue (1 hunks)
  • packages/frontendmu-nuxt/components/auth/LoginWithGithub.vue (1 hunks)
🔇 Additional comments (3)
packages/frontendmu-nuxt/components/auth/LoginWithGithub.vue (1)

33-33: LGTM! Text change improves clarity

The updated button text "Continue with GitHub" is clearer and more descriptive of the action. It also maintains consistency with other OAuth buttons in the application.

packages/frontendmu-nuxt/components/auth/LoginForm.vue (2)

104-104: LGTM! Improved button layout structure

The switch to a vertical flex layout with consistent spacing improves the visual hierarchy and follows modern auth UI patterns.


110-110: Verify consistent styling with GitHub button

Ensure the GitHub button component follows the same styling patterns as other OAuth buttons for consistency.

✅ Verification successful

GitHub button styling is consistent with other OAuth buttons

The verification shows that the GitHub button in LoginWithGithub.vue follows the same styling pattern as other OAuth buttons:

  • Uses identical Tailwind classes for layout: flex w-full items-center justify-center gap-3
  • Matches button styling: rounded-md bg-[#000000] hover:bg-black/50
  • Consistent text styling: text-white and padding: px-3 py-1.5
  • Similar focus state styling: focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the GitHub button component implementation
ast-grep --pattern 'class LoginWithGithub {
  $$$
}'

# Check for similar styling classes
rg -A 5 "class=\"flex w-full items-center justify-center gap-3 rounded-md" packages/frontendmu-nuxt/components/auth/

Length of output: 3373

@MrSunshyne
Copy link
Member

thxxx @danshilm

@MrSunshyne MrSunshyne merged commit 045986d into frontendmu:main Nov 26, 2024
2 checks passed
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