Show disconnect alongside reconnect on lost social connections - #332
Merged
Merged
Conversation
When a social account's token expired or the connection was lost, the Connections card only offered "Reconnect". Users who wanted to drop that account and connect a different one had no way to do it from the UI. The lost-connection card now renders both Reconnect and Disconnect, reusing the existing disconnect confirmation flow. The connected-state Disconnect button gets a data-testid too so browser tests can target either state by account id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On
/accounts, when a social account's connection is lost (disconnectedortoken_expired), the card only offered Reconnect. A user who wanted to drop that account and connect a different one couldn't do it from the UI.The lost-connection card now shows Reconnect and Disconnect stacked. Disconnect reuses the existing confirmation modal and
app.accounts.disconnectroute, which already accepts accounts in any status, so this is a frontend-only change.Changes
resources/js/components/accounts/NetworkConnectGrid.vue: render both buttons in thereconnectstate; adddata-testidon reconnect/disconnect buttons keyed by account id.tests/Browser/NetworkConnectGridTest.php: new browser test seeding atokenExpired()X account and asserting both buttons are visible.Test plan
php artisan test tests/Browser/NetworkConnectGridTest.php --compact(3 passed, againstnpm run buildoutput)npx eslint resources/js/components/accounts/NetworkConnectGrid.vuevendor/bin/pint --dirty