Skip to content

Refactor login logic and add unique keys to Editor components#1609

Open
cannarocks wants to merge 4 commits into
developfrom
test-alert-login
Open

Refactor login logic and add unique keys to Editor components#1609
cannarocks wants to merge 4 commits into
developfrom
test-alert-login

Conversation

@cannarocks
Copy link
Copy Markdown
Member

This pull request primarily refactors and simplifies the LoginPage authentication logic, removing the legacy WordPress login fallback and related error handling. It also introduces minor improvements to the bug detail description component to ensure correct re-rendering of the Editor component.

Authentication flow simplification:

  • Removed the fallback to legacy WordPress login in LoginPage, so authentication now relies solely on Cognito. All related logic and error handling for WordPress login have been deleted.
  • Removed the unused showGenericErrorToast function, as generic error handling for the legacy login is no longer needed.

Component improvements:

  • Updated the Editor components in BugDetail/Description.tsx to include a key prop based on their respective content (step_by_step, expected_result, current_result). This ensures the editor re-renders properly when the content changes.

Code organization:

  • Cleaned up and reordered imports in both BugDetail/Description.tsx and LoginPage/index.tsx for clarity and to remove unused dependencies (such as WPAPI and WrappedText). [1] [2]

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