Skip to content

Password login mode settings#6407

Draft
IKarbowiak wants to merge 5 commits intomainfrom
password-login-mode-settings
Draft

Password login mode settings#6407
IKarbowiak wants to merge 5 commits intomainfrom
password-login-mode-settings

Conversation

@IKarbowiak
Copy link
Member

Scope of the change

Add implementation for saleor/saleor#18917

  • Extend the settings page with password login mode
image
  • Adjust the login page - do not show the email, password inputs in case passwordLoginMode is DISABLED or CUSTOMERS_ONLY
image
  • I confirm I added ripples for changes (see src/ripples) or my feature doesn't contain any user-facing changes
  • I used analytics "trackEvent" for important events

@IKarbowiak IKarbowiak self-assigned this Mar 10, 2026
Copilot AI review requested due to automatic review settings March 10, 2026 10:49
@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2026

🦋 Changeset detected

Latest commit: a7d892f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.13%. Comparing base (e640f8c) to head (a7d892f).

Files with missing lines Patch % Lines
src/auth/views/Login.tsx 0.00% 4 Missing ⚠️
src/auth/components/LoginPage/LoginPage.tsx 71.42% 2 Missing ⚠️
...ts/SitePasswordLoginCard/SitePasswordLoginCard.tsx 0.00% 2 Missing ⚠️
...tings/components/SitePasswordLoginCard/messages.ts 0.00% 1 Missing ⚠️
...s/components/SiteSettingsPage/SiteSettingsPage.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6407   +/-   ##
=======================================
  Coverage   43.13%   43.13%           
=======================================
  Files        2524     2526    +2     
  Lines       44009    44013    +4     
  Branches    10011    10015    +4     
=======================================
+ Hits        18983    18985    +2     
- Misses      24985    24987    +2     
  Partials       41       41           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Dashboard support for Saleor’s new passwordLoginMode shop setting, exposing it in Site Settings and using it to control whether the password-based login form is shown on the Sign In page. This also updates the local schema snapshot and generated GraphQL typings to include the new field (and other upstream schema changes).

Changes:

  • Extend Site Settings form + mutation payload to edit shop.passwordLoginMode via a new radio-group card.
  • Update Sign In flow to fetch passwordLoginMode and hide email/password inputs unless the mode is ENABLED.
  • Refresh GraphQL schema snapshot, fragments, and generated client types to include passwordLoginMode and other schema updates.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/siteSettings/views/index.tsx Sends passwordLoginMode in shopSettingsInput when saving Site Settings.
src/siteSettings/fixtures.ts Adds passwordLoginMode to Site Settings fixture data.
src/siteSettings/components/SiteSettingsPage/messages.ts Adds i18n strings for the new Password Login section header/description.
src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx Adds passwordLoginMode to form state and renders the new settings section/card.
src/siteSettings/components/SitePasswordLoginCard/messages.ts Introduces i18n strings for the radio options (and currently unused section strings).
src/siteSettings/components/SitePasswordLoginCard/SitePasswordLoginCard.tsx New card component to edit passwordLoginMode via radio choices.
src/graphql/typePolicies.generated.ts Regenerated GraphQL client type policies (includes passwordLoginMode).
src/graphql/hooks.generated.ts Adds passwordLoginMode to Shop fragment and AvailableExternalAuthentications query selection set.
src/graphql/fragmentTypes.generated.ts Updates possible types for unions after schema refresh.
src/graphql/fabbricaTypes.generated.ts Regenerated GraphQL TS types (includes PasswordLoginModeEnum).
src/graphql/fabbrica.generated.ts Regenerated fabbrica factories/types after schema refresh.
src/fragments/shop.ts Adds passwordLoginMode to shopFragment.
src/auth/views/Login.tsx Fetches passwordLoginMode and passes passwordLoginEnabled to LoginPage.
src/auth/queries.ts Extends AvailableExternalAuthentications query to include passwordLoginMode.
src/auth/components/LoginPage/LoginPage.tsx Conditionally hides email/password fields when password login is disabled.
src/auth/components/LoginPage/LoginPage.test.tsx Updates test props to include new required passwordLoginEnabled.
schema-main.graphql Schema snapshot updated with PasswordLoginModeEnum and other upstream schema changes.
locale/defaultMessages.json Adds extracted default messages for new i18n IDs.
.changeset/tangy-friends-follow.md Adds a minor changeset describing the new setting and login behavior.

You can also share your feedback on Copilot code review. Take the survey.

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