Skip to content

Conversation

@h2ls
Copy link
Collaborator

@h2ls h2ls commented Jun 5, 2025

Link issues

fixes #6161

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Add a new TransitionalLogin tutorial template with accompanying Razor component and CSS, and register it in the tutorials navigation for download.

New Features:

  • Introduce TransitionalLogin.razor serving a two-step email/password login UI.
  • Add TransitionalLogin.razor.css for styling the new login template.

Enhancements:

  • Register TransitionalLogin in TutorialsNavMenu with download template entry and file list.

h2ls added 3 commits June 5, 2025 20:13
This commit introduces a new `TransitionalLogin.razor` page featuring a structured login form with email and password fields, including validation for the email input and a back button for navigation. The corresponding CSS file, `TransitionalLogin.razor.css`, styles the login interface with background images, button styles, and animations. Additionally, the `TutorialsNavMenu.razor.cs` file is updated to include the new transitional login entry in the navigation menu.
Updated `TransitionalLogin.razor` to replace SVG icons with Font Awesome icons, modified button labels and subtitles to reflect BootstrapBlazor accounts, and switched to `BootstrapInput` components for email and password fields. Retained error message logic.

Adjusted CSS in `TransitionalLogin.razor.css` to use `::deep` selectors for scoped styles while maintaining button hover effects.
Removed SVG logo, added "BootstrapBlazor" header, and updated documentation link. Adjusted background image properties for better scaling and introduced new `.blazor-text` class for styling. Centered logo in the layout.
@bb-auto
Copy link

bb-auto bot commented Jun 5, 2025

Thanks for your PR, @h2ls. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 5, 2025

Reviewer's Guide

This PR adds a new "TransitionalLogin" tutorial to the TutorialsNavMenu by defining its menu entry and file list, and introduces two new sample files—a Razor component implementing a two-step login flow with Blazor logic and a corresponding CSS stylesheet for styling and animations.

Class Diagram for New and Updated Components in Transitional Login Feature

classDiagram
    class TutorialsNavMenu {
        - _template5 : string[]
        # OnInitializedAsync() : Task
    }
    note for TutorialsNavMenu "New field: _template5 (file list for TransitionalLogin tutorial)\nModified method: OnInitializedAsync() to add a new menu item for 'TransitionalLogin' using _template5."

    class TransitionalLogin {
        <<Razor Component>>
        - isEmailEntered : bool
        - email : string
        - password : string
        - showEmailError : bool
        - OnEmailSubmit() : void
        - GoBack() : void
    }
    note for TransitionalLogin "New Razor component implementing a two-step login UI.\n- Properties manage the state of the login form (e.g., if email is entered, error display).\n- Methods handle form submissions (OnEmailSubmit) and navigation (GoBack)."
Loading

File-Level Changes

Change Details Files
Extend TutorialsNavMenu to include TransitionalLogin tutorial
  • Imported additional using directives
  • Appended new NavItem with Template, Text, and Url for TransitionalLogin
  • Defined a private _template5 string array listing associated tutorial files
src/BootstrapBlazor.Server/Components/Layout/TutorialsNavMenu.razor.cs
Add TransitionalLogin sample component
  • Created new Razor page with two-step email/password UI
  • Implemented OnEmailSubmit and GoBack methods to toggle login steps
  • Bound input fields to component state and conditional rendering
src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/TransitionalLogin.razor
Add CSS for TransitionalLogin styling and animations
  • Defined logo, background-image, container, and button styles
  • Added fade-in/out keyframe animations
  • Scoped deep selectors for input and button styling
src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/TransitionalLogin.razor.css

Assessment against linked issues

Issue Objective Addressed Explanation
#6161 Add a new tutorial page for a transitional login template.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Jun 5, 2025
@bb-auto bb-auto bot requested a review from ArgoZhang June 5, 2025 13:08
@bb-auto bb-auto bot added this to the 9.7.0 milestone Jun 5, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @h2ls - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Invalid C# array initialization syntax (link)
  • Invalid spread operator usage in array initializer (link)
  • Missing click handler for password submission (link)
Here's what I looked at during the review
  • 🔴 General issues: 3 blocking issues, 1 other issue
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.99%. Comparing base (3011026) to head (4723a3d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6162   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         704      704           
  Lines       31099    31099           
  Branches     4395     4395           
=======================================
  Hits        31098    31098           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ArgoZhang ArgoZhang changed the title doc(Login): Add transitionallogin template doc(Login): add microsoft login template Jun 6, 2025
@ArgoZhang ArgoZhang merged commit c333024 into main Jun 6, 2025
4 checks passed
@ArgoZhang ArgoZhang deleted the lee/TransitionalLogin branch June 6, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc(Login): add microsoft login template

3 participants