Skip to content

Conversation

@lebraat
Copy link
Member

@lebraat lebraat commented Aug 15, 2025

Summary

This PR replaces the hardcoded score threshold of '20' with the dynamic threshold value from the Django backend, providing partners the ability to set custom score thresholds.

Changes Made

  • ConnectWalletBody.tsx: Replace hardcoded '20' with dynamic threshold using useWidgetPassportScore hook
  • ScoreTooLowBody.tsx: Remove 'Choose from below and verify' text while maintaining div structure
  • ConnectWalletBody.tsx: Update messaging from 'wallet' to 'account' for broader compatibility
  • Test updates: Update test expectations to reflect UI text changes

Technical Details

  • Uses existing useWidgetPassportScore hook to access threshold data
  • Maintains fallback to 20 when backend data is unavailable
  • Follows the same pattern already implemented in ScoreTooLowBody.tsx
  • Preserves component layout and functionality

Testing

  • Updated failing tests to reflect UI changes
  • Maintains existing component behavior and API compatibility

Impact

Partners can now set custom score thresholds in the Django backend, and the frontend will automatically display the correct threshold value to users in both the ConnectWallet and ScoreTooLow screens.

…d update UI messaging

- Replace hardcoded '20' threshold with dynamic data.threshold in ConnectWalletBody
- Remove 'Choose from below and verify' text from ScoreTooLowBody
- Update messaging from 'wallet' to 'account' for broader compatibility
- Maintain fallback to 20 when backend data unavailable
@lebraat lebraat changed the title Replace hardcoded score threshold with dynamic backend value General language adjustments Aug 15, 2025
- Update Body.test.tsx for CongratsBody and ScoreTooLowBody text changes
- Update PlatformVerification.test.tsx for error message and deduplication text updates
- Update ScoreTooLowBody.test.tsx for heading, loading text, and navigation button changes
- All tests now pass with updated messaging
- Update test mocks to use threshold: 20 instead of 25
- Update test expectation to match 'Reach 20+ by adding Stamps'
- Ensures consistency with component's default fallback threshold
…guage updates

- Revert error message changes in PlatformVerification.tsx
- Revert deduplication text changes in PlatformVerification.tsx
- Update corresponding test expectations to match reverted changes
- Keep PR scope focused on main UI language improvements only
@lebraat
Copy link
Member Author

lebraat commented Aug 19, 2025

@lucianHymer -- Reverted

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.

3 participants