Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close details when button is pressed #8694

Merged
merged 1 commit into from
May 29, 2020
Merged

Conversation

brad-decker
Copy link
Contributor

Button behavior was broken by redesign work. Updated the details view to first call the onRetry or onCancel props and pass in the click event which it expect, then call the onClose prop to close the popover so that there aren't two modal-like experiences active at the same time. This behavior will be updated when we do the details redesign.

fixes #8684

@brad-decker brad-decker requested a review from a team as a code owner May 28, 2020 21:59
@brad-decker brad-decker marked this pull request as draft May 28, 2020 21:59
@metamaskbot
Copy link
Collaborator

Builds ready [d35dd57]
Page Load Metrics (650 ± 29 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint318641157
domContentLoaded4387556486129
load4407566506129
domInteractive4387556486129

@brad-decker brad-decker marked this pull request as ready for review May 29, 2020 14:32
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

What became of all the transactionGroup stuff?

@brad-decker
Copy link
Contributor Author

@rekmarks its now encapsulated in the transaction-list-item file, which calls useRetryTransaction and useCancelTransaction .. its no longer necessary to pass in a transaction id.

@brad-decker
Copy link
Contributor Author

const retryTransaction = useCallback(async (event) => {
event.stopPropagation()
trackMetricsEvent()
const basicEstimates = await dispatch(fetchBasicGasAndTimeEstimates)
await dispatch(fetchGasEstimates(basicEstimates.blockTime))
const transaction = initialTransaction
const increasedGasPrice = increaseLastGasPrice(gasPrice)
dispatch(setCustomGasPriceForRetry(increasedGasPrice || transaction.txParams.gasPrice))
dispatch(setCustomGasLimit(transaction.txParams.gas))
dispatch(showSidebar({
transitionName: 'sidebar-left',
type: 'customize-gas',
props: { transaction },
}))
if (
methodName === TOKEN_METHOD_TRANSFER &&
initialTransaction.txParams.to
) {
dispatch(setSelectedToken(initialTransaction.txParams.to))
}
}, [dispatch, methodName, trackMetricsEvent, initialTransaction, gasPrice])

Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

@brad-decker brad-decker merged commit 68f8abb into develop May 29, 2020
@brad-decker brad-decker deleted the fix-details-buttons branch May 29, 2020 16:15
Gudahtt added a commit that referenced this pull request Jun 1, 2020
* origin/develop: (689 commits)
  Implement asset page (#8696)
  fix crash on signature request (#8709)
  Fix accounts menu styling (#8707)
  Delete docs/porting_to_new_environment.md (#8704)
  Remove unused `getToErrorObject` parameters (#8705)
  hide connected-status on metamask ext (#8703)
  Stop adding permissions middleware to trusted connections (#8701)
  Use `send` state for send flow token (#8695)
  do not display extension id in connection modal (#8699)
  Fix tab content disappearing during scrolling on macOS Firefox (#8702)
  close details when button is pressed (#8694)
  Refactor token selectors (#8671)
  Update eth_accounts permission description (#8693)
  Extract selected token from token input (#8692)
  Fix propType for Home defaultHomeActiveTabName (#8683)
  Fix create account form styling (#8689)
  Remove unused `getSelectedTokenAssetImage` selector (#8691)
  Remove `getTxParams` (#8676)
  do not show account mismatch alert on details (#8678)
  Fix connect hardware styling (#8680)
  ...
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.

develop: Tx detail view "speed up/cancel" buttons not responding
3 participants